找不到actionbarsherlock.apk [英] Could not find actionbarsherlock.apk

查看:260
本文介绍了找不到actionbarsherlock.apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图从Eclipse的一个真实的设备上运行我的应用程序。添加actionbarsherlock作为参考,我无法摆脱这种错误的:找不到actionbarsherlock.apk 。下面是完整的控制台输出:

I'm trying to run my app on a real device from Eclipse. After adding actionbarsherlock as a reference, I can't get rid of this error: Could not find actionbarsherlock.apk. Here is the full console output:

[2013-05-24 16:10:14 - MyApp] ------------------------------
[2013-05-24 16:10:14 - MyApp] Android Launch!
[2013-05-24 16:10:14 - MyApp] adb is running normally.
[2013-05-24 16:10:14 - MyApp] Performing com.myapp.activities.StopSelection activity launch
[2013-05-24 16:11:26 - MyApp] Uploading MyApp.apk onto device '0A3AA80D1402500E'
[2013-05-24 16:11:26 - MyApp] Installing MyApp.apk...
[2013-05-24 16:11:33 - MyApp] Success!
[2013-05-24 16:11:34 - actionbarsherlock] Could not find actionbarsherlock.apk!
[2013-05-24 16:11:34 - MyApp] Starting activity com.myApp.activities.StopSelection on device 0A3AA80D1402500E
[2013-05-24 16:11:35 - Tahanot] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.tahanot/.activities.StopSelection }

活动并没有真正启动,并有一个错误在LogCat中:

The activity doesn't really start, and there's an error in LogCat:

FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.myApp/com.myApp.activities.StopSelection}: java.lang.ClassNotFoundException: com.myApp.activities.StopSelection in loader dalvik.system.PathClassLoader[/data/app/com.myApp-2.apk]
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1618)
    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1716)
    at android.app.ActivityThread.access$1500(ActivityThread.java:124)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:968)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:130)
    at android.app.ActivityThread.main(ActivityThread.java:3806)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.myApp.activities.StopSelection in loader dalvik.system.PathClassLoader[/data/app/com.myApp-2.apk]
    at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1610)
    ... 11 more

没有答案在这里帮助:<一href="http://stackoverflow.com/questions/9805449/android-launch-from-eclipse-not-working-properly-without-error-message">android从Eclipse启动不正常,没有错误消息

推荐答案

这可能发生,如果你不出口的构建路径 - > Android的私人图书馆从资料库中的项目。这是新的东西,你必须从ADTv22并起来做。

This can happen if you are not exporting Build Path -> Android Private Libraries from your library project. This is something new that you have to do from ADTv22 and up.

另外从控制台输出,我看到该应用程序试图上传的APK的图书馆。如果你还没有把库中的Andr​​oid正常可能发生这种情况。因此,这里有几个简单的步骤:

Also from your console output, i see that the app is trying to upload an apk for the library. This can happen if you have not added the library in android properly. So here are a few quick steps:

  1. 确保您的ABS的lib项目被标记为一个图书馆。 属性 - > Android的 - >检查是图书馆
  2. 确保,对于ABS的lib项目,Android的私人图书馆在检查构建路径 - >订单和出口。这一步是只需要ADTv22了起来。
  3. 在项目中添加了ABS的lib项目作为库位于属性 - > Android的 - >添加图书。不要在ABS的lib项目中添加作为构建路径自己一个项目的依赖,ADT解决那些因为它需要,否则通常抛出一个错误就像你看到的上面。
  1. Make sure your ABS lib project is marked as a Library. Properties -> Android -> Check "Is Library"
  2. Make sure that for the ABS lib project, Android Private Libraries is checked in Build Path -> Order and Export. This step is only required for ADTv22 and up.
  3. In your project add the ABS lib project as a library at Properties -> Android -> Add Library. Do not add the ABS lib project as a project dependency in the Build Path yourself, ADT resolves those as it requires, otherwise it generally throws an error like you see above.

希望这有助于你。

这篇关于找不到actionbarsherlock.apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆