简体   繁体   中英

android:minSdkVersion & android:icon

Why is there error at android:minSdkVersion? And also how do I change the android:icon to default? I've tried android:icon="true" but it is wrong.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.example.testing"
  android:versionCode="1"
  android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" /> //Error : <uses-sdk> tag should specify a  
  target API level (the highest verified version; when running on later versions, 
 compatibility behaviors may be enabled) with android:targetSdkVersion="?"    


<application android:icon="true" android:label="@string/app_name"> //Error : Boolean   
types not allowed (at 'icon' with value 'true'). 
    <activity android:name=".LoginActivity"
              android:label="Login to your Account">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <!--  Entry for RegisterActivity.class -->
    <activity android:name=".RegisterActivity"
              android:label="Register New Account"></activity>

</application>
</manifest>
  1. android-icon will be drawable type as it will be an image. Its not a boolean.
  2. Supply a target sdk version too eg,

    android:minSdkVersion="14" android:targetSdkVersion="17"

android:icon=@drawable/ic_launcher

add this code to your uses-sdk

android:targetSdkVersion="17"

then go to project->clean->ok.

If that doesn't work it must have some internal error, to remove this follow the following steps:-

1.Delete the project.
2.Create new project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM