Closed msdx closed 8 years ago
@msdx 运行python freeline.py
的时候报的错误是吗?
加上该依赖之后使用python或者是使用gradlew都会报错。
@msdx 麻烦提供一下gradlew编译报错的详细日志可以吗?
日志如下:
:app:prepareComSquareupLeakcanaryLeakcanaryAndroid14Beta2Library UP-TO-DATE
:app:prepareComTencentBuglyCrashreport220Library UP-TO-DATE
:app:prepareComWdullaerMaterialdatetimepicker240Library UP-TO-DATE
:app:prepareIoReactivexRxandroid110Library UP-TO-DATE
:app:prepareJpWasabeefRecyclerviewAnimators130Library UP-TO-DATE
:app:prepareDevelopDebugDependencies
:app:compileDevelopDebugAidl UP-TO-DATE
:app:compileDevelopDebugRenderscript UP-TO-DATE
:app:generateDevelopDebugBuildConfig UP-TO-DATE
:app:generateDevelopDebugResValues UP-TO-DATE
:app:generateDevelopDebugResources UP-TO-DATE
:app:resourcesInterceptorBeforeMergeDevelopDebugResources
Old file /workspace/project/coupon-manager/app/build/freeline/app/resources_dependencies.json removed.
Save to /workspace/project/coupon-manager/app/build/freeline/app/resources_dependencies.json
:app:mergeDevelopDebugResources UP-TO-DATE
:app:processDevelopDebugManifest UP-TO-DATE
:app:processDevelopDebugResources
/workspace/project/coupon-manager/app/build/intermediates/res/merged/Develop/debug/values-v23/values-v23.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
/workspace/project/coupon-manager/app/build/intermediates/res/merged/Develop/debug/values-v23/values-v23.xml:18: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
:app:processDevelopDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDevelopDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
@msdx 这个貌似是你代码的问题,可以参考一下这个链接:http://stackoverflow.com/questions/32092511/resource-error-in-android-studio-after-update-no-resource-found
不,这个锅不能让我来背。我不用freeline时完全没问题,单独加上这句依赖时就编译出错。我的猜想是,应该你们的这个库依赖了版本更高的appcompat,由于gradle对依赖冲突的默认解决策略,这种情况下会采用更高版本的库,因此导致与我公司项目的build tools版本不匹配而出现此问题。那么问题来了,我引入的这个依赖是否依赖了更高版本的appcompat?需要依赖它的原因是什么?等上午去公司我会去求证一下。
早上醒来思路竟如此清晰。刚下看了你们的runtime 的构建脚本,已经证实了我的想法,确实依赖了比我项目高的appcompat(23.0.1),我项目中用的是22.2.1的。接下来我这边的解决方法应该是升级我的buildtools版本与其匹配,当然我的appcompat与其他support库版本也要跟着升以减少as提出的警告。但是你们的runtime,是否真需要对appcompat 23.0.1的依赖吗?
接下来要考虑一下你们的问题了。如果不需要依赖较高的版本,是否需要降一下这个版本以提高友好性?如果不需要这个依赖,把它去掉是否更好?
@msdx 感谢指正,确实是这个问题。这个依赖确实不是必须的,下个版本去掉。
@lomanyong 客气了。这两天接手一个离职同事留下来的被维护得乱七八糟的项目,静不下去来去分析问题。早上醒来看到你附的stackoverflow的答案提到的版本问题才一下子想到是这个原因。早上醒来才冷静,到了公司看着项目的代码我又不冷静了T_T
不使用freeline时正常,由于使用freeline加了
compile 'com.antfortune.freeline:runtime:0.5.0'
时编译失败,信息如下:下面是使用freeline所作的修改: