Didn't find class "com.mobovip.bgr.MainActivity" on path
来源:互联网 发布:玻璃深加工软件 编辑:程序博客网 时间:2024/06/03 13:37
http://gundumw100.iteye.com/blog/2096013
一个工程,本来运行是正常的,我想把它移植到另一台PC上,结果报:
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mobovip.bgr/com.mobovip.bgr.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.mobovip.bgr.MainActivity" on path: DexPathList[[zip file "/data/app/com.mobovip.bgr-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.mobovip.bgr-1, /vendor/lib, /system/lib]]
这个问题出现的情况基本有那么几种:
1。Manifest文件中注册的Activity的名称,有没有写错,包名有没有搞错,有些网友,可能只写一个类名,前面用点号代替,但是这个类不在默认的包内,所以报这个错,那么只要写上类的全名,即可。(这个应该很容易检查)
2。有些android,需要一些第三方的包,直接将其引入,在以前是可以的,但是在最新的adt中不行,必须在程序中新建一个libs文件夹,将第三方的jar文件copy到libs文件夹中,才行,很多人因为这样才报错,特别是以前的项目,默认并没有这个libs文件夹,但是新版本的adt,默认就建了libs这个文件夹。(我的问题就出现在这点上,我安装了最新的ADT,虽然在程序中新建了libs文件夹,但有些jar包并没有放在libs中。但是我就奇怪,为什么引用其他文件夹中的jar包不可以?以前可以现在不可以,google疯了?)
3。有一点也很重要,在Java Build Path面板下的Order and Export中,一定要把你引入的jar文件,勾上,否则,跟没引用一样,切记。(这个应该关系不大)
0 0
- Didn't find class "com.mobovip.bgr.MainActivity" on path
- Android报Didn't find class "com。。。MainActivity" on path: DexPathList错误
- eclipse with android : Didn't find class "com.xx.xx.MainActivity" on path: DexPathList
- java.lang.ClassNotFoundException: Didn't find class "stu.love.neihan.MainActivity" on path: DexPathL
- Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.xxxxx.MainActivity" on p
- java.lang.ClassNotFoundException: Didn't find class "com.kge.love.base.BaseApplication" on path: Dex
- didn't find class on path dexpathlist错误解决办法
- didn't find class on path dexpathli解决方案
- ClassNotFoundException: Didn't find class "...Activity" on path: DexPathList
- 报ClassNotFoundException: Didn't find class "...Activity" on path: DexPathList
- Android 异常 Didn't find class .... on path: DexPathList[[z
- Didn't find class "...l" on path: DexPathList
- Didn't find class on path dexpathlist 错误
- ClassNotFoundException: Didn't find class on path: DexPathList
- 报ClassNotFoundException: Didn't find class "...Activity" on path: DexPathList
- didn't find class on path dexpathlist错误解决办法
- Didn't find class "org.litepal.LitePalApplication" on path
- Android studio issue: Didn't find class "..." on path:DexPathList
- leetcode_remove element
- Android官方技术文档翻译——Apk 拆分机制
- DDR2 说明书部分翻译
- UVA-272 TEX Quotes
- Android post请求
- Didn't find class "com.mobovip.bgr.MainActivity" on path
- 十一月总结
- Java工厂模式 工厂方法模式 抽象工厂
- 编程语言的演化
- 如何开始学习高伸缩性编程
- 信号与系统推荐书籍
- 子串/子段问题总结
- Maven构建SpringMVC+Mybatis+druid+rest
- 鸟哥私房菜实践(1)- ACL