1

I am getting error in android:icon="@drawable/ic_launcher" what to do ??

I am new to android development.

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

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

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".Led_bluetooth"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

</manifest>

I have seen various answers online, but not helped anyone.

4 Answers4

0

Change it to:

android:icon="@mipmap/ic_launcher"

mipmap vs drawable folders

Community
  • 1
  • 1
Simas
  • 43,548
  • 10
  • 88
  • 116
0

Change it as

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

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

    <application
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".Led_bluetooth"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

</manifest>

Replacing Drwable with mipmap will solve your issue

Prabhuraj
  • 928
  • 2
  • 8
  • 14
0
<Application
  ...
  android:icon="@drawable/ic_launcher" > 
  <!-- change ic_launcher to whatever your png is named --

you need to do a clean (eclipse -> project -> clean), but you'll know it was successful if a line like this appears in your /gen/R.java file:

public static final int ic_launcher = 0x...;

If it isn't, you can delete the R.java file and the ADT will immediately panic and rebuild it from scratch, incorporating your new drawables.

Anil Meenugu
  • 1,411
  • 1
  • 11
  • 16
0

you have a issue with your drawable,some cases are: 1) image is not existing in drawable. 2) image name is not according to image naming conventions in android. 3) you can check if any issue with images by restarting your eclipse/studio then in console it shows the image having problem..

Puneet Kumar
  • 306
  • 1
  • 3