I built my app using a library project (that I also created, to be reused in other apps). It builds fine, but when I try to install & run it through Eclipse (Ctrl+F11), I get this red Could not find MyLib.apk! error line in my console:
Console output:
[2013-11-30 14:42:59 - MyApp] ------------------------------
[2013-11-30 14:42:59 - MyApp] Android Launch!
[2013-11-30 14:42:59 - MyApp] adb is running normally.
[2013-11-30 14:42:59 - MyApp] Performing com.sfinja.myapp.ActivitySubClass activity launch
[2013-11-30 14:42:59 - MyApp] Automatic Target Mode: using device '5752068FC64500EA'
[2013-11-30 14:43:00 - MyApp] Application already deployed. No need to reinstall.
[2013-11-30 14:43:00 - MyLib] Could not find MyLib.apk!
[2013-11-30 14:43:00 - MyApp] Starting activity com.sfinja.myapp.ActivitySubClass on device 5752068FC64500EA
[2013-11-30 14:43:00 - MyApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.sfinja.myapp/.ActivitySubClass }
So I searched SO and found this thread which solves the problem by simply unchecking the library project's Is Library
checkbox.
Sure enough, my Library Project (MyLib) had this checkbox checked so I unchecked it and I no longer receive this error in the console, but then I started getting runtime NullPointerExceptions.
This clearly suggests that I have a problem in my project setup/configuration (although it builds fine) but in order to find what it is, I believe I need to understand a bit more about this confusing checkbox:
- I have other library projects used in this app, all having the
Is Library
checkbox checked but none of them presents the problem exhibited by MyLib. So, to check or not to check "IsLibrary"? - If it is a library, why should the
Is Library
checkbox be unchecked? Is that thread's correct answer from 2 years ago still valid? - Is the Could not find APK! essentially a "red herring" for something else?