Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication ?Android

后端 未结 16 2340
忘了有多久
忘了有多久 2020-11-28 02:43

I updated my Android Studio to version 2.0. But I had a problem, I don\'t know why?

The important error info:

Unable to instantiate applicati

相关标签:
16条回答
  • 2020-11-28 03:42

    I had the same error after trying to use the 2.0.

    I solved it by reverting some gradle changes:

    1/3:

    Changing:

    classpath 'com.android.tools.build:gradle:2.0.0-alpha1'
    

    By:

    classpath 'com.android.tools.build:gradle:1.2.3'
    

    2/3:

    Changing:

    buildToolsVersion '23.0.2'
    

    By:

    buildToolsVersion "21.1.2"
    

    3/3: (in <project folder>/.idea/gradle.xml)

    And:

    <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.8" />
    

    By:

    <option name="gradleHome" value="$APPLICATION_HOME_DIR$/gradle/gradle-2.4" />
    

    I don't know what line is exactly the origin of the error, but with this three changes it was solved.

    Hope that it helps you :)

    0 讨论(0)
  • 2020-11-28 03:43

    In some Android devices with versions before OS 5.0 we get the error message:

    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication

    We must disable "Instant Run".

    Go to File > Settings > Built, Execution, Deployment > Instant Run

    Then disable the option Enable Instant Run to hot swap code.

    0 讨论(0)
  • 2020-11-28 03:44

    Disable the Instant Run option in Android Studio. Instructions are in the Android Studio Instant Run documentation.

    Instant Run tries to do hot swapping of your code; this causes the application class to be moved.

    To disable Instant Run Go to File --> Settings--> Build,Execution,Deployment -->Instant Run ---> uncheck "Enable instant run"

    0 讨论(0)
  • 2020-11-28 03:44

    I just needed to reboot my device. Tried everything else first unfortunately so wasted hours.

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