Mou*_*awi 8 android intellij-idea gradle build.gradle android-gradle-plugin
我在与Internet断开连接的计算机上安装了JetBrains IDEA 15.0.2和android支持.之后项目同步给出了一个错误,即gradle不存在,所以我通过下载gradle 2.2.1并将其解压缩到相应的位置来解决问题但是之后出现了一个新的同步错误,说"没有缓存的com.android版本.tools.build:gradle:1.2.3可用于离线模式"如何解决错误,同时保持我的计算机与Internet断开连接
Ash*_*dal 19
请尝试以下步骤:
我在android studio中遇到了类似的问题,因为它也使用gradle,所以我的问题是应用程序的源代码是用旧版本的gradle编写的,但我有最新的android studio和最新的gradle。因此更改了类路径依赖项以获得最新的 gradle 版本
在项目级别 更新 build.gradle 文件中依赖项下的类路径
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
}
Run Code Online (Sandbox Code Playgroud)
到
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
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
17944 次 |
最近记录: |