我从GitHub的链接下载basicSample项目。当我想同步项目时,出现以下错误。我进行了搜索,然后看到了此链接(How Update the gradle to 3.4.1in android studio),我尝试了离线模式,但再次无法正常工作。我很困惑。我不能在线同步Gradle 3.4.0吗?我应该使用离线同步吗?如果是,我如何设置gradle和gradle插件(我在设置中设置了gradle的路径,但Android Studio显示以下消息)?
No cached version of com.android.tools.build:gradle:3.4.0 available for offline mode.
Disable Gradle 'offline mode' and sync project
Github链接:
https://github.com/googlesamples/android-architecture-components/tree/master/BasicSample
在线模式下同步gradle 3.4.0错误:
Could not find com.android.tools.build:gradle:3.4.0.
Searched in the following locations:
-https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom -https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.jar -https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom -https://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.jar -https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom -https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.jar -https://kotlin.bintray.com/kotlinx/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom -https://kotlin.bintray.com/kotlinx/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.jar -http://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.pom -http://jcenter.bintray.com/com/android/tools/build/gradle/3.4.0/gradle-3.4.0.jar 要求: 项目: 打开文件