Android app ClassNotFoundException for main activity

后端 未结 12 672
灰色年华
灰色年华 2020-12-06 10:07

Most of the devices can run my app but I got this error report :

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.company.app/com         


        
12条回答
  •  悲哀的现实
    2020-12-06 10:34

    I had the same issue and the problem was a third party library that is using Android Support Library.

    myproject/libs/android-support-v4.jar 
    3rdpartylib/libs/android-support-v4.jar
    

    When I updated the library with newer version, the support library was also updated - but not in my project. After that I could not launch the application with this error. After making both libraries to be the same (copy), it was ok.

提交回复
热议问题