AndroidManifest.xml file auto-generates to previous, incorrect version

330 views Asked by At

I am using Android Studio (on Mac) to develop an app for Google Glass, and I need to use unapproved voice commands. I added the permission to the manifest file like this:

<uses-permission
    android:name="android.permission.INTERNET"
    android:name="com.google.android.glass.permission.DEVELOPMENT" />

But I got a "Duplicate attribute name" warning. So, because I didn't understand what I was doing, I changed it to this:

<uses-permission
    android:name="android.permission.INTERNET"
    android:name2="com.google.android.glass.permission.DEVELOPMENT" />

Then I ran the file. Needless to say, it did not work. I did realize, by searching permissions and how to properly add them, that it should be like this:

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.glass.permission.DEVELOPMENT" />

But every time I try to run, clean, or rebuild the project, the AndroidManifest.xml file reverts to the previous state with the silly 'name2' line. I tried deleting the manifest and replacing it with a good version and deleting the offending line from the file in Xcode, and I made numerous attempts to clean and rebuild the project, all of which still result in the regeneration of the old file. So, I assume somehow the old file still exists or maybe Android Studio remembers recent files, but I haven't found anyone else with the same question anywhere. It should also be noted that many other bits of code (unedited) in the manifest now have errors, and all references to R in my other files have an error "Cannot resolve symbol R". I haven't been able to find relevant info for these issues either.

0

There are 0 answers