我在Android应用中遇到问题,当我点击构建时,我在build.gradle中收到错误:错误消息是:
"Error:No cached version of com.android.tools.build:gradle:3.1.0-alpha03 available for offline mode.
<a href="toggle.offline.mode">Disable Gradle 'offline mode' and sync project</a>"
我尝试了很多解决方案,但没有奏效。知道为什么会出现这个错误吗? 我的build.gradle是:
buildscript {
repositories {
jcenter()
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha03'
//classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}