Eclipse拒絕構建我的Android項目。在包資源管理器中,項目根節點具有小紅色錯誤符號,但其內部沒有其他符號。存在的問題選項卡顯示由lint檢測到的錯誤:Android Lint錯誤地認爲min SDK版本是1
Call requires API level 3 (current min is 1): android.os.AsyncTask#<init>
Call requires API level 3 (current min is 1): android.view.GestureDetector#<init>
Call requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager#hideSoftInputFromWindow
Call requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager#hideSoftInputFromWindow
Call requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager#showSoftInput
Call requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager#showSoftInput
Call requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager#showSoftInput
Call requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager#toggleSoftInput
Call requires API level 3 (current min is 1): android.view.Menu#getItem
Call requires API level 3 (current min is 1): android.view.Menu#getItem
Call requires API level 3 (current min is 1): android.widget.HorizontalScrollView#getId
Call requires API level 5 (current min is 1): android.app.Activity#onBackPressed
Call requires API level 5 (current min is 1): android.app.Activity#onBackPressed
Call requires API level 5 (current min is 1): android.app.Activity#onBackPressed
Class requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager
Class requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager
Class requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager
Class requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager
Class requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager
Class requires API level 3 (current min is 1): android.view.inputmethod.InputMethodManager
Class requires API level 3 (current min is 1): android.widget.HorizontalScrollView
Class requires API level 3 (current min is 1): android.widget.HorizontalScrollView
Field requires API level 3 (current min is 1): android.os.Build#DISPLAY
Field requires API level 4 (current min is 1): android.content.res.Configuration#screenLayout
Field requires API level 4 (current min is 1): android.os.Build#CPU_ABI
Field requires API level 4 (current min is 1): android.os.Build#MANUFACTURER
Field requires API level 4 (current min is 1): android.os.Build$VERSION#SDK_INT
我最好的猜測是,林特認爲我的minSdkVersion爲1,它不是;我的清單聲明minSdkVersion="8"
。我試過以下,以努力解決這個問題:
- 。重新啓動Eclipse
- 重新啓動我的電腦
- 項目>清潔
- 手動刪除
/bin
和/gen
強制下襬再次 產生
在這一點上我沒有想法。任何人都有建議?
你有其他項目在eclipse中打開嗎?如果是的話,關閉所有,但與你一起工作(甚至圖書館)。然後重新運行lint。 – inazaruk 2012-04-25 19:39:40
我確認這也發生在我身上,當時我將工作的Android項目移動到工作區的子文件夾中。 * Android工具>清除鏈接標記*似乎是一個可行的解決方法。 – 2012-10-12 09:41:06
您是否使用其他項目作爲庫?儘管我在應用程序的清單中聲明瞭'minSdkVersion',我在應用程序所依賴的庫項目中獲得了這個Lint-Marker,所以我必須在我的庫項目的清單中聲明'minSdkVersion' – 2012-11-27 10:36:39