Could not find Library.apk!
I found the source of the problem!
It turns out that "with the new library feature, you don't specify the Android projects you depend on in the Java Build Path section of the Properties. You do it in the Android section of the Properties".
So all I had to do is go the Application Project's Properties
, hit the Projects
tab, select my own library project and click the Remove
button. That's it. No more problem.
In Eclipse Java EE select the project Properties, then select Project References
, then check the FacebookSDK (see screen capture)
Thanks to Lance Nanek!
Could not find ****.apk + android
I think this can happen when you rename the library project out from underneath the dependent project. Eclipse is reasonably good about about updating dependencies in most cases but this one seems fragile.
First try removing and then re-adding your library in Project > Properties > Android > Library.
If that doesn't work try cleaning your projects, exiting Eclipse, and opening the ".classpath" file in your project's root directory. If you see a line that references your library project under a previous name, just delete it, save the file, and relaunch Eclipse. Build the library project and then your dependent one. You may need to re-add the library like I mentioned above. This is what worked for me at least.
Edit note: I also found some stale references in my .project files. They didn't seem to be causing any problems but I removed them too. If you do that, be sure to search for the old name in that file as there was a whole "link" section near the bottom that also referenced it.
System.loadLibrary(...) couldn't find native library in my case
To root cause (and maybe solve your issue in the same time), here is what you can do:
Remove the jni folder and all the .mk files. You don't need these nor the NDK if you aren't compiling anything.
Copy your
libcalculate.so
file inside<project>/libs/(armeabi|armeabi-v7a|x86|...)
. When using Android Studio, it's<project>/app/src/main/jniLibs/(armeabi|armeabi-v7a|x86|...)
, but I see you're using eclipse.Build your APK and open it as a zip file, to check that your
libcalculate.so
file is inside lib/(armeabi|armeabi-v7a|x86|...).Remove and install your application
Run dumpsys package packages | grep yourpackagename to get the nativeLibraryPath or legacyNativeLibraryDir of your application.
Run ls on the nativeLibraryPath you had or on legacyNativeLibraryDir/armeabi, to check if your libcalculate.so is indeed there.
If it's there, check if it hasn't been altered from your original libcalculate.so file: is it compiled against the right architecture, does it contain the expected symbols, are there any missing dependencies. You can analyze libcalculate.so using readelf.
In order to check step 5-7, you can use my application instead of command lines and readelf: Native Libs Monitor
PS: It's easy to get confused on where .so files should be put or generated by default, here is a summary:
libs/CPU_ABI inside an eclipse project
jniLibs/CPU_ABI inside an Android Studio project
jni/CPU_ABI inside an AAR
lib/CPU_ABI inside the final APK
inside the app's nativeLibraryPath on a <5.0 device, and inside the app's legacyNativeLibraryDir/CPU_ARCH on a >=5.0 device.
Where CPU_ABI is any of: armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips, mips64. Depending on which architectures you're targeting and your libs have been compiled for.
Note also that libs aren't mixed between CPU_ABI directories: you need the full set of what you're using, a lib that is inside the armeabi folder will not be installed on a armeabi-v7a device if there are any libs inside the armeabi-v7a folder from the APK.
Android app with library can't find the library.apk
I am also getting this error ( lets better call it confusing/weird message ) every now and then - my Workaround: just ignore it for now and wait for a new ADT version
And yes - imho this is a bug in ADT - Android is really nice, but ADT needs a lot of more attention for sure ..-)
Libraries not installed when copying APK to /system/app on KitKat
When you add an APK to /system/app
, you should also extract its libraries and put it in /system/lib
, reference: https://groups.google.com/forum/#!topic/android-ndk/v86sYS3Orow
As far as I know this has always being the case and not 4.4 specific
LibC++_shared is Present in APK but Not Found When Loading Libraries During Execution?
I had the same issue after upgrading the Gradle plugin. the nonsense disappear after I also upgrade the Gradle build tool.
dependencies {
//after upgrad from 3.5.1 the link error disappear
classpath "com.android.tools.build:gradle:3.5.4"
...
}
Android Eclipse - Could not find *.apk
Please follow these steps; this might help you out:
Right-click your app project and go to Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
If your app project relies on library projects which are in your workspace, those of course need to have the "Is Library" box checked.
Related Topics
Facebook - "Cannot Query Users by Their Username" Solution
Ics Android Enable Gps Programmatically
How Do Mpandroidchart Renderers Work and How to Write a Custom Renderer
Android Http Connection Exception
How to Dismiss a Progress Bar Even If There Is No View to Populate in the Firebaselistadapter
Current Month Facebook Friends Birthdays in Android
How to Have Searched Characters Colored When We Use Searchview in Recyclerview
Gradle Dsl Method Not Found: 'Runproguard'
Android:Locationmanager VS Google Play Services
Add Shadow to Custom Shape on Android
Debugging SQLite Database on the Device
Android Get Current Locale, Not Default
Android Facebook 4.0 Sdk How to Get Email, Date of Birth and Gender of User
Android Pendingintent Extras, Not Received by Broadcastreceiver
Setonitemclicklistener on Custom Listview
Add "View More" at the End of Textview After 3 Lines