AndroidStudio错误local path doesn't exist解决办法

论坛 期权论坛 脚本     
已经匿名di用户   2022-7-2 21:58   2682   0

前两天在AndroidStudio开发的项目中使用EventBus.jar(一个很好用的事件分发和接收框架https://github.com/greenrobot/EventBus),但是在deploy的时候,一直出现这个错误:local path doesn't exist,搞了好久不知道哪里出问题,最后没办法,用Eclipse来编译运行。

今天又试着google了一把,找到一个看着靠谱的方法试了试,真给解决了,哈哈~~现在记录一下。

原文地址:http://stackoverflow.com/questions/18256177/android-studio-local-path-doesnt-exist

解决办法:

1:将build.gradle中的gradle版本改到0.6.+,如下

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'
    }
}

2:将gradle/wrapper/ gradle-wrapper.properties中改动如下,将版本改为1.8:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip

3:同步,点击下面这个按钮:

enter image description here

4:重新编译项目,如果还有问题,试着执行File > Invalidate Caches/Restart。


我做完第三步后,就好了,如果大家用这个方法也没解决,那我也就无能为力了~~


分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP