您的位置:首页 > 编程语言 > Java开发

java.lang.runtimeexception

2014-12-07 16:43 183 查看
一般出现这个问题主要是没有在项目的androidManifest.xml里注册使用activity,主要就是这句: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.tomato/com.example.alarmtest.AppStart}: java.lang.ClassNotFoundException: com.example.alarmtest.AppStart 

2

上面它已经就说,你没有实例化com.example.tomato/com.example.alarmtest.AppStart,tomato是项目名字,AppStart是没有实例化的activity。这就明白了,检查这下,注册

   <activity android:name="com.example.tomato.AppStart"/>。

3

但有时你发觉你已经注册,这时你要仔细检查,看看是不是包名写错了,仔细排查错误。就能解决了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐