Android開發遇到的錯誤(內容包括轉發別人的)
阿新 • • 發佈:2019-01-02
1 報錯資訊:android.content.res.Resources$NotFoundException: String resource ID #0xf0
原因:給EditText設定setText()時,傳入了一個int值
2 在android專案中,通過run as java application執行java類時,報錯:
Invalid layout of java.lang.String at value
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (javaClasses.cpp:129), p
# fatal error: Invalid layout of preloaded class
#
# JRE version: 7.0_17-b02
# Java VM: Java HotSpot(TM) Client VM (23.7-b01 mixed mode windows-x86 )
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
解決辦法:
·選中該類,右鍵Properties
·選擇Run/Debug Settings
·在右面列表中雙擊該類
··選擇Casspath頁籤,將Bootstrap下面清空
3 匯入專案時報錯:gen already exists but is not a source folder. Convert to a source folder or rename it.
原因:專案組中的.classpath檔案,eclipse不能識別匯入專案的src程式碼資料夾,需要重新指明原始碼所在的資料夾,在build path的source頁籤中指明