"Could not find the XXX.apk" message in console while starting application with an Android lib linked
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.
Eve开发者_高级运维rything 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
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.
Go to project properties ----> Android (Un check the ticked IsLibrary) ---> click "ok". Then run the application its working for me.
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.
- Right click on project
- Select properties.
- Select android.
- And now uncheck "is library".
- Then apply.
Now that error will not show while you run your project.
Go to project properties > Android . Here make sure the Project build target is selected/checked.
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.
精彩评论