Unable to instantiate application Com.android.tools.fd.runtime.BootstrapApplication solution

Source: Internet
Author: User

Believe that many people have encountered this problem, with Android Studio is running the program, suddenly don't know what the reason, Reported an error that could not find application or could not find activity (java.lang.ClassNotFoundException:), this dick in clean and rebuild n times, Program is still runtimeexception, near app die.

Asked a lot of people, still can't find a way, and then search the Internet a large number of articles found several solutions, the following in turn to share to you:

Note: The first two I have tested, can be used, the following two you are interested to be able to test:

Workaround:

1, add the app build. The buildtoolsversion in Gradle is changed to 21.1.2;

The option to start with the first enable in 2,file-setting-build,execution,deploymedent-instant Run is unchecked;

3, Changing:classpath ' COM.ANDROID.TOOLS.BUILD:GRADLE:2.0.0-ALPHA1 '

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

4, in project Folder>/.idea/gradle.xml

Will:<option name= "Gradlehome" value= "$APPLICATION _home_dir$/gradle/gradle-2.8"/>

Change to:<option name= "Gradlehome" value= "$APPLICATION _home_dir$/gradle/gradle-2.4"/>

Unable to instantiate application Com.android.tools.fd.runtime.BootstrapApplication solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.