Caused by: java.lang.ClassNotFoundException[android的终极解决错误]
from:http://blog.csdn.net/changemyself/article/details/7861525
08-13 18:29:22.924: E/AndroidRuntime(1875): Caused by: java.lang.ClassNotFoundException:XXXXX in loader dalvik.system.PathClassLoader[/data/app/XXXX.apk]
我想大家经常因为疏忽出现ClassNotFoundException的异常,这个异常在android开发中无非就是告诉你类没有找到,那么什么原因导致没找到呢?
其实一般分为2种情况:
1、启动activity的时候,在AndroidManifest.xml 可能压根你就忘了添加一个activity,或者说activity的包名或者名字写错了,这个犯错几率很高的
2、你的使用的class,是一个外部的JAR包,当在工程中编译使用时,发布成APK并没有包含JAR文件,所以APK在执行的时候就找不到JAR文件,会报错。
所以一定在“Order and Export”里,勾选使用的jar包。切记!

Caused by: java.lang.ClassNotFoundException[android的终极解决错误]的更多相关文章
- Caused by: java.lang.ClassNotFoundException: Cannot find class解决办法
mapper.xml中resultMap导致的.
- android 自定义View Caused by: java.lang.ClassNotFoundException: Didn't find class
在android studio中, 自定义View 时,出现 Caused by: java.lang.ClassNotFoundException: Didn't find class 在查看包名和 ...
- Android开发之viewpager导报错误解决方法:错误代码 Caused by: java.lang.ClassNotFoundException: Didn't find class
作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985 Caused by: java.lang.ClassNotFoundException: Didn't ...
- android报错——java.lang.ClassNotFoundException[android]
E/AndroidRuntime(1875): Caused by: java.lang.ClassNotFoundException:XXXXX in loader dalvik.system ...
- 07-09 07:28:38.350: E/AndroidRuntime(1437): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.googleplay.ui.activity.MainActivity" on path: DexPathList[[zip file "/data/app/c
一运行,加载mainActivity就报错 布局文件乱写一通,然后急着运行,报莫名其妙的错误: 07-09 07:28:38.350: E/AndroidRuntime(1437): Caused b ...
- 项目报错:Caused by: java.lang.ClassNotFoundException: Didn't find class "..."on path: DexPathList
项目报错: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.eshore.njb.MyApplicat ...
- ShareEntryActivity java.lang.ClassNotFoundException | Android类找不到问题
错误堆栈: Process: com.mci.smagazine, PID: 23265 java.lang.RuntimeException: Unable to instantiate activ ...
- 【异常】Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException
Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationException ...
- Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
1.错误叙述性说明 警告: Could not create JarEntryRevision for [jar:file:/D:/MyEclipse/apache-tomcat-7.0.53/web ...
随机推荐
- HDU 4946 Area of Mushroom 共线凸包
题意是在二维平面上 给定n个人 每一个人的坐标和移动速度v 若对于某个点,仅仅有 x 能最先到达(即没有人能比x先到这个点或者同一时候到这个点) 则这个点称作被x占有 若有人能占有无穷大的面积 则输出 ...
- express 设置header解决跨域问题
//设置跨域访问 app.all('*', function(req, res, next) { res.header("Access-Control-Allow-Origin", ...
- Mysql主从同步(1)-主从/主主环境部署梳理
转 :https://www.cnblogs.com/kevingrace/p/6256603.html
- 安装vim 出现 terminal libary 错误,解决方法
通过源码安装vim时,提示缺少terminal libary 而在安装ncurses以后,此问题照样出现. 经过查找资料发现.运行例如以下命令就能够正常安装vim <pre name=" ...
- CWidgetMgr---cpp
#include "WidgetMgr.h" #include "XWidget.h" #include "Config.h" #inclu ...
- maven中配置jdk版本
1 maven 中配置 <build> <plugins> <plugin> <groupId>org.apache.maven.plugins< ...
- ios界面跳转
import Foundationimport UIKit class MyViewController: UIViewController{ // var window: UIWindow? ove ...
- java服务端json结果集传值给前端的数据输出格式
在服务端输出json数据时按照一定的格式输出时间字段,fastjson支持两种方式:1.使用JSON.toJSONStringWithDateFormat方法2.JSON.toJSONString方法 ...
- HTTP Header Accept-Language的ctf
题目也不知道该怎么取,但是是实在的一个案例.分享给大家. 种族歧视分值: 300 小明同学今天访问了一个网站,竟然不允许中国人访问!太坑了,于是小明同学决心一定要进去一探究竟! 发现accept-L ...
- Odoo ParseError:"decoder jpeg not available" while parsing....
The reason causing this problem is the plugin PIL install error to solve this problem,try this: 1. c ...