java.lang.RuntimeException: Unable to instantiate activity ComponentInfo

前端 未结 30 2812
感动是毒
感动是毒 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

    For me it was different from any of the above,

    The activity was declared as abstract, That is why giving the error. Once it removed it worked.

    Earlier

         public abstract class SampleActivity extends AppcompatActivity{
         }
    

    After removal

         public class SampleActivity extends AppcompatActivity{
         }
    

提交回复
热议问题