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 ...
随机推荐
- struts2 转发、重定向概述
转发等参数传递的注解方式: @Action(value = "operatorRoleAction", results = { @Result(name = "view& ...
- resharper警告 :linq replace with single call to FirstOrDefault
使用resharper时对linq使用的FirstOrDefault 一直产生一个警告,
- unity, Rigidbody.constraints
一,同时施加多个限制: 用按位或(bitwise OR)实现,例如: GetComponent<Rigidbody>().constraints=RigidbodyConstraints. ...
- MySQL存储过程使用实例详解
本文介绍关于在MySQL存储过程游标使用实例,包括简单游标使用与游标循环跳出等方法 例1.一个简单存储过程游标实例 DROP PROCEDURE IF EXISTS getUserInfo $$CRE ...
- **alon_MM DMA Interface for PCIe使用详解
在所从事的项目中需要用到PCIE和DMA,经过再三研究,反复查看相关资料,终于弄懂了**alon_MM DMA Interface for PCIe的使用方法. PCIE在fpga和上位机之间起着中间 ...
- android.view.animation(2) - 插值器Interpolator
public interface Interpolator implements TimeInterpolator android.view.animation.Interpolator Known ...
- HotSpot模板解释器目标代码生成过程源码分析
虽然说解释执行模式是逐字逐句翻译给目标平台运行的,但这样的过程未免太过缓慢,如果能把字节码说的话做成纸条,运行时只要把对应的纸条交给目标平台就可以了,这样,执行速度就会明显提升.JVM的Hotspot ...
- 每日英语:The Upside of Favoritism
As the head of the entertainment division of a major public-relations firm in New York, Janelle was ...
- Git代码仓库的建立流程
Git作为现在比较流行的版本管理工具,其配置非常简单.方便. 下面举一个简单例子,说明如何在服务器上建立一个公共的git代码仓库. 1.确保服务器上已经打开ssh服务,可以用ps -e | grep ...
- 延时NSTimer
import Foundationimport UIKit class YijfkController:UIViewController{ override func viewDidLoad() { ...