解析android res 运行错误的问题
短信预约 -IT技能 免费直播动态提醒
代码如下:
W/ResourceType( 756): Failure getting entry for 0x7f020004 (t=1 e=4) in package 0: 0xffffffb1
D/AndroidRuntime( 756): Shutting down VM
W/dalvikvm( 756): threadid=1: thread exiting with uncaught exception (group=0x2aac47c8)
E/AndroidRuntime( 756): FATAL EXCEPTION: main
E/AndroidRuntime( 756): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxx.mediacenter/com.xxxx.mediacenter.video.VideoPlayerActivity}: android.view.InflateException: Binary XML file line #279: Error inflating class <unknown>
E/AndroidRuntime( 756): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 756): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 756): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 756): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 756): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 756): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 756): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 756): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 756): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 756): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 756): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 756): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 756): Caused by: android.view.InflateException: Binary XML file line #279: Error inflating class <unknown>
E/AndroidRuntime( 756): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
E/AndroidRuntime( 756): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
E/AndroidRuntime( 756): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
E/AndroidRuntime( 756): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
E/AndroidRuntime( 756): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
E/AndroidRuntime( 756): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 756): at android.app.Activity.setContentView(Activity.java:1647)
E/AndroidRuntime( 756): at com.xxxx.mediacenter.video.VideoPlayerActivity.onCreate(VideoPlayerActivity.java:152)
E/AndroidRuntime( 756): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 756): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime( 756): ... 11 more
E/AndroidRuntime( 756): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 756): at android.widget.ImageButton.<init>(ImageButton.java:78)
E/AndroidRuntime( 756): at java.lang.reflect.Constructor.constructNative(Native Method)
E/AndroidRuntime( 756): at java.lang.reflect.Constructor.newInstance(Constructor. java:446)
E/AndroidRuntime( 756): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
E/AndroidRuntime( 756): ... 27 more
E/AndroidRuntime( 756): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/seek_thumb.xml from drawable resource ID #0x7f020004
E/AndroidRuntime( 756): at android.content.res.Resources.loadDrawable(Resources.java:1697)
E/AndroidRuntime( 756): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
E/AndroidRuntime( 756): at android.widget.ImageView.<init>(ImageView.java:118)
E/AndroidRuntime( 756): at android.widget.ImageButton.<init>(ImageButton.java:82)
E/AndroidRuntime( 756): ... 31 more
E/AndroidRuntime( 756): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/seek_thumb.xml from xml type drawable resource ID #0x7f020004
E/AndroidRuntime( 756): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1916)
E/AndroidRuntime( 756): at android.content.res.Resources.loadDrawable(Resources.java:1692)
E/AndroidRuntime( 756): ... 34 more
E/AndroidRuntime( 756): Caused by: java.io.FileNotFoundException: res/drawable/seek_thumb.xml
E/AndroidRuntime( 756): at android.content.res.AssetManager.openXmlAssetNative(Native Method)
E/AndroidRuntime( 756): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485)
E/AndroidRuntime( 756): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1898)
E/AndroidRuntime( 756): ... 35 more
W/ActivityManager( 615): Force finishing activity com.xxxx.mediacenter/.video.VideoPlayerActivity
W/ActivityManager( 615): Force finishing activity com.xxxx.mediacenter/.center.MediaCenterActivity
I/gralloc ( 615): Alloc:
I/gralloc ( 615): usage: 0x133
I/gralloc ( 615): format: 1
I/gralloc ( 615): 480x232
or
代码如下:
E/AndroidRuntime( 758): FATAL EXCEPTION: main
E/AndroidRuntime( 758): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vixs.mediacenter/com.xxxx.mediacenter.video.VideoPlayerActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030004
E/AndroidRuntime( 758): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 758): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 758): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 758): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 758): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 758): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 758): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 758): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 758): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 758): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 758): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 758): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 758): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030004
E/AndroidRuntime( 758): at android.content.res.Resources.getValue(Resources.java:892)
E/AndroidRuntime( 758): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
E/AndroidRuntime( 758): at android.content.res.Resources.getLayout(Resources.java:731)
E/AndroidRuntime( 758): at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
E/AndroidRuntime( 758): at android.view. LayoutInflater.inflate(LayoutInflater.java:276)
E/AndroidRuntime( 758): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 758): at android.app.Activity.setContentView(Activity.java:1647)
E/AndroidRuntime( 758): at com.vixs.mediacenter.video.VideoPlayerActivity.onCreate(VideoPlayerActivity.java:152)
E/AndroidRuntime( 758): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 758): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
资源都放在drawable和layout中就可以啦
您可能感兴趣的文章:Android开发adb.exe'' and can be executed.错误解决方法Android开发常见错误小结Android开发中的9个常见错误和解决方法Caused by: android.os.NetworkOnMainThreadException错误解决办法基于Android 错误信息捕获发送至服务器的详解Android HttpURLConnection.getResponseCode()错误解决方法android layout XML解析错误的解决方法Android调用堆栈跟踪实例分析
W/ResourceType( 756): Failure getting entry for 0x7f020004 (t=1 e=4) in package 0: 0xffffffb1
D/AndroidRuntime( 756): Shutting down VM
W/dalvikvm( 756): threadid=1: thread exiting with uncaught exception (group=0x2aac47c8)
E/AndroidRuntime( 756): FATAL EXCEPTION: main
E/AndroidRuntime( 756): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.xxxx.mediacenter/com.xxxx.mediacenter.video.VideoPlayerActivity}: android.view.InflateException: Binary XML file line #279: Error inflating class <unknown>
E/AndroidRuntime( 756): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 756): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 756): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 756): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 756): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 756): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 756): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 756): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 756): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 756): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 756): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 756): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 756): Caused by: android.view.InflateException: Binary XML file line #279: Error inflating class <unknown>
E/AndroidRuntime( 756): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
E/AndroidRuntime( 756): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
E/AndroidRuntime( 756): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
E/AndroidRuntime( 756): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
E/AndroidRuntime( 756): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
E/AndroidRuntime( 756): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
E/AndroidRuntime( 756): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 756): at android.app.Activity.setContentView(Activity.java:1647)
E/AndroidRuntime( 756): at com.xxxx.mediacenter.video.VideoPlayerActivity.onCreate(VideoPlayerActivity.java:152)
E/AndroidRuntime( 756): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 756): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
E/AndroidRuntime( 756): ... 11 more
E/AndroidRuntime( 756): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 756): at android.widget.ImageButton.<init>(ImageButton.java:78)
E/AndroidRuntime( 756): at java.lang.reflect.Constructor.constructNative(Native Method)
E/AndroidRuntime( 756): at java.lang.reflect.Constructor.newInstance(Constructor. java:446)
E/AndroidRuntime( 756): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
E/AndroidRuntime( 756): ... 27 more
E/AndroidRuntime( 756): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/seek_thumb.xml from drawable resource ID #0x7f020004
E/AndroidRuntime( 756): at android.content.res.Resources.loadDrawable(Resources.java:1697)
E/AndroidRuntime( 756): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
E/AndroidRuntime( 756): at android.widget.ImageView.<init>(ImageView.java:118)
E/AndroidRuntime( 756): at android.widget.ImageButton.<init>(ImageButton.java:82)
E/AndroidRuntime( 756): ... 31 more
E/AndroidRuntime( 756): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/seek_thumb.xml from xml type drawable resource ID #0x7f020004
E/AndroidRuntime( 756): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1916)
E/AndroidRuntime( 756): at android.content.res.Resources.loadDrawable(Resources.java:1692)
E/AndroidRuntime( 756): ... 34 more
E/AndroidRuntime( 756): Caused by: java.io.FileNotFoundException: res/drawable/seek_thumb.xml
E/AndroidRuntime( 756): at android.content.res.AssetManager.openXmlAssetNative(Native Method)
E/AndroidRuntime( 756): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485)
E/AndroidRuntime( 756): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1898)
E/AndroidRuntime( 756): ... 35 more
W/ActivityManager( 615): Force finishing activity com.xxxx.mediacenter/.video.VideoPlayerActivity
W/ActivityManager( 615): Force finishing activity com.xxxx.mediacenter/.center.MediaCenterActivity
I/gralloc ( 615): Alloc:
I/gralloc ( 615): usage: 0x133
I/gralloc ( 615): format: 1
I/gralloc ( 615): 480x232
or
代码如下:
E/AndroidRuntime( 758): FATAL EXCEPTION: main
E/AndroidRuntime( 758): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vixs.mediacenter/com.xxxx.mediacenter.video.VideoPlayerActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030004
E/AndroidRuntime( 758): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
E/AndroidRuntime( 758): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime( 758): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime( 758): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime( 758): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 758): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 758): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 758): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 758): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 758): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 758): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 758): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 758): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030004
E/AndroidRuntime( 758): at android.content.res.Resources.getValue(Resources.java:892)
E/AndroidRuntime( 758): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
E/AndroidRuntime( 758): at android.content.res.Resources.getLayout(Resources.java:731)
E/AndroidRuntime( 758): at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
E/AndroidRuntime( 758): at android.view. LayoutInflater.inflate(LayoutInflater.java:276)
E/AndroidRuntime( 758): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
E/AndroidRuntime( 758): at android.app.Activity.setContentView(Activity.java:1647)
E/AndroidRuntime( 758): at com.vixs.mediacenter.video.VideoPlayerActivity.onCreate(VideoPlayerActivity.java:152)
E/AndroidRuntime( 758): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 758): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
资源都放在drawable和layout中就可以啦
您可能感兴趣的文章:Android开发adb.exe'' and can be executed.错误解决方法Android开发常见错误小结Android开发中的9个常见错误和解决方法Caused by: android.os.NetworkOnMainThreadException错误解决办法基于Android 错误信息捕获发送至服务器的详解Android HttpURLConnection.getResponseCode()错误解决方法android layout XML解析错误的解决方法Android调用堆栈跟踪实例分析
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341