Skip to content Skip to sidebar Skip to footer

Android Manifest Automatically Generating Invalid Permission

I accidentally typed in an invalid permission name in my android manifest and cannot remove it. Here is my manifest code:

Solution 1:

I try to do either it regenerates and says "Files under the build folder are generated and should not be edited".

That is because you are not editing the correct manifest file. You are attempting to edit a generated manifest file, probably because that is the one that Android Studio popped up on your screen. That's poor form on Android Studio's part, and if there isn't a bug report filed on it, I'll get one filed, as I have seen this behavior as well.

Instead, go to the real manifest file (probably in app/src/main/AndroidManifest.xml off of your project root) and edit it.

BTW, none of your <uses-permission> lines are correct. One cites a group, and the other two cite non-existent permissions.

UPDATE: I have filed the bug report.

Solution 2:

Listen to the advice. You are trying to edit the generated manifest from build folder which gets overwritten everytime you build your project. Navigate to the source directory and modify the manifest there.

The path will look similar to this:

Post a Comment for "Android Manifest Automatically Generating Invalid Permission"