in the Android manifest I am new to Android and I need help solving this problem. I am developing a game using Eclipse. In my pr...">

<uses-library / "> in the Android manifest

I am new to Android and I need help solving this problem. I am developing a game using Eclipse. In my project, I added AndEngine and AndEngine Augmented Reality as libraries. I tested the project on my Android device, every time I click on text that uses the AR class, it forces me to close. I was told to register AndEngine in my Android manifest file. I checked about this and used <uses-library /> . Now I put 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 on these lines <uses-library /> , I can start the application, but it will close when you click on the text that goes to the AR class. Is there something wrong with use? Or is the best way to do this? Please post all your tips in an easy-to-understand way for beginners. THANKS!

+7
source share
3 answers

<uses-library> not intended to include libraries in your application. It is used to limit the availability of applications on Google Play, depending on the presence of a library on the device, such as maps. AndEngine is a library project, so include it in your assembly using Ant, Maven, or any other IDE that you use.

In case you are not familiar with the fact that the library project is a link here:

https://www.vogella.com/tutorials/AndroidLibraryProjects/article.html

+6
source

create the libs folder inside the res folder and put the AndEngine banners in it. Define the jar class path.

+1
source

If this element is present and its android:required attribute is set to true, the Framework PackageManager will not allow the user to install if the library is not present on the user device.

<uses-library> - Indicates the shared library to which the application should be linked. This element tells the system to include the library code in the class loader for the package.

+1
source

Source: https://habr.com/ru/post/1436871/


All Articles