Unable to start activity ComponentInfo{com.example.customview/com.example.customview.MainActivity}:

今天在学自定义控件,看别人博客时把被人的code抄下来,运行时报错了,错误日记:

Unable to start activity ComponentInfo{com.example.customview/com.example.customview.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class com.example.customview.CustomTitleView

这个错误很容易看懂,这是由于在layout的xml文件中,写自定义的路径出问题了,因为自定义的View在xml声明是包名+类名

在此记录下,学习贵在坚持和积累

时间: 2024-11-04 22:46:40

Unable to start activity ComponentInfo{com.example.customview/com.example.customview.MainActivity}:的相关文章

android异常Unable to instantiate activity ComponentInfo解决方法

本人最近调试一个调试一个程序,jar包都添加好了,程序没有任何错误信息,但是运行到手机,却打印出这样的错误信息: 08-29 20:07:52.584: E/AndroidRuntime(4517): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.zhy.csdndemo/com.zhy.csdndemo.MainActivity}: java.lang.ClassNotFoundExce

android工程导入没有错误,运行提示Unable to instantiate activity ComponentInfo

导入小米clientside_android_sdk的demo OAuth-OpenAuthDemo,点Java Build Path的Libraries内Add External JARs,将oauth-xiaomiopenauth.jar包引入. clean工程,然后build project,随之run的时候,提示: Unable to instantiate activity ComponentInfo之类,java.lang.RuntimeException: Unable to in

bug_ _java.lang.RuntimeException: Unable to start activity ComponentInfo{包名/类名}

写这篇博文,我顶着很大的压力,贴出来会引来网友的一片鄙视,不贴我又觉得对不起Android SDK研发团队. 本着对全世界Android无产者负责的态度,今天不得不指出Android编译时隐藏的很深的一个Bug. 以下为我的TestActivity类: public class TestActivity extends Activity { private static final String TAG = "TestActivity"; private Button button;

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi 错误信息字符串:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first/com.first.Game}: java.lang.NullPointerException 一般都会在Activity  o

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPoi

错误信息字符串:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.first/com.first.Game}: java.lang.NullPointerException 一般都会在Activity  onCreate()方法里的setContentView(XXX)发生此错误,网上查阅了很多原因,大概有四种重要可能的原因: 原因一:xxx的错误,若为R.layout.main  那么应该是main.x

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常总结

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo异常总结 做android开发的可能都碰到"java.lang.RuntimeException: Unable to instantiate activity ComponentInfo"过这个异常, 有时是Conslole 会出现Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFOR

Android Unable to instantiate activity ComponentInfo

Android开发环境,真是脆弱....折腾人. 昨晚敲点书上的代码,今天来公司运行,就各种报错,如下: 10-18 10:03:56.063: W/dalvikvm(14661): Unable to resolve superclass of Lcom/example/geoquizfrist/QuizActivity; (761) 10-18 10:03:56.063: W/dalvikvm(14661): Link of class 'Lcom/example/geoquizfrist/

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ex.activity/com.ex.activity.LoginActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ex.activity/com.ex.activity.LoginActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class 异常解决方案: 是因为设置background的图片太大了,造成了内存溢出,在Activity设置onCreate

Android开发中java.lang.RuntimeException: Unable to start activity ComponentInfo{xxx}: java.lang.NullPointerException 错误的集中原因及解决办法

上面那个问题刚解决,就又来一个问题~~~~ 错误信息字符串:java.lang.RuntimeException: Unable to start activity ComponentInfo{...}: java.lang.NullPointerException 网上有不少解决办法 一般都会在Activity  onCreate()方法里的setContentView(XXX)发生此错误,网上查阅了很多原因,大概有四种重要可能的原因: 原因一:xxx的错误,若为R.layout.main