我正在尝试重现 tabwidget 示例 ( http://developer.android.com/resources/tutorials/views/hello-tabwidget.html )。我不太确定问题出在哪里,编译时没有出现错误,但我在模拟器屏幕上看不到应用程序。
如果有人能看看我的类(class)并告诉我我的错误是什么,那就太好了?我在这里打包了我的项目:http://etanto.com/TabTest.zip
这是运行时的控制台转储:
[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!
最佳答案
尝试将以下内容添加到您的 list 中:
<activity ......>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
如果应用程序启动,这会将 Activity 声明为“主要” Activity ...
否则您可以尝试在您的 list 中指定一个 api 级别。
我没有阅读所有代码,但如果没有编译问题,无论如何都应该启动 Activity (如果 list 没问题)...
关于android - 选项卡小部件示例未运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3012443/