1

I have a Compile Error telling me to remove android:roundIcon from AndroidManifest.xml, similar to this other post: No resource identifier found for attribute 'roundIcon' in package 'android'

I have targeted API 15 and only have that version installed, but Android Studio keeps re-adding that line and breaking compilation. How do I stop/fix this?

My build.gradle has:

    minSdkVersion 15
    targetSdkVersion 15

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.testapplication"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <application
        android:allowBackup="true"
        android:debuggable="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme" >
        <activity android:name="com.example.testapplication.MainActivity" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

It just keeps re-adding android:roundIcon="@mipmap/ic_launcher_round" if I delete it. How do I stop that behaviour?

Thanks.

BikeHelmet
  • 11
  • 1
  • 6
  • You won't be able to release apps with targetSdk < 26 to the playstore in like a month, so you really should target 26+ – David Medenjak Jul 22 '18 at 08:43
  • Please add your `manifest.xml` code to question – Sukhbir Jul 22 '18 at 08:47
  • I have an old Android 5 tablet that I want to whip up an app for. (I want to see if I can train my cat to press buttons on it.) I don't care about publicly releasing the app. What is most silly is that it compiled once and loaded "Hello World" onto the tablet, but then added that line afterwards and now won't compile at all. Any suggestions? – BikeHelmet Jul 22 '18 at 08:48
  • Please update target and compile sdk version to latest api 28 in `build.gradle` `android:targetSdkVersion="28"` `"compileSdkVersion 28"` – Sukhbir Jul 22 '18 at 09:25

1 Answers1

3

Just remove all the "@mipmap/ic_launcher" for round icons. You'll be done. Also, if it doesn't solve, try adding your own icon for the same using an image asset and setting it as "ic_launcher" icon.

Ojasvi Bhargava
  • 312
  • 1
  • 2
  • 10
  • Apparently API 25 added that feature. It won't let me delete it. It puts it back. I tried marking the file read only, but that messes up compiling as well. Now I'm digging through project settings to see if I missed anything. I may just tear down the project and start over, since this is just a "getting to know Android Studio" project. – BikeHelmet Jul 22 '18 at 09:00
  • Did you try deleting it from your "file explorer"? I mean navigate to the file location (mipmap/ic_launcher_round) by right clicking on the file and then "show in explorer". From there you can delete it. Then just clean the project and try again? – Ojasvi Bhargava Jul 22 '18 at 09:02
  • Now AAPT.exe crashes on build. I think I'll get some sleep and resume tinkering in the morning. Thanks for the suggestions. – BikeHelmet Jul 22 '18 at 09:17