Updating Android Studio to version 0.4.0. nothing works! Which fixes?

蹲街弑〆低调 提交于 2019-12-13 04:37:26

问题


I've made some waste code. After some mistakes I checkout latest commit. I expected to restart with any without any hitch. But building project now I receive the message:

Waiting for device.
Target device: samsung-gt_i8190n-47900693715f5036
Uploading file
local path: /Path/to/file.apk
remote path: /path/to/file/com.example
Local path doesn't exist.
(* I've removed complete local and remote path in this post ...)

Thus, when I try to sync project with gradle files, a new message from editor arrives:

Failed to refresh Gradle project 'NutriMondoProject'
Project is using an old version of the Android Gradle plug-in.
The minimum supported version is 0.7.0.
Please update the version of the dependency 'com.android.tools.build:gradle'
    in your build.gradle files.
Search in build.gradle files

I feel like a fish out of water.


回答1:


You have updated to Android Studio 0.4.0

it requires gradle plugin 0.7.+ and gradle-wrapper 1.9.

Change your build.gradle

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

Then change your gradle-wrapper.properties:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip

Then sync your project with gradle files. Launch gradlew clean to clean your build.




回答2:


It's because you updated your Android Studio to version 0.4.0.

Follow those steps to make it work :

http://tools.android.com/recent/androidstudio040released



来源:https://stackoverflow.com/questions/20679361/updating-android-studio-to-version-0-4-0-nothing-works-which-fixes

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!