2010-07-15 5 views
0

Je rencontre des problèmes avec obtenir mon application pour fonctionner sur android 1.5. Il fonctionne très bien en 1.6, 2.1 et 2.2, mais chaque fois que je tente de l'exécuter en 1.5, je reçois une force immédiate étroite avec la sortie LogCat:Android 1.5 erreur spécifique

java.lang.RuntimeException: Unable to start activity 
ComponentInfo{com.qrohlf.activites/com.qrohlf.activites.BookmarkHistoryTabActivity}: 
android.view.InflateException: Binary XML file line #2: Error inflating class 
java.lang.reflect.Constructor 

Cela me semble très étrange, comme la ligne # 2 ma mise en page XML est juste

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 

Des idées? Y a-t-il des changements d'API majeurs entre 1.5 et 1.6 dans la façon dont les XML de mise en page sont faits que je manque? (j'ai inclus le reste de ma mise en page XML ci-dessous pour référence)

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent"> 
    <include android:id="@+id/custom_titlebar" layout="@layout/custom_titlebar" /> 
    <ViewFlipper android:id="@+id/frame_content" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:layout_weight="1" > 
     <ListView android:id="@+id/soccerteams_listview" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:background="#FFFFFFFF"/> 
     <ListView android:id="@+id/countries_listview" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      android:background="#FFFFFFFF"/> 
    </ViewFlipper> 
    <LinearLayout 
     android:orientation="horizontal" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:gravity="center_horizontal" 
     android:background="@android:color/black" 
     android:padding="0px"> 
     <Button android:id="@+id/bookmarks_button" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="@string/bookmarks" 
      android:textColor="@android:color/primary_text_dark" 
      android:drawableTop="@drawable/ic_bookmark_tab" 
      android:background="@drawable/tab_background" 
      android:layout_weight="1"/> 
     <Button android:id="@+id/history_button" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:text="@string/history" 
      android:textColor="@android:color/primary_text_dark" 
      android:drawableTop="@drawable/ic_history_tab" 
      android:background="@drawable/tab_background" 
      android:layout_weight="1"/> 
    </LinearLayout> 
</LinearLayout> 
+0

Je pense que le problème doit être dans l'include , postez aussi cette mise en page =), mais Romain dit Trace :) – Jorgesys

+0

Veuillez publier la trace complète de la pile. –

Répondre

2

S'il vous plaît vous assurer al nécessaire dessinables dans le répertoire « drawable ». 1.5 ne comprend pas le répertoire "drawable-hdpi" et d'autres, il ne sait que "drawable".

+0

Merci - compris moi-même après un peu de temps, mais c'était le problème. – QRohlf

Questions connexes