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 ...
随机推荐
- git的常见操作方法
GIT操作方法 http://git.oschina.net/ g进入https://git-for-windows.github.io/下载安装 g启动命令窗口输入以下内容 git config - ...
- EF4
http://www.cnblogs.com/xray2005/category/189491.html http://kb.cnblogs.com/zt/ef/ http://www.cnblogs ...
- php AES加密解密的例子
一共有两个文件:AES.php(aes算法类文件)和aesDemo.php(应用实例文件) aesDemo.php:例子, <?php require_once('./AES.php'); // ...
- jquery判断元素的子元素是否存在
jquery判断元素的子元素是否存在的示例代码. jquery判断子元素是否存在 一.判断子元素是否存在 //一级子元素 if($("#specialId>img").len ...
- Atitit.解决org.hibernate.DuplicateMappingException: Duplicate class/entity mapping
Atitit.解决org.hibernate.DuplicateMappingException: Duplicate class/entity mapping 1. 排除流程::: @Depreca ...
- 关于linux下配置python3的virtualenvwrapper
python版本管理&virtualenv管理 virtualenvwrapper是用来管理virtualenv的扩展包,用着很方便. 注意,在python3中,pip的安装:sudo apt ...
- [转] James A. whittaker:经营成功的测试生涯
James A. whittaker:经营成功的测试生涯 2015-05-13 James Whittaker James Whittaker is an energetic and passiona ...
- filebeat+kafka失败
filebeat端配置 #----------------------------- Kafka output -------------------------------- output.kafk ...
- [Application]Ctrl+C终止程序代码
代码如下: #include <stdio.h> #include <stdlib.h> #include <iostream> #include <sign ...
- Could not contact Selenium Server; have you started it on 'localhost:4444'
今天学习selenium RC例子的时候遇到一个问题:java.lang.RuntimeException: Could not contact Selenium Server; have you s ...