使用eclipse写好Android的代码,代码没有报错。想在AVD中运行测试时,总是会弹出错误框,提示信息为:
“Your project contains error(s),please fix them before running your application.”
不管是重启AVD 重启eclipse 甚至创建一个新的Android工程项目都不能运行
上网查找原因,有几种可能:
1.在不同的电脑下开发,而且文件存放路径不同,错误的主要原因是 “.classpath” 文件的载三方类库包路径错误。
2.也可能是你的SDK版本不存在或者没有。
3.编译的class、apk文件有问题:执行清除一下就可以了。Project→Clean→Clena Projects Selected Below 选择你出错的项目就可以了。
4.有可能就是最重要的这一点:
在Program提示框中会提示:
“Error generating final archive: Debug Certificate expired on 12-7-25 下午7:52”
原因分析:
android要求所有的程序必须有签名,否则就不会安装该程序。在我们开发过程中,adt使用debug keystore,在 preference->android->buid中设置。debug的keystore默认有效期为一年,如果你是从一年前开始完android程序,那么在一年后导入这个app的时候很可能出现debug keystore过期,导致你无法生成apk文件。
此时你只要删除debug keystore就行,系统又会为你生成有效期为一年的私钥。
解决方法:
进入C:\Documents and Settings\Administrator\.android 删除路径下的debug.keystore及ddms.cfg。
(不同环境下的目录可能略有不同,可在eclipse中查找此路径:Window->Preferences->Android->Build下 Default debug keystore)
我出错的原因是第4种,我直接删除了.android 文件,成功解决问题
分享到:
相关推荐
This project contains sample applications for SAP Cloud Ap
Sync Project with gradle files:对gradle文件之后,或刷新gradle配置时使用; Make project:只是对项目中新产生或修改过的文件进行一次编译,已经编译过了的就不会编译了,耗时相对较短; Clean Project :删除...
AndroidStudio使用过程中出现的异常 异常信息: Gradle sync failed: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an ...
android 4.0 Apidemos project
Android命令行开发环境搭建和HelloWorld完整的Project
The Android Developer's Cookbook Building Applications with the Android SDK and Source Project Code 源书(pdf)及源代码12章全都有(rar) Book Description Want to get started building applications for ...
《高等学校计算机科学与技术项目驱动案例实践规划教材:Android应用开发案例教程》应用“项目驱动(Project-Driven)”最新教学模式,通过完整的项目案例系统地介绍了使用Android技术设计与开发应用系统的理论和方法...
利用project设计的软件开发项目计划(甘特图).里面是一个真实的项目计划,而且基本包含了软件开发的各个部分.
解决AndroidStudio导入项目卡死在“building gradle project info”问题
Note: Note: Note: Note: If JDK is already installed on your development computer, please take a moment to make sure that it meets the version requirements listed above. In particular, note that some ...
Android-AndroidProject.zip,高级模板项目,安卓系统是谷歌在2008年设计和制造的。操作系统主要写在爪哇,C和C 的核心组件。它是在linux内核之上构建的,具有安全性优势。
Android项目框架基本功能封装,拿来就能用。。。
A Git client for Android. This project is no longer being maintained. Further development on this app is now being done in the MGit project. Please submit all PRs and issues there. Notes All ...
Absolute Beginner's Guide to Project Management will show you exactly where to start–and walk you step by step through your entire project! Expert project manager Gregory Horine shows you exactly ...
101 Project Management Problems and How to Solve Them
Using Project Kotlin for Android
《Android应用开发案例教程(高等学校计算机科学与技术项目驱动案例实践规划教材)》应用“项目驱动(project-driven) ”最新教学模式,通过完整的项目案例系统地介绍了使用android技术设计与开发应用系统的理论和方法...
Android Open Project: What is Android? What is Open Handset Alliance? Update history of Android Android Architecture Android Source Code What can we do in Android?
You'll learn how to define your team's, group's, or department's mission with none of the buzzwords that normally accompany a mission statement. Armed with the work and the mission, you can make those...