java.lang.RuntimeException: Unable to instantiate activity ComponentInfo

前端 未结 30 2780
感动是毒
感动是毒 2020-11-22 15:15

I was trying to run a sample code While launching the application in the android 1.5 emulator , I got these errors.... Any one have some hint..?

ERROR from LogCat:<

30条回答
  •  鱼传尺愫
    2020-11-22 16:03

    This can happen if your activity class is inside a default package. I fixed it by moving the activity class to a new package. and changing the manifest.xml

    before

    activity android:name=".MainActivity" 
    

    after

    activity android:name="new_package.MainActivity"
    

提交回复
热议问题