"Could not find the XXX.apk" message in console while starting application with an Android lib linked
Asked Answered
A

5

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

Athletics answered 7/4, 2011 at 11:52 Comment(4)
is XXX.apk your application? or do you mean the library?Hagfish
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 appAthletics
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 "<Class> not found" or something similar.Hagfish
That's what I'm wondering about as wellAthletics
L
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.

Lapith answered 24/5, 2011 at 23:45 Comment(4)
Yes! Thank you, removing the library from Java Build Path solved the problemAthletics
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.Turnaround
After I remove the library from build path, I cannot compile the project anymore... How to solve this problem?Thalassic
@Anson Yao, AFAIK that is covered by the second half of the answer.Lapith
W
6

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

Wintergreen answered 18/1, 2014 at 9:13 Comment(0)
W
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.

Wilonah answered 5/10, 2014 at 8:26 Comment(0)
C
1

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

Cassaba answered 18/4, 2014 at 6:26 Comment(0)
W
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.

Whole answered 17/6, 2013 at 15:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.