Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: strange error in Manifest

I was modyfing my android app, and I was trying it on real device (Run Application in eclipse) and all was working good. So When I was satisfied of my changes, I opened the Manifest in order to modify the version for releasing it, but WITHOUT ANY CHANGES in Manifest an error occurred at line:

<uses-permission android:name="android.permission.INSTALL_PACKAGES" />

the error is:

Permission is only granted to system apps

How is this possible? I builded my application many times using this line.

like image 811
GVillani82 Avatar asked Nov 23 '12 14:11

GVillani82


People also ask

What should be included in Android manifest?

Among many other things, the manifest file is required to declare the following: The components of the app, which include all activities, services, broadcast receivers, and content providers. Each component must define basic properties such as the name of its Kotlin or Java class.

What does manifest do in Android?

The Android manifest file helps to declare the permissions that an app must have to access data from other apps. The Android manifest file also specifies the app's package name that helps the Android SDK while building the app.

How do I edit manifests on Android?

Open your Android project and go to <AppProjectFolder>/app/src/main/. Open the app manifest file AndroidManifest. xml and add the following lines to the file as child elements of the <manifest> element. Note: You must include the QUERY_ALL_PACKAGES permission if your app targets Android 11 (API Level 30) or higher.

How do I declare permissions in Android manifest?

Add declaration to app manifest To declare a permission that your app might request, include the appropriate <uses-permission> element in your app's manifest file. For example, an app that needs to access the camera has this line in AndroidManifest. xml : <manifest ...>


1 Answers

Thanks to all. I solved the strange problem with

 Project > Clean

Now all works good again!

like image 185
GVillani82 Avatar answered Sep 22 '22 23:09

GVillani82