无法访问 'android.app.Activity' 的超类型

cannot acces 'android.app.Activity' which is a supertype of

我刚刚安装了 android studio,我正在尝试创建我的第一个应用程序。一旦我创建项目,我就会收到此错误。显然我没有写任何代码,你看到的所有行都是项目的默认代码。

我尝试同步,但正如您在下面的终端中看到的那样,出现了许可证错误。 我该如何解决这个问题? 我已经正确安装了android studio,安装了SDK,工具等等。 提前谢谢你。

I think when your internet connection was off-line. Because Gradle couldn't reach the library, it thought that was missing.Please check that .when you connected to internet and reopen /reinstalling fix the issue

else check your gradle version android version etc to fix the issue

选项 1:

File -> Sync Project with Gradle Files

选项 2:

File -> Invalidate Cache & Restart

根据 Peppe L-G(评论我的问题的人)的建议,我去了 sdk 管理器并在“SDK 平台”部分安装了“Android 10.0(Q)”(API 29级)。 现在一切正常。