我有这样的应用程序,我开发的,它的伟大工程上没有错误,什么那么模拟器。但此刻我尝试进行测试运行在手机上一样,应用程序崩溃,说明FileNotFoundException异常。它说,该文件/res/drawable/divider_horizontal.9.png丢失。但实际上来说,我从来没有穿过我的code引用该文件。 我相信它的系统/ OS文件不可用。我有一个自定义列表视图,我想它的分频器有... 可能有人请建议什么是错在这里。我相信这是here..but讨论我无法作出任何意义了它的一个类似的问题
HTTP://$c$c.google。 COM / P / transdroid /问题/详细信息?ID = 14
在listview.xml布局文件
< XML版本=1.0编码=UTF-8&GT?;
< LinearLayout中的xmlns:机器人=http://schemas.android.com/apk/res/android
机器人:layout_height =WRAP_CONTENT安卓重力=左|中心
机器人:layout_width =WRAP_CONTENT机器人:paddingBottom会=5像素
机器人:paddingTop =5px的机器人:以下属性来=5px的>
< ImageView的机器人:ID =@ + ID / linkImage机器人:layout_width =WRAP_CONTENT
机器人:layout_height =FILL_PARENT机器人:layout_marginRight =6dip
机器人:SRC =@可绘制/图标/>
<的LinearLayout机器人:方向=垂直
机器人:layout_width =0dip机器人:layout_weight =1
机器人:layout_height =FILL_PARENT>
< TextView的机器人:ID =@ + ID / firstLineView
机器人:layout_width =WRAP_CONTENT机器人:layout_height =WRAP_CONTENT
机器人:重力=中心的Android版本:文字颜色=#FFFF00机器人:文本=第一行标题是>< / TextView的>
< TextView的机器人:ID =@ + ID / secondLineView
机器人:layout_width =WRAP_CONTENT机器人:layout_height =WRAP_CONTENT
机器人:文本=第二行标题机器人:layout_marginLeft =10px的安卓重力=中心
机器人:文字颜色=#0099CC>< / TextView的>
< / LinearLayout中>
< / LinearLayout中>
这是调用listview.xml主要的xml文件
< XML版本=1.0编码=UTF-8&GT?;
<的FrameLayout的xmlns:机器人=http://schemas.android.com/apk/res/android
机器人:layout_width =FILL_PARENT机器人:layout_height =FILL_PARENT>
<的LinearLayout机器人:方向=垂直
机器人:layout_width =FILL_PARENT机器人:layout_height =FILL_PARENT>
<的LinearLayout机器人:方向=横向
机器人:layout_width =FILL_PARENT机器人:layout_height =40PX>
<按钮机器人:ID =@ + ID / todayButton机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT机器人:文本=今天
机器人:TEXTSIZE =12SP安卓重力=中心
机器人:layout_weight =1/>
<按钮机器人:ID =@ + ID / tomorrowButton机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT机器人:文本=明天
机器人:TEXTSIZE =12SP机器人:layout_weight =1/>
<按钮机器人:ID =@ + ID / WeekButton机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT机器人:文本=未来
机器人:TEXTSIZE =12SP机器人:layout_weight =1/>
< / LinearLayout中>
<的LinearLayout机器人:ID =@ + ID / listLayout
机器人:方向=垂直机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT>
< ListView的机器人:ID =@ + ID / ListView01机器人:layout_width =FILL_PARENT
机器人:layout_height =FILL_PARENT/>
< TextView的机器人:ID =@ ID /安卓:空
机器人:layout_width =FILL_PARENT机器人:layout_height =FILL_PARENT
机器人:文本=没有结果/>
< / LinearLayout中>
< / LinearLayout中>
< /的FrameLayout>
和$ C $下同样是
私有类EfficientAdapter扩展了BaseAdapter {
私人LayoutInflater mInflater;
私人字符串eventTitleArray [];
私人字符串eventDateArray [];
私人字符串eventImageLinkArray [];
公共EfficientAdapter(上下文的背景下,的String [] eventTitleArray,字符串[] eventDateArray,字符串[] eventImageLinkArray){
mInflater = LayoutInflater.from(上下文);
this.eventDateArray = eventDateArray;
this.eventTitleArray = eventTitleArray;
this.eventImageLinkArray = eventImageLinkArray;
}
公众诠释getCount将(){
//返回XmlParser.todayEvents.size() - 1;
返回this.eventDateArray.length;
}
公共对象的getItem(INT位置){
返回的位置;
}
众长getItemId(INT位置){
返回的位置;
}
公共查看getView(INT位置,查看convertView,ViewGroup中父){
ViewHolder持有人;
如果(convertView == NULL){
convertView = mInflater.inflate(R.layout.listview,NULL);
持有人=新ViewHolder();
holder.firstLine =(TextView中)convertView.findViewById(R.id.firstLineView);
holder.secondLine =(TextView中)convertView.findViewById(R.id.secondLineView);
holder.imageView =(ImageView的)convertView.findViewById(R.id.linkImage);
//holder.checkbox =(复选框)convertView.findViewById(R.id.star);
holder.firstLine.setFocusable(假);
holder.secondLine.setFocusable(假);
holder.imageView.setFocusable(假);
//holder.checkbox.setFocusable(false);
convertView.setTag(保持器);
}其他{
支架=(ViewHolder)convertView.getTag();
}
Log.i(标签,创建列表);
holder.firstLine.setText(this.eventTitleArray [位置]);
holder.secondLine.setText(this.eventDateArray [位置]);
点阵位图;
尝试 {
位= BitmapFactory.de codeStream((InputStream的)新的URL(http://eventur.sis.pitt.edu/images/heinz7.jpg).getContent());
}赶上(MalformedURLException的E1){
// TODO自动生成的catch块
e1.printStackTrace();
}赶上(例外E1){
// TODO自动生成的catch块
位= BitmapFactory.de$c$cFile("assets/heinz7.jpg");//de$c$cFile(getResources().getAssets().open("icon.png"));
e1.printStackTrace();
}
尝试 {
尝试{
位= BitmapFactory.de codeStream((InputStream的)新的URL(this.eventImageLinkArray [位置])的getContent());}
赶上(例外五){
位= BitmapFactory.de codeStream((InputStream的)新的URL(http://eventur.sis.pitt.edu/images/heinz7.jpg).getContent());
}
INT宽度= 0;
INT高= 0;
INT newWidth = 50;
INT newHeight = 40;
尝试{
宽度= bitmap.getWidth();
身高= bitmap.getHeight();
}
赶上(例外五){
宽度= 50;
高度= 40;
}
浮动scaleWidth =((浮点)newWidth)/宽度;
浮动scaleHeight =((浮点)newHeight)/身高;
矩阵垫=新的Matrix();
mat.postScale(scaleWidth,scaleHeight);
尝试{
位图newBitmap = Bitmap.createBitmap(位图,0,0,宽度,高度,垫,真正的);
BitmapDrawable BMD =新BitmapDrawable(newBitmap);
holder.imageView.setImageDrawable(BMD);
holder.imageView.setScaleType(ScaleType.CENTER);
}
赶上(例外五){
}
}赶上(MalformedURLException异常E){
// TODO自动生成的catch块
e.printStackTrace();
}赶上(IOException异常E){
// TODO自动生成的catch块
e.printStackTrace();
}
返回convertView;
}
类ViewHolder {
TextView的firstLine中;
TextView的secondLine;
ImageView的ImageView的;
//复选框复选框;
}
堆栈跟踪
12-12 22:55:25.022:ERROR / AndroidRuntime(11069):未捕获的处理程序:螺纹主力退出,由于未捕获的异常
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):android.view.InflateException:二进制XML文件,6号线:错误充气类java.lang.reflect.Constructor中
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.createView(LayoutInflater.java:512)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.inflate(LayoutInflater.java:407)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.inflate(LayoutInflater.java:320)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.inflate(LayoutInflater.java:276)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在com.eventur.MainActivity $ EfficientAdapter.getView(MainActivity.java:566)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.AbsListView.obtainView(AbsListView.java:1274)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.ListView.makeAndAddView(ListView.java:1661)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.ListView.fillDown(ListView.java:610)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.ListView.fillFromTop(ListView.java:673)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.ListView.layoutChildren(ListView.java:1519)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.AbsListView.onLayout(AbsListView.java:1113)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.onLayout(LinearLayout.java:918)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.onLayout(LinearLayout.java:918)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.FrameLayout.onLayout(FrameLayout.java:333)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.FrameLayout.onLayout(FrameLayout.java:333)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.LinearLayout.onLayout(LinearLayout.java:918)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.FrameLayout.onLayout(FrameLayout.java:333)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.View.layout(View.java:6156)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.ViewRoot.performTraversals(ViewRoot.java:950)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.ViewRoot.handleMessage(ViewRoot.java:1529)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.os.Handler.dispatchMessage(Handler.java:99)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.os.Looper.loop(Looper.java:123)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.app.ActivityThread.main(ActivityThread.java:3977)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在java.lang.reflect.Method.invokeNative(本机方法)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在java.lang.reflect.Method.invoke(Method.java:521)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:782)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在dalvik.system.NativeStart.main(本机方法)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):由:java.lang.reflect.InvocationTargetException
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.ImageView< INIT>(ImageView.java:128)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在java.lang.reflect.Constructor.constructNative(本机方法)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在java.lang.reflect.Constructor.newInstance(Constructor.java:446)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.view.LayoutInflater.createView(LayoutInflater.java:499)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):42 ...更多
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):由:android.content.res.Resources $ NotFoundException:文件RES /绘制/ divider_horizontal_dark.9.png从绘制资源ID#0x7f020001
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.content.res.Resources.loadDrawable(Resources.java:1643)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.content.res.TypedArray.getDrawable(TypedArray.java:548)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.widget.ImageView< INIT>(ImageView.java:138)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):46 ...更多
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):java.io.FileNotFoundException:产生的原因RES /绘制/ divider_horizontal_dark.9.png
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.content.res.AssetManager.openNonAssetNative(本机方法)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.content.res.AssetManager.openNonAsset(AssetManager.java:417)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):在android.content.res.Resources.loadDrawable(Resources.java:1636)
12-12 22:55:25.212:ERROR / AndroidRuntime(11069):48 ...更多
解决方案
下面是类似的问题,一点有用的信息,可能是帮助 - android应用程序工作在模拟器,但无法在手机上。
i have this app that i developed and it works great on the simulator with no errors what so ever. but the moment i try to run the same on the phone for testing, the app crashes stating filenotfoundexception. it says the file /res/drawable/divider_horizontal.9.png is missing. but actually speaking, i have never referenced that file through my code. i believe its a system/os file that is unavailable. i have a custom list view, i guess its the divider there... could somebody please suggest what is wrong here. i believe this is a similar issue discussed here..but i am unable to make any sense out of it
http://code.google.com/p/transdroid/issues/detail?id=14
the listview.xml layout file
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content" android:gravity="left|center"
android:layout_width="wrap_content" android:paddingBottom="5px"
android:paddingTop="5px" android:paddingLeft="5px" >
<ImageView android:id="@+id/linkImage" android:layout_width="wrap_content"
android:layout_height="fill_parent" android:layout_marginRight="6dip"
android:src="@drawable/icon" />
<LinearLayout android:orientation="vertical"
android:layout_width="0dip" android:layout_weight="1"
android:layout_height="fill_parent">
<TextView android:id="@+id/firstLineView"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:textColor="#FFFF00" android:text="first line title"></TextView>
<TextView android:id="@+id/secondLineView"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:text="second line title" android:layout_marginLeft="10px" android:gravity="center"
android:textColor="#0099CC"></TextView>
</LinearLayout>
</LinearLayout>
the main xml file that calls the listview.xml
<?xml version="1.0" encoding="UTF-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_height="40px">
<Button android:id="@+id/todayButton" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="Today"
android:textSize="12sp" android:gravity="center"
android:layout_weight="1" />
<Button android:id="@+id/tomorrowButton" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="Tomorrow"
android:textSize="12sp" android:layout_weight="1" />
<Button android:id="@+id/WeekButton" android:layout_width="fill_parent"
android:layout_height="fill_parent" android:text="Future"
android:textSize="12sp" android:layout_weight="1" />
</LinearLayout>
<LinearLayout android:id="@+id/listLayout"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ListView android:id="@+id/ListView01" android:layout_width="fill_parent"
android:layout_height="fill_parent" />
<TextView android:id="@id/android:empty"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:text="No Results" />
</LinearLayout>
</LinearLayout>
</FrameLayout>
and the code for the same is
private class EfficientAdapter extends BaseAdapter{
private LayoutInflater mInflater;
private String eventTitleArray[];
private String eventDateArray[];
private String eventImageLinkArray[];
public EfficientAdapter(Context context,String[] eventTitleArray,String[] eventDateArray, String[] eventImageLinkArray){
mInflater = LayoutInflater.from(context);
this.eventDateArray=eventDateArray;
this.eventTitleArray=eventTitleArray;
this.eventImageLinkArray =eventImageLinkArray;
}
public int getCount(){
//return XmlParser.todayEvents.size()-1;
return this.eventDateArray.length;
}
public Object getItem(int position){
return position;
}
public long getItemId(int position){
return position;
}
public View getView(int position, View convertView, ViewGroup parent){
ViewHolder holder;
if(convertView == null){
convertView = mInflater.inflate(R.layout.listview,null);
holder = new ViewHolder();
holder.firstLine = (TextView) convertView.findViewById(R.id.firstLineView);
holder.secondLine = (TextView) convertView.findViewById(R.id.secondLineView);
holder.imageView = (ImageView) convertView.findViewById(R.id.linkImage);
//holder.checkbox = (CheckBox) convertView.findViewById(R.id.star);
holder.firstLine.setFocusable(false);
holder.secondLine.setFocusable(false);
holder.imageView.setFocusable(false);
//holder.checkbox.setFocusable(false);
convertView.setTag(holder);
}else{
holder = (ViewHolder) convertView.getTag();
}
Log.i(tag, "Creating the list");
holder.firstLine.setText(this.eventTitleArray[position]);
holder.secondLine.setText(this.eventDateArray[position]);
Bitmap bitmap;
try {
bitmap = BitmapFactory.decodeStream((InputStream)new URL("http://eventur.sis.pitt.edu/images/heinz7.jpg").getContent());
} catch (MalformedURLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (Exception e1) {
// TODO Auto-generated catch block
bitmap = BitmapFactory.decodeFile("assets/heinz7.jpg");//decodeFile(getResources().getAssets().open("icon.png"));
e1.printStackTrace();
}
try {
try{
bitmap = BitmapFactory.decodeStream((InputStream)new URL(this.eventImageLinkArray[position]).getContent());}
catch(Exception e){
bitmap = BitmapFactory.decodeStream((InputStream)new URL("http://eventur.sis.pitt.edu/images/heinz7.jpg").getContent());
}
int width = 0;
int height =0;
int newWidth = 50;
int newHeight = 40;
try{
width = bitmap.getWidth();
height = bitmap.getHeight();
}
catch(Exception e){
width = 50;
height = 40;
}
float scaleWidth = ((float)newWidth)/width;
float scaleHeight = ((float)newHeight)/height;
Matrix mat = new Matrix();
mat.postScale(scaleWidth, scaleHeight);
try{
Bitmap newBitmap = Bitmap.createBitmap(bitmap,0,0,width,height,mat,true);
BitmapDrawable bmd = new BitmapDrawable(newBitmap);
holder.imageView.setImageDrawable(bmd);
holder.imageView.setScaleType(ScaleType.CENTER);
}
catch(Exception e){
}
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return convertView;
}
class ViewHolder{
TextView firstLine;
TextView secondLine;
ImageView imageView;
//CheckBox checkbox;
}
The stack trace
12-12 22:55:25.022: ERROR/AndroidRuntime(11069): Uncaught handler: thread main exiting due to uncaught exception
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): android.view.InflateException: Binary XML file line #6: Error inflating class java.lang.reflect.Constructor
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at com.eventur.MainActivity$EfficientAdapter.getView(MainActivity.java:566)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.AbsListView.obtainView(AbsListView.java:1274)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.ListView.makeAndAddView(ListView.java:1661)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.ListView.fillDown(ListView.java:610)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.ListView.fillFromTop(ListView.java:673)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.ListView.layoutChildren(ListView.java:1519)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.AbsListView.onLayout(AbsListView.java:1113)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.onLayout(LinearLayout.java:918)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.onLayout(LinearLayout.java:918)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1119)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:998)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.LinearLayout.onLayout(LinearLayout.java:918)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.FrameLayout.onLayout(FrameLayout.java:333)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.View.layout(View.java:6156)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.ViewRoot.performTraversals(ViewRoot.java:950)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.ViewRoot.handleMessage(ViewRoot.java:1529)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.os.Handler.dispatchMessage(Handler.java:99)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.os.Looper.loop(Looper.java:123)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.app.ActivityThread.main(ActivityThread.java:3977)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at java.lang.reflect.Method.invokeNative(Native Method)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at java.lang.reflect.Method.invoke(Method.java:521)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at dalvik.system.NativeStart.main(Native Method)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): Caused by: java.lang.reflect.InvocationTargetException
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.ImageView.<init>(ImageView.java:128)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at java.lang.reflect.Constructor.constructNative(Native Method)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): ... 42 more
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/divider_horizontal_dark.9.png from drawable resource ID #0x7f020001
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.content.res.Resources.loadDrawable(Resources.java:1643)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.widget.ImageView.<init>(ImageView.java:138)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): ... 46 more
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): Caused by: java.io.FileNotFoundException: res/drawable/divider_horizontal_dark.9.png
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.content.res.AssetManager.openNonAssetNative(Native Method)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.content.res.AssetManager.openNonAsset(AssetManager.java:417)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): at android.content.res.Resources.loadDrawable(Resources.java:1636)
12-12 22:55:25.212: ERROR/AndroidRuntime(11069): ... 48 more
解决方案
Here is similar problem with a bit of useful info, might be that helps - android app working on simulator but not on phone.