android.view.InflateException ONLY in android 1.5

by QR » Fri, 16 Jul 2010 06:28:34 GMT


Sponsored Links
 ello,
I am having trouble with with getting my application to function
on android 1.5. It works fine in 1.6, 2.1, and 2.2 but whenever I
attempt to run it in 1.5, I get an immediate force close with the
LogCat output: "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"

This strikes me as very odd, as line #2 of my layout XML is just
"<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android""

Any ideas? Is there some major API change between 1.5 and 1.6 in the
way layout XMLs are done that I'm missing?
(I've included the rest of my layout xml below for reference)

<?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"
android:inAnimation="@anim/slide_in_right"
android:outAnimation="@anim/slide_out_right"/>
<ListView android:id="@+id/countries_listview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#FFFFFFFF"
android:inAnimation="@anim/slide_in_left"
android:outAnimation="@anim/slide_out_left" />
</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/hi



Other Threads

1. How to manage free/paying versions ?

Hi,

I'd like to provide a free and non free versions of my application.
The non-free version, will have additional/optional feature.
But the free version will be fully usable (good idea ?)

In 'traditionnal' java/jar delivery,  I manage that by removing
some .class (only present to check the version, no functional job in
them !), and checking before using a feature, if those classes exiss
(can be loaded using 'cutsom' class loader).

Is it possible to remove a .class from a .dex , and have the
application still runing ?
Is it possible to have custom Classloader in Android ?

How will all of you manage differents versions (demo, free, paying) ?

Thanks for ideas.
--~--~---------~--~----~------------~-------~--~----~

2. Bug on onTabChanged(String tabId) ?

When I clciked on the first Tab, the tabId passed into onTabChanged is
always null. Anyone faced same problem? Known bug? or It is my code's
problem?

Code:
      TabHost.TabSpec tab1 = tabs.newTabSpec("text");
        tab1.setContent(R.id.text_input);
        tab1.setIndicator("text",
this.getResources().getDrawable(R.drawable.pencil));
        tabs.addTab(tab1);
       TabHost.TabSpec tab2 = tabs.newTabSpec("image");
   tab2.setContent(R.id.picture_input);
 
tab2.setIndicator("image",this.getResources().getDrawable(R.drawable.camera));
        tabs.addTab(tab2);
        tabs.setOnTabChangedListener(new TabChanged());

class TabChanged implements TabHost.OnTabChangeListener
            {
                 public void onTabChanged(String arg0)
                 {
                         saveOldTabInfo();
                         populateTabInfo(arg0);
                }
            }

--~--~---------~--~----~------------~-------~--~----~

3. Exception on database query - table is empty / orderBy is not null

4. Exception on database query - table is empty / orderBy is not null

5. Discovering Views

6. LaTex on ANDROID

7. Where to start with this...