Java.lang.ClassNotFoundException after Android studio update

后端 未结 7 2001
半阙折子戏
半阙折子戏 2020-12-03 22:48

I updated to Android Studio 2.1 from the stable channel. As soon as I did that I am getting ClassNotFoundException to my login class, which is declared in the manifest for l

相关标签:
7条回答
  • 2020-12-03 23:05

    Here you go : Clean the project , And uninstall the existing app and run Again .

    0 讨论(0)
  • 2020-12-03 23:07

    You have to provide:

    compileSdkVersion '22' buildToolsVersion "22.0.1" 
    

    as your targetSdkVersion 22

    0 讨论(0)
  • 2020-12-03 23:21

    Try cleaning gradle cache & build by running each line in the terminal:

    gradlew --stop
    gradlew cleanBuildCache
    gradlew clean
    
    0 讨论(0)
  • 2020-12-03 23:23

    Try this:

    Clear app cache

    Clear app data

    Uninstall app

    Run/Debug again

    Hope it works!

    0 讨论(0)
  • 2020-12-03 23:26

    We are experiencing a similar error after updating to version 2.1 of Android Studio. A class added long ago is now not being found on application start. It's only happening with Android 5.1 and 5.1.1. Really weird crash!

    The solution to this was enabling "Instant Run" solves the issue on Lollipop.

    0 讨论(0)
  • 2020-12-03 23:28

    For me nothing of the above worked. Until I disabled "Instant Run" to Hot Swap code.

    Android studio version: 2.3.3 Latest (at the date of the answer)

    Android Test Devices: 5.1.1, 6.0.1

    To disable instant run. In Android studio, Got to Preferences -> write "Instant Run" in the search bar -> Uncheck "Enable Instant Run to hot swap code ..."

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