Gradle同步失败:无法HEAD'jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8 / ...”。从服务器收到状态码403:禁止
我无法在Android Studio中运行应用程序。
下面是清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.XX.XX">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
tools:node="merge"
android:theme="@style/AppTheme">
<activity
android:name=".PrinterActivity"
android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PrinterWebViewActivity"/>
</application>
</manifest>
在“使用Gradle文件同步项目”之后出现以下异常 Gradle同步失败:无法HEAD'jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/…'。从服务器收到状态码403:禁止
我已尝试在线检查,但找不到解决方案。请为此提供帮助。谢谢
答案 0 :(得分:0)
第一件事, 要运行任何模块或应用程序,应该在我们通常会看到该应用程序模块的“应用程序或运行模块”部分中可见
所以有很多原因导致该模块在以下部分不可见
settings.gradle
文件中定义的模块我们能做什么?
settings.gradle
该文件是否在以下文件include ':app'
中定义或包含在模块中,如果是,则检查配置部分,然后逐个检查上面的部分。Invalidate Caches/Restart
,然后尝试重建即可。答案 1 :(得分:-1)
尝试构建->清理项目 在项目再次清理后Build-> rebuild project
如果此方法无效,请尝试使用File->缓存并重新启动