INSTALL_FAILED_MISSING_SHARED_LIBRARY Using NDK - android

I am using a a project of Combination of NDK and android that is related to augmented Reality
I want to and this project in another project.
I have read posts on different Question regarding this issue but they all are explicitly related to google map api.
I've made the other project as a library and now using it in my new project.
I've added permission in Manifest file.
Here are is the specific part of it.
<uses-library android:required="true" android:name="com.qualcomm.QCARSamples.VirtualButtons" />
<activity android:name="com.qualcomm.QCARSamples.VirtualButtons.VirtualButtons"
android:label="#string/title_activity_putit_out_demos" />
so if any body can guide me where i am wrong

The only thing suspicious I see is the uses-library tag, do you have the lib in your device/emulator? If yes then you should have the following files in it,
/system/etc/permissions/com.qualcomm.QCARSamples.VirtualButtons.xml
/system/framework/com.qualcomm.QCARSamples.VirtualButtons.jar
Without the lib the apk installation will fail with INSTALL_FAILED_MISSING_SHARED_LIBRARY error.

i have figured it out with one simple way
follow the steps to get rid off this thing
right click on the Project you want to make library
go to
Properties->Android-> check is Library option (in right lower area)
click apply and then Ok
and go to main project in which you want to add it as library
right click on it go to properties-> android click on add button (right lower area) add the project
click apply and then ok
and in Manifest file
and the main class of the library project to triger its functionality
`<activity>your activity goes here </activity>`
No need to Add <uses-library> permission in manifest file

Related

Uploaded Android APK marked as Android Auto when not set in manifest

I've looked through my whole project directory, and for the life of me, I cannot find where it would think it is an Android Auto. Going through this page:
https://developer.android.com/training/auto/start/index.html#auto-metadata
Nowhere in my Android manifest, do I set an automotive.
Could a library add to the manifest to make it an Automotive app?
Are there other things in the manifest I can check?
Please cross check in your res/xml file and see if you have any media or notification
under - uses element.
You can also check in your manifest file if you have added Car GMS package in the meta-data element.
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="#xml/your_auto_xml_file"
/>
If the library you are importing in happens to be from the merchant who builds up the customized DHU, then these lib can infuse those properties in your project. One easy way would be to remove the library and see if it resolves the issue.

Android library problems

I am looking to use the android sample project 'Bluetooth chat' as a library so that I can use it inside another application.
I have marked the project as a library in its properties and I have referenced the project in my application. I understand I need to update my applications manifest file, however I am totally lost as to what needs to be added/changed(I am a total beginner).
I am just looking to launch the sample from the click of a button within my application.
I have read the documentation about referencing but I am still pretty confused. Any guidance would be much appreciated!
if you access your project you enter your manifest file for entry lie that
<activity
android:name="<Package name>.<java file name>"
/>
Make Sure your lib and your project in same folder.

<uses-library /> in Android Manifest

I'm a newbie for Android and I need help regarding this issue. I am developing a game using Eclipse. In my project, I added AndEngine and AndEngine Augmented Reality as libraries. I was testing the project out in my Android device, every time I tap the text which uses the class of AR, it force close. I was told to register AndEngine in my Android Manifest file. I have checked about it and used <uses-library />. Now, I placed these two lines in my manifest:
<uses-library android:name="org.andengine.extension.augmentedreality"
android:required="true"/>
<uses-library android:name="org.andengine"
android:required="true"/>
but I get this error message: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
when I comment out those <uses-library /> lines, I can run the app but it force close when tapping the text that directs to the class of AR. Anything wrong in using it? Or any better way in doing it? Please post all your advises in an easy-to-understand-for-newbies way. THANK YOU!
<uses-library> is not meant to include libraries in your application. It is used to restrict app availability in Google Play based on the availability of a library already on the device like maps. AndEngine is a library project so include it in your build via Ant, Maven or whatever IDE you use.
In case you aren't familiar with what a library project is here's a link:
https://www.vogella.com/tutorials/AndroidLibraryProjects/article.html
If this element is present and its android:required attribute is set
to true, the PackageManager framework won't let the user install the
application unless the library is present on the user's device.
<uses-library> - specifies a shared library that the application must be linked against. This element tells the system to include the library's code in the class loader for the package.
creat a libs folder inside the res folder and put the AndEngine jars in it.set the class path of jar.

MapActivity cannot be resolved to a type

I'm busy trying to get the MapView included in my Android project. I'm following the MapView tutorial on the Android developer website but I'm getting an error:
'MapActivity cannot be resolved to a type'
I tried pressing Ctrl+Shift+O to auto import all classes but it's not helping. When I try to include the Maps libary manually it gives this error:
'The import com.google.android cannot be resolved'
I have added the following line (see below) to the Manifest and my target is API 7 (Platform: 2.1).
<uses-library android:name="com.google.android.maps" />
What am I doing wrong?
Thanks!!!
You need to reference correct library at compile time. But what you describe is asking Android to use this specific library at runtime.
You need to right click your Eclipse project, Properties -> Android. In Project Build Target select any target with vendor Google Inc..
Google API is a third party SDK. Choose third party in packages manager.

Help can't import com.google.android.maps

I already tell project use libraries com.google.android.maps in the manifest of project but in my activity it shows errors about importing com.google.android.GeoPoint. and others.
which target version you are using? use target Google apis 1.6 instead of android. You can the change the target version from project itself.
1.Right click on the project
2. choose Build path--> Configure Build path
3.Window will be opened, choose Android in right corner of the window then change target version in to Google apis.
Based on the short described question, i can assume below:
Yes you have mentioned it inside the AndroidManifest.xml file but have you choosen the library instead of SDK while creating android application. If no, then you just need to select Google API (Google Inc.).
You can mention it on the AndroidManifest.xml but first of all choose google api sdk.
First you have to make sure you have installed Google API
Then set your project's properties in Eclipse to check off the Google APIs version of the SDK.
and Make sure you have include this library in AndroidManifest FIle
<uses-library
android:name="com.google.android.maps" />
//in AndroidManifest.xml >>uses-library android:name = "com.google.android.maps"/>
then add maps.jar search for maps.jar and coppy path in your computer
example:C:\Users\android\sdk\add-ons\addon-google_apis-google-17\libs\maps.jar
then right click on your projects >>Build Path >> Configure Build Path..>>Java Build Path>>Libraries taps >>Add External jars..>>past path:C:\Users\android\sdk\add-ons\addon-google_apis-google-17\libs\maps.jar>>choose maps.jar click ok..ends thank you.

Categories

Resources