3

I made a new project in Android studio, and this is my manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="cro.perger.rajcica" >

    <application
        android:allowBackup="false"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity android:name=".rajcica" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

When I build my file I get few gradle errors, and I get this debug/manifest file open:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="cro.perger.rajcica"
    android:versionCode="10"
    android:versionName="2.0.1" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="23" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity android:name="cro.perger.rajcica.rajcica" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

I get this errors:

  • URI not registered
  • element not allowed for (versionCode, versionName, icon, allowBackup, theme, supportsRtl)

Don't know how to resolve this, because many of this attributes are deleted from my manifest file, but not from debug/manifest file :(

Please help

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Goran
  • 1,239
  • 4
  • 23
  • 36
  • Possible duplicate of: http://stackoverflow.com/questions/20569610/why-am-i-getting-error-message-uri-is-not-registered – Tal Oct 14 '15 at 07:58
  • Not sure if this is duplicate, I am asking how to remove errors from debug manifest file, because i removed thoose line from my main manifest file ?? – Goran Oct 14 '15 at 08:01

1 Answers1

1

If you removed those lines from the manifest, but they are still in your debug, then it sounds like your manifest is in the wrong folder. Something changed in your directory structure maybe and you did not realize or intend for that to happen.

Get the manifest in the right folder and make sure that you are editing the correct one.

See this related post: Why is Android Studio reporting "URI is not registered"?

It also could be that you are setting them in your build.gradle file - check there.

Community
  • 1
  • 1
Jim
  • 10,172
  • 1
  • 27
  • 36