Android APK 文件和 DEX 文件未创建,没有警告或错误
我开发Android已经有一段时间了,使用WIN7 64位和Eclipse。 由于我尝试安装新的 ADT(1.5),我遇到了一个非常奇怪的现象。我的构建未完成,并且未生成 APK 文件,也未生成 dex 文件。 类文件已创建,但没有其他任何内容。
此外,输出或 Eclipse 日志中都没有警告或错误。
该问题并没有立即出现,而是在 1 或 2 次良好构建之后才出现。 即使我创建一个简单的项目,也会发生同样的事情。
我在网上没有找到任何有用的东西。 我重新下载了Eclipse、SDK、ADT,然后重新开始,并得到了JRE7兼容性问题(功能...必须覆盖)。 我想我得到了 Java SE 更新,但丢失了旧的 JRE。所以我下载了 JRE6,更改了合规性问题,设置了它和环境,然后回到了方块 1 :)
构建过程开始,达到 50% 或 75%,突然停止,并且没有创建 apk 或 dex 文件。 即使对于新的空 helloWorld 项目也是如此。
有人可以帮忙吗?我不知道如何继续。
谢谢
I've developed Android for a while now, using WIN7 64bit and Eclipse.
Since I've tried to install the new ADT (1.5), I get a very weird phenomena. My build doesn't complete, and doesn't generate the APK file, nor the dex files.
the class files are created, but nothing else.
Also, there is no warning or error neither at the output or the Eclipse log.
The problem didn't occur immediately, but only after 1 or 2 good builds.
Even if I create a simple project, the same thing happens.
I didn't find anything useful on the net.
I've re-downloaded Eclipse, the SDK, ADT, and started all over again, and got the JRE7 compatibility issue (function ... must override).
I guess I got a Java SE update, and lost the old JRE. So I've downloaded JRE6, changed the compliance issue, and set it and the environment, and got back to square 1 :)
The build process starts, reaches 50% or 75%, suddenly stops, and no apk or dex files are created.
Even for new empty helloWorld projects.
Can someone please help? I have no idea how to proceed.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
“对于新的 ADT 插件,这是默认行为(以加快速度)
构建时间),以便不在每次构建时生成 .apk...”,如 groups.google 中所述:
请参阅 http://groups.google.com/group/android-developers/browse_thread/thread/769628c57caa51ad/4cb2c6589995a9a5?pli=1
您可以在 Eclipse 设置中启用自动 dex/apk 构建:
窗口->首选项->安卓->构建-> [] 跳过打包和删除...
// 在找到此解决方案之前我尝试重新安装所有内容...
"With the new ADT plugins, it is the default behavior (to speed up
build time) to not generate the .apk on every build..." as said in groups.google:
See http://groups.google.com/group/android-developers/browse_thread/thread/769628c57caa51ad/4cb2c6589995a9a5?pli=1
You can enable automatic dex/apk building in the Eclipse settings:
Window -> Preferences -> Android -> Build -> [] Skip packaging and dexing...
// I tried to reinstall everything before finding this solution....
您还可以简单地更改 jdk 版本,强制其重建:右键单击项目 ->属性-> Java 编译器 ->在右侧窗格中,单击“启用项目特定设置”复选框,然后选择编译器合规性级别:1.6 或当前以外的其他级别。
它将重建并重新生成 apk 和 dex 文件。 :)它至少对我有帮助。
you can also simply change the jdk version forcing it to rebuild: right click on project -> properties -> Java COmpiler -> on right side pane, click on check box for "Enable project specific settings", then select Compiler compliance level: 1.6 or something else than current.
It will rebuild and re-generate the apk and dex files. :) It helped me at least.
这个问题浪费了我很多时间,我收到以下错误
adb 运行正常。
找不到.apk!
我通过以下两个步骤解决了这个问题:
在 Eclipse >Windows>Preferences>Android>Build 中,取消选中“Skip Packaging and dexing ....”
在项目属性>Android中,我取消选中了isLibrary。
This problem wasted a lot of my time, I was getting the following error
adb is running normally.
Could not find .apk!
I got this fixed by following 2 steps:
In Eclipse >Windows>Preferences>Android>Build, uncheck "Skip packaging and dexing ...."
In the project properties>Android, I unchecked isLibrary.
只需在您的模拟器上运行它(右键单击您的项目 -> 运行方式 -> Android 应用程序),然后检查您的 bin 文件夹。
Just run it on your emulate (Right click your project -> Run As-> Android application) then check your bin folder.