views:

255

answers:

2

I'm trying to reproduce the tabwidget example (http://developer.android.com/resources/tutorials/views/hello-tabwidget.html). I'm not really sure what's the problem, I got no errors while compiling, but i cannot see the application on the emulators screen.

It would be excellent if maybe anyone could have a look at my classes and tell me what's my mistake? I've packed my project here: http://etanto.com/TabTest.zip

here's the console dump while the run:

[2010-06-10 09:18:34 - TabTest] Launching a new emulator with Virtual Device 'Virtual1'
[2010-06-10 09:18:35 - TabTest] New emulator found: emulator-5554
[2010-06-10 09:18:35 - TabTest] Waiting for HOME ('android.process.acore') to be launched...
[2010-06-10 09:19:05 - TabTest] WARNING: Application does not specify an API level requirement!
[2010-06-10 09:19:05 - TabTest] Device API version is 8 (Android 2.2)
[2010-06-10 09:19:05 - TabTest] HOME is up on device 'emulator-5554'
[2010-06-10 09:19:05 - TabTest] Uploading TabTest.apk onto device 'emulator-5554'
[2010-06-10 09:19:05 - TabTest] Installing TabTest.apk...
[2010-06-10 09:19:22 - TabTest] Success!
[2010-06-10 09:19:22 - TabTest] \TabTest\bin\TabTest.apk installed on device
[2010-06-10 09:19:22 - TabTest] Done!

+1  A: 

Hi,

try to add the following to your manifest:

<activity ......>
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>

This will declare the activity as "main" activity if app is started...

Otherwise you could try to specify an api level in your manifest.

I didn't read all the code, but if there are no compilation problems, the activity should be started anyway(if manifest is ok)...

poeschlorn
ok great, one step ahead. with the changed manifest i'm getting now an popup on simulator which says: the app TabTest (process com.etanot.tabtest) has stopped unexpectedly. please try againobviously i have another problem in my classes which i do not see...compiling has no errors, i've got no idea :(
michbeck
alright, I see another thing...in you <activity android:name="..." ...> you have to declare your class in given package like android:name=".TabTest"
poeschlorn
oh you're right, lost the dot while my last change. manifest should be right now, but the error is still the same..i do not undestand whats the problem :(( <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".TabTest" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
michbeck
can you just upload your current project again, please?
poeschlorn
http://www.etanto.com/TabTest2.zipthank you very much for your help, awesome :-)
michbeck
Hi, at first glance I don't see an error...can you please post, what logcat says?
poeschlorn
here's what logcat says:06-10 10:12:44.134: WARN/ActivityManager(59): Activity idle timeout for HistoryRecord{43e8f718 com.gamestar.tabtest/.TabTest}06-10 10:12:49.225: DEBUG/dalvikvm(115): GC_EXPLICIT freed 779 objects / 42704 bytes in 87ms06-10 10:13:05.838: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
michbeck
ah, you also have to declare every activity in your manifest like this:<activity android:name=".SongsActivity" android:label="@string/app_name"> </activity>
poeschlorn
hallelujah, it works :-)thank you so much and sorry for the mess, have a nice daymichbeck
michbeck
A: 

thanks a lot, this was really helpful for me

alba