App won't run under Android Studio 2.0, after upgrading from 1.5

前端 未结 4 1315
一整个雨季
一整个雨季 2021-01-18 02:57

I recently upgraded my Android Studio from 1.5 to 2.0. My app would build and run nicely on Android 1.5. Now, when I try run the app on my smartphone, it gives me this error

相关标签:
4条回答
  • 2021-01-18 03:16

    Try to disable the Instant Run option in Android Studio 2.0

    This is helped me.

    0 讨论(0)
  • 2021-01-18 03:34

    Delete build dir

    Don't disable Instant Run! It is useful. Instead, try deleting the contents of your build directory, and then rebuilding.

    appName/build and/or appName/app/build

    Alternatively, clean build

    A less brute force option to try is to clean the build.

    Build -> Clean Project or Build -> Rebuild Project

    0 讨论(0)
  • 2021-01-18 03:36

    Have you ever seen a message box like below when you build your project with Android Studio 2.0 ?

    If not , watch out for this window which will possibly appear when you build your project with studio 2.0 then update it. that will change your Gradle-plugin version to 'com.android.tools.build:gradle:2.0.0' and Gradle-wrapper to distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip or you can do it yourself .

    Visit this to know more .

    0 讨论(0)
  • 2021-01-18 03:37

    try to uncheck the instant run on settings.. search instant on the settings and youll see it. or maybe you havemt changed the path of your gradle to the new one?

    0 讨论(0)
提交回复
热议问题