Error:Execution failed for task ':app:processDebugResources'.>
Error:Execution failed for task ':app:processDebugResources'.>
com.android.ide.common.process.ProcessException: Failed to execute aapt
xml
可能出現無法識別的資源文件錯誤, 就是資源文件 里面出錯了
獲取聯(lián)系人 報空指針異常 null
因為刪除聯(lián)系人褒纲,是把這個聯(lián)系人的 contact_id 的值設置為 null 并不會去服務器真正的刪除所以要判斷一下
contact_id 是否為空 if(!TextUtils.isEmpty(contact_id)){不為空才獲取聯(lián)系人->代碼}
狀態(tài)選擇器錯誤
必須先把狀態(tài)處理的事件 寫在最前面岔绸, 默認的寫到最后一行
No active admin owned by uid 10047 for policy #3
Caused by: java.lang.SecurityException: No active admin owned by uid 10047 for policy #3
缺少超級管理員權限
You need to use a Theme.AppCompat theme
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity
ActionBarActivity惧互,它來自android.support.v7.app.ActionBarActivity建钥。
所以就要使用與其配合的AppCompat的theme才行瓶蚂。
org.apache.http 包 不存在
android {
useLibrary 'org.apache.http.legacy'
}
AAPT err(Facade for 747003580): libpng error: Not a PNG file
解決方案 >
解決方案
duplicate entry:android/support/v4/app/TaskStackBuilder$SupportParentable.class
一于未、Android Studio 引用多個jar融求、aar或者工程時出現
TransformException:Java.util.zip.ZipException: duplicate entry:android/support/v4/app/TaskStackBuilder$SupportParentable.class`.
原因:
在所添加的 jar 包或 aar 包中也引用了support-v4,與工程中引用的相沖突
具體由于項目中引用的 .aar 和引用的 slideDateTimerPicker.jar 以及項目本身,均用到了 support-v4 包 墨吓,且版本可能不相同的情況下引發(fā)該問題球匕。
解決方案: 把重復的第三方 jar包 刪掉
由于,一個module中只引用了一份相同的第三方包帖烘。故將 slideDateTimerPicker.jar 所依賴的 v4包 替換成項目中也包含 v4包的 .aar包(唯一性原則)亮曹,
同時將build.grandle 中依賴的 compile ‘com.android.support:support-v4 :19.1.0’ 干掉。
Ignoring InnerClasses attribute for an anonymous inner class
解決方案:
1.
lintOptions {
ignoreWarnings true
}
2.
lintOptions {
//lint 遇到 error 時繼續(xù) 構建
abortOnError false
//build release 版本 時 開啟lint 檢測
checkReleaseBuilds false
// 防止在發(fā)布的時候出現因MissingTranslation導致Build Failed!
disable 'MissingTranslation'
}
原因網上很多秘症,Android Studio的代碼規(guī)范比Eclipse要嚴格好多照卦,所以很多第三方不是很好的支持Android Studio規(guī)范,
只需要在release時忽略這些警告乡摹。還有就是Android Studio的混淆規(guī)則也要嚴格很多役耕,所以要完善混淆文件
通知欄 卡死
頻繁更新Notification,導致通知欄卡死聪廉,而且視圖內容不更新了瞬痘。網上找的資料說,
每次發(fā)通知的時候都重新new一個RemoteView板熊,而不是使用同一個RemoteView……框全。
Conversion to Dalvik format failed:Unable toexecute dex: method ID not in [0, 0xffff]: 65536
Android方法數不能超過65K的限制
需要在Project.proterty中配置一句話就Ok啦,
dex.force.jumbo=true
加入了這句話干签,確實可以讓你的應用通過編譯津辩,但是在一些2.3系統(tǒng)的機器上很容易出現
INSTALL_FAILED_DEXOPT異常
No resource found that matches the given
此類錯誤一般因為所引用資源為高版本所有 》解決方法: 在項目中 右鍵 Open Module Settings 選擇modules 里面的 compile sdk version 選擇一個高版本的