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
可能出現(xiàn)無法識(shí)別的資源文件錯(cuò)誤, 就是資源文件 里面出錯(cuò)了
獲取聯(lián)系人 報(bào)空指針異常 null
因?yàn)閯h除聯(lián)系人,是把這個(gè)聯(lián)系人的 contact_id 的值設(shè)置為 null 并不會(huì)去服務(wù)器真正的刪除所以要判斷一下
contact_id 是否為空 if(!TextUtils.isEmpty(contact_id)){不為空才獲取聯(lián)系人->代碼}
狀態(tài)選擇器錯(cuò)誤
必須先把狀態(tài)處理的事件 寫在最前面, 默認(rèn)的寫到最后一行
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
缺少超級管理員權(quán)限
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 引用多個(gè)jar、aar或者工程時(shí)出現(xiàn)
TransformException:Java.util.zip.ZipException: duplicate entry:android/support/v4/app/TaskStackBuilder$SupportParentable.class`.
原因:
在所添加的 jar 包或 aar 包中也引用了support-v4,與工程中引用的相沖突
具體由于項(xiàng)目中引用的 .aar 和引用的 slideDateTimerPicker.jar 以及項(xiàng)目本身,均用到了 support-v4 包 ,且版本可能不相同的情況下引發(fā)該問題。
解決方案: 把重復(fù)的第三方 jar包 刪掉
由于,一個(gè)module中只引用了一份相同的第三方包。故將 slideDateTimerPicker.jar 所依賴的 v4包 替換成項(xiàng)目中也包含 v4包的 .aar包(唯一性原則),
同時(shí)將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 時(shí)繼續(xù) 構(gòu)建
abortOnError false
//build release 版本 時(shí) 開啟lint 檢測
checkReleaseBuilds false
// 防止在發(fā)布的時(shí)候出現(xiàn)因MissingTranslation導(dǎo)致Build Failed!
disable 'MissingTranslation'
}
原因網(wǎng)上很多,Android Studio的代碼規(guī)范比Eclipse要嚴(yán)格好多,所以很多第三方不是很好的支持Android Studio規(guī)范,
只需要在release時(shí)忽略這些警告。還有就是Android Studio的混淆規(guī)則也要嚴(yán)格很多,所以要完善混淆文件
通知欄 卡死
頻繁更新Notification,導(dǎo)致通知欄卡死,而且視圖內(nèi)容不更新了。網(wǎng)上找的資料說,
每次發(fā)通知的時(shí)候都重新new一個(gè)RemoteView,而不是使用同一個(gè)RemoteView……。
Conversion to Dalvik format failed:Unable toexecute dex: method ID not in [0, 0xffff]: 65536
Android方法數(shù)不能超過65K的限制
需要在Project.proterty中配置一句話就Ok啦,
dex.force.jumbo=true
加入了這句話,確實(shí)可以讓你的應(yīng)用通過編譯,但是在一些2.3系統(tǒng)的機(jī)器上很容易出現(xiàn)
INSTALL_FAILED_DEXOPT異常
No resource found that matches the given
此類錯(cuò)誤一般因?yàn)樗觅Y源為高版本所有 》解決方法: 在項(xiàng)目中 右鍵 Open Module Settings 選擇modules 里面的 compile sdk version 選擇一個(gè)高版本的