我正在使用我的HTC Desire Z在Eclipse中进行Android项目和调试/测试.当我开始收到此错误时,我正在为我的应用程序构建一个菜单,这使我无法继续.很多人都有这个错误,但我找到的解决方案都没有对我有用.我尝试清理并重建项目,手动从手机中卸载应用程序,并在清单文件中重命名域.对于使用模拟器的人,他们谈到了删除数据文件,但我不确定在使用真实手机时这会转化为什么.
这是我尝试构建时的控制台:
[2011-08-09 06:57:13 - GreenThumbs] Android Launch!
[2011-08-09 06:57:13 - GreenThumbs] adb is running normally.
[2011-08-09 06:57:13 - GreenThumbs] Performing com.hernblog.GreenThumbs.GreenThumbs activity launch
[2011-08-09 06:57:13 - GreenThumbs] Automatic Target Mode: using device 'HT0ANRV03417'
[2011-08-09 06:57:13 - GreenThumbs] Uploading GreenThumbs.apk onto device 'HT0ANRV03417'
[2011-08-09 06:57:13 - GreenThumbs] Installing GreenThumbs.apk...
[2011-08-09 06:57:16 - GreenThumbs] Success!
[2011-08-09 06:57:17 - GreenThumbs] Starting activity com.hernblog.GreenThumbs.GreenThumbs on device HT0ANRV03417
[2011-08-09 06:57:19 - GreenThumbs] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2011-08-09 06:57:22 - GreenThumbs] Starting activity com.hernblog.GreenThumbs.GreenThumbs on device HT0ANRV03417
[2011-08-09 06:57:23 - GreenThumbs] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2011-08-09 06:57:23 - GreenThumbs] ActivityManager: Error: Activity class {com.hernblog.GreenThumbs/com.hernblog.GreenThumbs.GreenThumbs} does not exist.
[2011-08-09 06:57:26 - GreenThumbs] Starting activity com.hernblog.GreenThumbs.GreenThumbs on device HT0ANRV03417
[2011-08-09 06:57:27 - GreenThumbs] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2011-08-09 06:57:30 - GreenThumbs] Starting activity com.hernblog.GreenThumbs.GreenThumbs on device HT0ANRV03417
[2011-08-09 06:57:30 - GreenThumbs] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2011-08-09 06:57:33 - GreenThumbs] Starting activity com.hernblog.GreenThumbs.GreenThumbs on device HT0ANRV03417
[2011-08-09 06:57:34 - GreenThumbs] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hernblog.GreenThumbs/.GreenThumbs }
[2011-08-09 06:57:34 - GreenThumbs] ActivityManager: Error type 3
[2011-08-09 06:57:34 - GreenThumbs] ActivityManager: Error: Activity class {com.hernblog.GreenThumbs/com.hernblog.GreenThumbs.GreenThumbs} does not exist.
Run Code Online (Sandbox Code Playgroud)
这是我的清单文件:
?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hernblog.GreenThumbs"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<application>
<uses-library android:name="android.test.runner" />
</application>
<instrumentation android:name="android.test.InstrumentationTestRunner"
android:targetPackage="com.hernblog.Green.Thumbs" android:label="GreenThumbs Tests" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name="GreenThumbs"
android:label="@string/app_name"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
有想法该怎么解决这个吗?
小智 42
在更改我的应用程序的软件包名称(为Android Market准备它)后,我也立即遇到了这个问题.在Eclipse中执行Project> Clean ...,然后关闭Build-Automatically,这样就可以Build-All.
重命名我的项目包后,我收到此错误.我通过在Eclipse中干净来修复它.然后完全重建.之后按F11在设备上启动了应用程序.(我之前也从设备上卸载了应用程序,但我认为这不是问题).
我设法通过一些神奇的步骤组合解决了这个问题。我做了上面答案中提到的许多事情,但我认为当我更新到新版本的 Android 时,重大修复发生了。
谢谢你们的帮助。对于如何解决这个问题没有明确的答案,我深表歉意。
| 归档时间: |
|
| 查看次数: |
18311 次 |
| 最近记录: |