Android的SDK R17废墟的工作项目 [英] Android-SDK r17 ruins working projects

查看:128
本文介绍了Android的SDK R17废墟的工作项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经更新了我的Andr​​oid的SDK包从R16到R17。我已经更新了Eclipse ADT-插件了。
我的项目完全正常工作与R16(Android的SDK R16和Eclipse ADT插件V16),但现在的应用程序无法启动: 类加载器找不到MainActivity。该MainActivity是第一个活动,启动(这是在AndroidManifest正确声明)。

I have updated my android-sdk-package from r16 to r17. I have updated the Eclipse ADT-Plugin too.
My project worked perfectly fine with r16 (android-sdk r16 and Eclipse ADT Plugin v16), but now the app does not start: The Classloader can not find the MainActivity. The MainActivity is the first activity, that starts (it is properly declared in the AndroidManifest).


03-22 15:07:28.984: E/AndroidRuntime(22106): Caused by: java.lang.ClassNotFoundException: my.....MainActivity
03-22 15:07:28.984: E/AndroidRuntime(22106):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
03-22 15:07:28.984: E/AndroidRuntime(22106):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
03-22 15:07:28.984: E/AndroidRuntime(22106):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
03-22 15:07:28.984: E/AndroidRuntime(22106):    at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
03-22 15:07:28.984: E/AndroidRuntime(22106):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1871) 

该包的名称是100%正确的。我甚至检查了我的项目的标记版本(我有释放的项目,我总是标记我的版本)和tryed它:同样的结果 - 我已经试了一下(我用的Arch Linux):
- 删除Android的SDK + Android的SDK平台的工具(和重新安装)
- 删除整个Android的文件夹(/ OPT / Android的SDK),并重新安装包,下载目标平台
- 删除〜/ .android
- 删除〜/ .eclipse
- 重新安装的Eclipse ADT-插件
- 重新创建虚拟设备
- 创建一个新项目的(新项目工程)
- 解包的.apk文件,并查看编译的类与dexdump:将APK文件包含MainActivity
- 我读了Android的SDK-发行,票据的东西有关,但我没有发现任何东西
- 当然,重建项目(清洁+版本,我甚至手动删除的bin文件夹)

The package name is 100% right. I even checked out a tagged version of my project (I have release the project and I always tag my versions) and tryed it: same result.
What I have already tried (I use Arch Linux):
- delete android-sdk + android-sdk-platform-tools (and reinstall them)
- delete the entire android-folder (/opt/android-sdk) and reinstall the packages, download the target platform
- delete ~/.android
- delete ~/.eclipse
- reinstall Eclipse ADT-Plugin
- recreate Virtual Devices
- create a new project (the new project works)
- unpack the .apk-file and view the compiled classes with dexdump: the apk-file contains the MainActivity
- I read the Android-SDK-Release-Notes for something related, but I didn't find anything
- And of course, rebuild the project (clean + build, I even manually deleted the bin-folder)

这果然奏效的唯一的事情是在我的笔记本(还是Android的SDK R16)开关。
所以......我究竟做错了什么?这也可能是一些简单的...

The only thing that really worked was to switch on my notebook (still android-sdk r16).
So... what am I doing wrong? It's probably something simple...

谢谢!

推荐答案

由于有报道<一href="http://xrigau.word$p$pss.com/2012/03/22/fix-some-problems-with-libraries-in-the-adt-17-plugin-10/">here和其他地方,你需要确保任何第三方的JAR您在用活库/ ,无论是在您的项目,任何依赖库项目。尝试,看看它是否会有所帮助。

As has been reported here and elsewhere, you need to ensure that any third-party JARs you are using live in libs/, both in your project and in any dependent library projects. Try that and see if it helps.

这篇关于Android的SDK R17废墟的工作项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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