Hikmat Khan
Hikmat Khan

Reputation: 6434

could not find the *.apk Error

[2011-06-22 23:55:09 - main] Android Launch!
[2011-06-22 23:55:09 - main] adb is running normally.
[2011-06-22 23:55:09 - main] Could not find main.apk!

I am new to Android development and stuck in a very strange error. When I compile my Android application I get the above error. While before yesterday the application work nicely.

Thanks in advance.

Upvotes: 8

Views: 8433

Answers (5)

m01
m01

Reputation: 9385

I hit this issue because I had accidentally made the project a library, by ticking the Is library checkbox @ <your project>->right click->Properties->Android

Upvotes: 7

Sam Williams
Sam Williams

Reputation: 625

I've been having the same problem. It turns out that when you build your Android project Eclipse doesn't warn you if you don't have the Android SDK Build-tools installed - it just fails silently.

To further add to the problem, when I checked for updates in Eclipse (as many people had suggested) it opened the Android SDK Manager for me, but it didn't show the Android SDK Build-tools in the list!

However, if you open Eclipse and go to "Window->Android SDK Manager" then it will open the manager and should show that the Android SDK Build-tools are not installed.

Installing the Android SDK Build-tools and updating the other packages fixed the problem for me. You may want to clean and rebuild all of your projects after the install.

Hope that helps!

Upvotes: 5

Roshan
Roshan

Reputation: 61

Faced same problem, and could able to resolve by right clicking the project and then selecting Android Tools -> Fix Project properties and do a clean build. This answer may be come too late for this post but it could help others.

Upvotes: 6

Ungureanu Liviu
Ungureanu Liviu

Reputation: 4124

The reason for this problem could be that you removed/renamed the main.apk file from /bin folder from your project folder. In this case, just make a small change on your code and compile again. A new .apk will be generated.

Upvotes: 1

Sarmad
Sarmad

Reputation: 389

It happens when your build contains compile time error because .apk file is made after successful compilation

Upvotes: 0

Related Questions