2010-12-09 76 views
0

我開發了一款在模擬器上運行完美的應用程序,但是當我嘗試在手機上運行它時,應用程序錯誤地指出java.io.FileNotException:res/drawable/divider_horizo​​ntal_dark.9 .pngandroid無法解析PNG文件

我以爲應用程序丟失了這個文件(可能是android系統文件),所以我在網上的其他地方發現了這個文件,並將其放在drawable下但是徒勞。該應用程序仍然錯誤與以前相同的錯誤。

任何想法這裏的問題是什麼?

xml文件

<?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> 

和代碼的一部分,其中的應用程序崩潰時加載..你可以看到,有沒有在那裏我有使用的文件divider_horizo​​ntal_dark.9.png

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(); 
      } 
..... 

好像他們已經解決了該問題 http://code.google.com/p/transdroid/issues/detail?id=14

但我有點不明白它

+0

你是如何試圖打開它。我們應該如何幫助而不發佈一些代碼。 – Falmarri 2010-12-10 00:18:16

+0

我很抱歉,但我應該發佈什麼代碼部分...因爲我不是在任何地方調用該文件,你可以告訴我哪部分代碼你要我發帖 – 2010-12-10 14:48:21

回答