Android-Studio upgraded from 0.1.9 to 0.2.0 causing gradle build errors now

前端 未结 7 543
粉色の甜心
粉色の甜心 2020-12-02 18:57

My current project had been building with Gradle just fine, since I created it (about a month ago), after acquiring Android-Studio. [I installed some earlier updates to Andr

7条回答
  •  猫巷女王i
    2020-12-02 19:26

    Solution for me without reinstalling or creating a new project:

    Step 1: Change line in build.gradle from:

    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
    

    to

    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
    

    Note: for newer versions of gradle you may need to change it to 0.6.+ instead.

    Step 2: In the .iml file, delete the entire[...] tag.

    Step 3 (Maybe not necessary): In the Android SDK manager, install (if not already installed) Android Support Repository under Extras.


    Info found here

提交回复
热议问题