I made library for my android games and i wanted to add it to another project to test how it works, but when i ran the application, it does not seemed to be able to find my library files(INSTALL_FAILED_MISSING_SHARED_LIBRARY). I have my library .jar in "libs" folder and i also have it added to my Libraries and Order and Export tabs in build path. In my manifest, i have tag. I have Eclipse with ADT. Is there any way to fix this?
Are you using Google Maps in your application? If so, this may solve your problem: INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android
You wrote:
In my manifest, i have tag
If you are adding custom uses-library tags, that might be your problem. See: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
Related
I am trying to build my project on device and having problem with library configuration for App-v7-appcompact from the screenshot as below.
I have successfully added App-v7-appcompact into Eclipse project and also tried adding manually in Eclipse folder but having same errors even I added to build path aswell. I dont know what is problem with Appcompact-v7-library, plz help me in fixing my issue so I am able to run application on device.
I also added libraries in properties aswell.
check here this is very helpfull http://developer.android.com/tools/support-library/setup.html
I have a problem importing the PagerSlidingTabStrip library into Eclipse, I get multiple errors and I know this happens because the library was built using gradle.
I tried to follow this answer but I can't find use as source folder in the build path menu.
I've never used gradle previously and don't know how to go about this in Eclipse. Please guys, help most of us who have this problem out of our dilemma. Would be very grateful.
Okay in the end this was what i did:
I checked the build.gradle file of the library for target and min sdks. I then put what i found in the android manifest.xml which I know Eclipse uses.
I deleted the build.gradle and gradle.properties files.
Made sure the project was marked as a library. And it works!
I think the most crucial step was to check the build.gradle for the sdks and whatever else the project requires and replicating that the way it should be in the manifest file.
I am using Android Studio for building an application, in which I am using Facebook-SDK and Actionbar Sherlock as a dependencies. Each project library contains android-support-v4.jar.
When I am trying with any one of the project library it is working well. But I'm facing problems when trying to implement both simultaneously.
I know that I am facing the problem due to android-support-v4.jar.
I want to know how to add android-support-v4.jar in an efficient way.
\Android\android-studio\sdk\build-tools\android-4.2.2\dx.bat failed
I just solved the similar problem. On my case and most probably on your case also, the problem is on adding android-support-v4.jar for multiple times. I then remove the dependencies of android-support-v4.jar from my project's build.gradle and just have a single dependencies on facebook build.gradle, as facebook sdk was first to build on my project.
I faced this problem yesterday. I got it to work by making sure that there is the same android-support-v4.jar file in all libs directories throughout the project. The facebook-sdk and ABS ship with versions that might not be current when compared to the one that is installed by default by Android Studio. Let me know if it works.
If you need help integrating libraries in Android Studio, I recommend looking at facebook-sdk's step by step tutorial. I am sure once you integrate facebook-sdk you can use those steps to add any other library that you need by making small changes (i.e. use the name of the library you are trying to add instead of facebooksdk on the settings.gradle and build.gradle)
Help needed!!!! Stuck for 2 weeks on this and help needed.
I've recently imported the facebook sdk for android and its projects into my workspace. It shows up errors and the problems:
Archive for required library: '/home/Documents/facebook-android-sdk-3.0.2.b/facebook/libs/._android-support-v4.jar' in project 'FacebookSDK' cannot be read or is not a valid ZIP file
And the samples get errors along the line of:
The container 'Android Dependencies' references non existing library '/home/Documents/facebook-android-sdk-3.0.2.b/facebook/bin/facebooksdk.jar'
The things I have done following the other discussions without any success are
cleaned project
set the Facebook SDK as library
looked at the build path section and added external jar consisting of facebook/libs
imported fb sdk like 20 times and into different folders.
made sure my java compiler was 1.6
HELP would be very greatly appreciated!!!!
Take the lastest version of android-support-v4.jar (in your sdk environement : sdk/extras/android/support/v4/android-support-v4.jar) and replace in your project and library project do not create conflict.
The steps to importing a library are:
Download the library
Place the library in the libs folder of the project.
Build the project
Do Not attempt to import the library using some import wizard.
I suspect either your download was corrupted, and you need to do it again, or you put the file into the wrong directly.
I think your problem is that the android.support.v4 versions are different, take the one from your project and replace the one in the Facebook sdk lib folder, it should dismiss the clash.
As per your question, I think you are not able to compile once you add the SDK to your project. Do you get an error saying unable to run as library?
If so that means you have included this as library and create your project as a library to be used further. It is a common mistake that I have seen many people do when they try to import a library to use and tick mark the checkbox is Library. This actually means you want this project to be treated as a library for future use. Just try to add the SDK and do not tick mark the checkbox and this project will run fine.
Many forums will just tell you to tick that checkbox and you will be stuck on this error for long time.
For any .jar file related issues you have to make the .jars files compatible as there hashing a problem and the two jars are not compatible with each other (a version issue).
In the newest version of ADT (version 20 preview 3), they say that it's possible to make the libraries' manifest file become mergeable with projects that use them:
Automatic merging of library project manifest files into the including
project's manifest. Enable with the manifestmerger.enabled property.
How and where do I use it? I can't see content assist helping with me on this anywhere.
Add the following line to your project.properties file of your application project.
manifestmerger.enabled=true
Introduced with Android SDK Tools, Revision 20 (June 2012):
https://developer.android.com/studio/releases/sdk-tools
Build System
* Added automatic merging of library project manifest files into the including project's manifest.
Enable this feature with the manifestmerger.enabled property.
If you want to merge android library project manifest and your current project manifest, you have to add manifestmerger.enabled=true in your project.properties file where you referred your library project. But, you should be confirmed some point like ADT version, Also Minimum and target SDK should be same as library project.
FYI:
manifestmerger.enabled=true won't merge the manifest files if you are using eclipse export signed App.
As noted here it seems to be a bug.
http://code.google.com/p/android/issues/detail?id=34623
It was a bit of a hassle for me to set up merging correctly as well. (restarting eclipse, open close project..) To find out if merging is working take a look at the file in ../Your_Main_Project/bin/AndroidManifest.xml. If merging worked you will see the complete result in this file.
EDIT: This bug was fixed in ADT v20.0.1 (Juli 2012): http://developer.android.com/tools/sdk/eclipse-adt.html
I was facing some errors during manifest merging (R.java file went missing) so alternately I explicitly copied the manifest contents (e.g. I copied just the activity contents) from the library project manifest and put them in my main project manifest. That resolved the error and everything seems to be working well so far. Let me know if anyone feels this is not a recommended alternative to manifest merging.