No cached version of com.android.tools.build:gradle:1.2.3 available for offline mode

一个人想着一个人 提交于 2019-12-05 03:22:14

Try the following steps:

  1. Un-check "Offline work" in File>Settings>Gradle>Global Gradle Settings
  2. Re-sync the project, for example by restarting the Android Studio
  3. Once synced, you can check the option again to work offline.

I faced similar kind of issue in android studio because its also uses the gradle so my problem was app's source code was written in old version of gradle but i have the latest android studio with latest gradle. so changed the classpath dependency to have latest gradle version

Update the Classpath under dependency in build.gradle file at project level from

dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
}

to

dependencies {
            classpath 'com.android.tools.build:gradle:2.1.0'

            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!