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.
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.
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.
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.
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 ...>
Thanks to all. I solved the strange problem with
Project > Clean
Now all works good again!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With