27

There's some weird problem with my workspace setup in Eclipse. I have one Android Library project and an application project which is linked to the library.

Everything works fine in compile-time and runtime, but whenever I start the app, I see this message in Eclipse console:

"Could not find XXX.apk!"

How can I eliminate it?

Thanks

Anton
  • 4,395
  • 7
  • 32
  • 46
  • is XXX.apk your application? or do you mean the library? – Rajath Apr 07 '11 at 12:12
  • Yep, that's the name of my library. It's correctly linked to the app, but I anyway see this message when I start the app – Anton Apr 07 '11 at 12:23
  • 1
    I'm wondering how it asks for an apk file. AFAIK, the library should be part of your app's apk, and the system should say " not found" or something similar. – Rajath Apr 07 '11 at 12:26
  • That's what I'm wondering about as well – Anton Apr 07 '11 at 14:11

5 Answers5

49

In this message from the Android developers group Lance Nanek is quoted as pointing out that having a "project dependency" in the Java Build Path section of an Android project causes this problem, if the depended project is an Android project.

So, go to Java Build Path > Projects and remove the incorrect project dependency (your Android library project.) Note that in the "Android" section of the project settings the Android library that you're dependent on must be listed in the ~"Libraries" box.

nmr
  • 16,625
  • 10
  • 53
  • 67
  • 1
    Yes! Thank you, removing the library from Java Build Path solved the problem – Anton May 25 '11 at 10:25
  • I have the same problem. I imported a library project and the apk went missing. When i go into Build Path_Configure Build Path and click the Projects tab, it's empty. In the Libraries there is Android 1.5, and if i delete it (my project used to have 2.1) there occur some problems. – erdomester Jun 01 '11 at 09:56
  • After I remove the library from build path, I cannot compile the project anymore... How to solve this problem? – Anson Yao Oct 31 '13 at 12:54
  • 3
    @Anson Yao, AFAIK that is covered by the second half of the answer. – nmr Oct 31 '13 at 17:10
6

Go to project properties ----> Android (Un check the ticked IsLibrary) ---> click "ok". Then run the application its working for me.

user3209435
  • 111
  • 2
  • 2
4

You have checked your project as library so by this reason it work as library and when you are going to run at that time it show this type of error. So, for solve this u have to first deselect that check box by going throw below path.

  1. Right click on project
  2. Select properties.
  3. Select android.
  4. And now uncheck "is library".
  5. Then apply.

Now that error will not show while you run your project.

Sameer Donga
  • 988
  • 9
  • 24
1

Go to project properties > Android . Here make sure the Project build target is selected/checked.

chandru
  • 11
  • 2
0

I removed the library reference from project properties-->Android (which was ticked IsLibrary) then immediately added it again (and is no longer ticked IsLibrary) and build and it worked for me.