Android 台灣中文網

標題: 反編譯後的程式出現錯誤,即使勾選Android為1.6也無法解決 [打印本頁]

作者: horace_wu    時間: 2012-10-16 01:13
標題: 反編譯後的程式出現錯誤,即使勾選Android為1.6也無法解決
本帖最後由 horace_wu 於 2012-10-16 01:17 編輯

反編譯後的程式可否指點我如何能完成寫中文直式閱讀經典的簡單範例在 AndroidManifest.xml 出現錯誤,即使在功能表 Project->Poperties->Java Compiler->JDK Compliance 勾選 Compiler Compliance Settings 為 1.6 也無法解決問題

其 AndroidManifest.xml 的內容為:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2" android:versionName="1.1" package="cyp.android.Buddhist_texts_001"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <application android:label="@string/app_name" android:icon="@drawable/icon">
        <activity android:theme="@android:style/Theme.Translucent.NoTitleBar" android:label="@string/app_name" android:name=".Start">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Main" />
        <activity android:theme="@android:style/Theme.Light" android:name=".Setting" />
    </application>
    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />
    <supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" />
</manifest>

其中倒數第三及倒數第四行出現錯誤,其詳細錯誤訊息為
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />
→error: No resource identifier found for attribute 'targetSdkVersion' in package 'android'

<supports-screens android:anyDensity="true" android:smallScreens="true" android:normalScreens="true"
→Multiple annotations found at this line:
        - error: No resource identifier found for attribute 'largeScreens' in package
         'android'
        - error: No resource identifier found for attribute 'normalScreens' in package
         'android'
        - error: No resource identifier found for attribute 'smallScreens' in package
         'android'
        - error: No resource identifier found for attribute 'anyDensity' in package
         'android'

請問有誰知道要怎麼排解這些錯誤訊息呢?

作者: pjt    時間: 2012-10-16 09:57
看起來是你使用的android api level不對.如果你是用eclipse的話:
1. 在project上按右鍵 -> properties
2. 選android tab
3. 確認勾選API level >= 4(Android 1.6)以上的target




歡迎光臨 Android 台灣中文網 (https://apk.tw/) Powered by Discuz! X3.1