Android Studio XML namespace not registered
so I worked on the project pretty well until a few days ago. My XML file unexpectedly encountered some errors. " http://schemas.android.com/apk/res/android " just went missing. Well ... it wasn't a deletion, but it's marked in red. It says the URI is not registered and I tried to rewrite it with autocomplete (in case the namespace changed somehow), but it wasn't there. I looked in the settings if someone put it on the ignore list or something, but it doesn't. So here is my complete XML file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.test.android.tea.test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<!-- Permission to save Robotium screenshots -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
<!-- Permission to register as a camera app -->
<uses-feature android:name="android.hardware.camera" />
<instrumentation
android:name="android.test.InstrumentationTestRunner"
android:targetPackage="de.telekom.android.tea" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="android.test.runner" />
<!-- Camera mockup -->
<activity
android:name="de.telekom.android.tea.test.robotium.stub.CameraStub"
android:label="Emma Camera Stub" >
<intent-filter>
<action android:name="android.media.action.IMAGE_CAPTURE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Gallery mockup -->
<activity
android:name="de.telekom.android.tea.test.robotium.stub.GalleryStub"
android:label="Emma Gallery Stub" >
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.dir/image" />
</intent-filter>
</activity>
</application>
</manifest>
In addition, there are android: versionCode, android: versionName, android: allowBackup, android: icon and data android: mimeType is marked in red too with the comment "Attribute not allowed here" (the latter says the element is not allowed here) and android.test. InstrumentationTestRunner, de.test.android.tea, de.test.android.tea.test.robotium.stub.CameraStub and de.test.android.tea.test.robotium.stub.GalleryStub labeled "Unable to resolve symbol"
The XML file is used to grant permissions to some stubs for automated testing and I am using Android Studio 0.8.10 atm. I am very grateful for the hint.
Edit: I have a second AndroidManifest.xml in the Application Module that works fine. This is just that ApplicationTest module. I recently noticed that some of my folders in the test unit say "root for test assets" and if I move it to one of those folders the namespace is available, but then some of the target packages don't work.
No one has answered this question yet
See similar questions:
or similar: