解析android res 运行错误的问题_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中就可以啦

时间: 2024-07-31 23:20:47

解析android res 运行错误的问题_Android的相关文章

解析android res 运行错误的问题

复制代码 代码如下: 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/AndroidRunt

解析android 流量监测的实现原理_Android

Linux 系统下所有的信息都是以文件的形式存在的,所以应用程序的流量信息也会被保存在操作系统的文件中.Android 2.2 版本以前的系统的流量信息都存放在 proc/net/dev(或者 proc/self/net/dev)文件下,读取文件然后对其进行解析就行了.读取某一个应用的流量,则读取proc/uid_stat/uid /tcp_rcv 文件进行解析(注:模拟器下不存在这个目录).如需查看某个应用的流量信息,可以通过以下命令来实现: 复制代码 代码如下: adb devices   

解析android中include标签的使用_Android

在一个项目中我们可能会需要用到相同的布局设计,如果都写在一个xml文件中,代码显得很冗余,并且可读性也很差,所以我们可以把相同布局的代码单独写成一个模块,然后用到的时候可以通过<include /> 标签来重用layout代码.app_title.xml: 复制代码 代码如下: <?xml version="1.0" encoding="utf-8"?><RelativeLayout android:id="@+id/titl

解析Android数据加密之异或加密算法_Android

前言: 这几天被公司临时拉到去做Android IM即时通信协议实现,大致看了下他们定的协议,由于之前没有参与,据说因服务器性能限制,只达成非明文传递,具体原因我不太清楚,不过这里用的加密方式是采用异或加密.这种加密方式在之前做Android加密记事本的时候采用过这种加密方式.今天已经把客户端心跳维持.数据包解析对接完了,总结一下这种加密方式. 其他几种加密方式: Android数据加密之Rsa加密 Android数据加密之Aes加密 Android数据加密之Des加密 Android数据加密之

解析Android横竖屏切换的问题_Android

在做android 开发时,在默认情况下当屏幕从竖评变到横屏时会触发 onConfigurationChanged 事件 在默认情况下会重新加载画面并显示和横评一样的画面,这样会有2个问题,布局问题,在竖屏 显示的布局到横屏中由于宽和高发生了变化所有多少都会影响到布局(除非你定制2套画面在然后加个判断在横屏时怎么显示,在竖屏时怎么显示),当然最简单的办法就是在项目的 AndroidManifest.xml中找到你所指定的activity 中加上 只竖屏显示的话(android:screenOri

Android HttpURLConnection.getResponseCode()错误解决方法_Android

导语:个人对网络连接接触的不多,在使用时自己发现一些问题,记录一下. 正文:我在使用HttpURLConnection.getResponseCode()的时候直接报错是IOException错误,responseCode = -1.一直想不明白,同一个程序我调用了两次,结果有一个链接一直OK,另一个却一直报这个错误.后来发现两个链接的区别,有一个返回的内容是空的,所以导致了这个错误. 解决方法: 方法1.网页返回内容不能是空: 方法2.不要用这个接口咯.

logcat-android程序运行错误,不知道怎么解决。

问题描述 android程序运行错误,不知道怎么解决. 我的安卓程序突然运行终止,logCat错误信息如下: 05-26 10:49:54.540: E/AndroidRuntime(30584): java.lang.OutOfMemoryError 05-26 10:49:54.540: E/AndroidRuntime(30584): at android.graphics.BitmapFactory.nativeDecodeStream(Native Method) 05-26 10:4

eclipse android程序没有提示错误,但程序调试时终止运行

问题描述 eclipse android程序没有提示错误,但程序调试时终止运行 刚在学习android开发,好多不懂,我按照书上的代码一个个敲的,以前敲过一遍在原先的eclipse能运行,最近换了个系统用了4.5的eclipse,环境变量应该也没问题,又照着书上敲了一边,我用手机,运行后就显示"已停止运行",程序没提示错误,不知道怎么回事,我连着照着书上敲了两个项目都是这样,求救...... 下面这是在模拟器上给出的错误提示 解决方案 这不提示很明显,LoginActivity的布局中

Android 模拟器(emulator-5554...)出现错误解决办法_Android

Android 模拟器 出现错误解决办法: 1.Unable to get view server version from device exlipse下编写好android应用程序时候,右键项目 run as android application 弹出一对话框说出现问题 点击详细说 空指针异常.打开ddms模式, 里面提示 Unable to get view server version from device emulator-5554 ,此时我的android模拟器是运行着的. 解决