开发者

Unable to run any Android project - could not find apk error message

开发者 https://www.devze.com 2023-04-06 20:53 出处:网络
I\'ve recently installed the Android SDK on Windows 7. I\'m editing using Eclipse. I have had no problems whatsoever on Windows XP previously, but for some reason nothing happens on Windows 7. I\'ve g

I've recently installed the Android SDK on Windows 7. I'm editing using Eclipse. I have had no problems whatsoever on Windows XP previously, but for some reason nothing happens on Windows 7. I've given as much detail as I can below:

So, when I try to 'run' my Android project I get this...

[2011-09-23 19:32:42 - hug] ------------------------------ [2011-09-23 19:32:42 - hug] Android Launch! [2011-09-23 19:32:42 - hug] adb is running normally. [2011-09-23 19:32:42 - hug] Could not find hug.apk!

And this is what my eclipse.ini looks like:

-vm C:\Java\jdk1.6.0_27\bin -startup plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 --launcher.XXMaxPermSize 256m -vmarg开发者_开发知识库s -Xms100m -Xmx512m -Dosgi.requiredJavaVersion=1.5 -Dosgi.bundlefile.limit=100

I've tried loads of different variations on the -vm variable for this file (i.e. adding javaw.exe to the end of it, just rooting it to the jdk etc.) Sometimes it won't open Eclipse at all, at other times it will open but I still can't launch a project.

When I right click on the project and try to Export Unsigned Application Package I get:

Conversion to Dalvik format failed with error 1 Conversion to Dalvik format failed with error 1

So, I'm pretty stumped. I can boot an emulator but I of course can't get a project onto that to play with it. Please help!

Thanks in advance!


I just answered a similar question here: could-not-find-the-apk-error

It may be due to the Android SDK Build-tools not being installed on your Windows 7 machine. If you open Eclipse and go to "Window->Android SDK Manager" then it will open the manager and you may see that the Android SDK Build-tools are not installed.

Installing the build tools and cleaning/rebuilding all of your projects may work.

Interestingly, I also get the same "Conversion to Dalvik format failed with error 1" error, but I think that's a separate issue to the "Could not find *.apk" one.


Check your Android SDK location in Window-->Preferences, Android tab

It must help you.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号