遇到bug报错日志---记录
2017-04-25 本文已影响24人
子丿龙
1.shrinkResources问题
Error:A problem was found with the configuration of task ':app:packageDebug'.
> File 'F:\AndroidStudioWorkSpace\OnLineFinancialPlanner\app\build\intermediates\res\resources-debug-stripped.ap_'
specified for property 'resourceFile' does not exist.
这个问题是因为app的build.gradle中的buildTypes的编译属性设置了shrinkResources(移除无用resource文件)为true,改成false就可以了
2. 动态修改apk名字问题
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@label value=(@string/app_name_debug) from AndroidManifest.xml:57:9-36
is also present at [com.github.piotrek1543:CustomSpinner:0.1] AndroidManifest.xml:13:9-41 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:53:5-335:19 to override.
这是因为,我们的项目中引用了其他的library库,然后导致名字不统一,,其实像图标,主题等等都会出现这样的问题,
我们只要在app的Manifest.xml下,的application增加属性 tools:replace="android:label",就可以修复这个问题,别忘了在manifest根接点增加属性xmlns:tools="http://schemas.android.com/tools",不然会未知报命名空间错误
3.签名文件找不到
Application keystore not found for signing config 'externalOverride'
这是因为签名文件路径不正确,签名打包的时候,修改一下就好
4.LeakCanary提示policy.HwPhoneWindow$1.this$0
的泄漏
http://www.jianshu.com/p/286efcbb81fc
这个作者的建议是不予解决