INSTALL_FAILED_OLDER_SDK
Launching ‘app’ on Genymotion Google Nexus 5.
Installation did not succeed.
The application could not be installed: INSTALL_FAILED_OLDER_SDK
The application’s minSdkVersion is newer than the device API level.
Retry
原因:
The application’s minSdkVersion is newer than the device API level.
application’s minSdkVersion:Android Studio 的項目的SDK版本
the device API level:虛擬機運行的API版本
辦法:
安裝相匹配的模擬機
Genymotion模擬機Android API 信息:
項目版本信息:
兩者的版本,應該相匹配
This view is not constrained. It only has designtime positions, so it will jump to (0,0) at runtime unless you add the constrain1
情況:
在視圖中操作控件時報錯
解決辦法:
在視圖中選中報錯控件,點擊魔術棒形狀的按鈕,添加約束
The activity must be exported or contain an intent-filter2
解決辦法:
在 AndroidManifest.xml 對應的activity中添加一條屬性
android:exported=“true”
<activity android:name=".ClickEvent" android:exported="true"></activity>
AGPBI: {“kind”:“error”,“text”:"‘M’ is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore",“sources”: …}
原因:
命名不符合要求。only lowercase a-z, 0-9, or underscore(小寫的a到z,0到9,或者下划線)
解決辦法:
修改"sources"后面指向的文件名稱
Can’t resolve symbol ‘…’
原因:
在.java文件中提示,缺少相應的import語句
變量未聲明
解決辦法:
1.將該部分,回退,鍵盤輸入,由AS自動補全代碼
2.快捷鍵Alter+Enter
新建項目的語言與使用語言不符合
新建項目時,選擇使用的編程語言
android視圖下java/…/MainActivity.java
下面的文件的后綴名是.java就是java語言,.kt就是kotlin語言