Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find method getAaptOptions() for arguments [] on task #174

Open
CraftsmanHyj opened this issue Sep 9, 2019 · 8 comments
Open

Comments

@CraftsmanHyj
Copy link

执行构建补丁包task任务错误:

> Task :cn.ibingli:processOfficialReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cn.ibingli:processOfficialReleaseResources'.
> Could not find method getAaptOptions() for arguments [] on task ':cn.ibingli:processOfficialReleaseResources' of type com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s

异常类型

编译异常

Tinker版本

implementation 'com.tencent.bugly:crashreport_upgrade:latest.release'
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
implementation 'com.tencent.tinker:tinker-android-lib:1.9.13'

gradle版本

distributionUrl=https://services.gradle.org/distributions/gradle-5.4.1-all.zip

dependencies {classpath 'com.android.tools.build:gradle:3.5.0'}

系统

win 10

堆栈/日志

> Task :cn.ibingli:processOfficialReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cn.ibingli:processOfficialReleaseResources'.
> Could not find method getAaptOptions() for arguments [] on task ':cn.ibingli:processOfficialReleaseResources' of type com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s

复现路径

@lgGuo
Copy link

lgGuo commented Sep 9, 2019

我也是啊,升级studio和gradle就这样了,以前没问题

@CraftsmanHyj
Copy link
Author

应该是gradle版本太高了,tinker还没有兼容到;
我在tinker上面已经看到了提交记录了,不知道tinker在哪个版本里面解决了这个问题,需要bugly去适配他们的版本,才可以了。

目前的解决办法,降低gradle版本,从3.5降到3.4.2
项目根目录里面的build.gradle

buildscript {
    ......
    dependencies {
        ......
        classpath 'com.android.tools.build:gradle:3.4.2'
        ......
    }
}

希望哪位胸弟有其他解决办法,在此留言
@lgGuo

@checkming
Copy link

@CraftsmanHyj 根据Android Gradle插件版本所需的Gradle版本 降到3.4.2 也要修改至对应的Gradle版本 这种妥协方式不太好吧

@CraftsmanHyj
Copy link
Author

@CraftsmanHyj 根据Android Gradle插件版本所需的Gradle版本 降到3.4.2 也要修改至对应的Gradle版本 这种妥协方式不太好吧

有更好的办法?

@checkming
Copy link

checkming commented Sep 17, 2019

如果降到1.9.1是OK的,不过我是因为使用了tinker1.9.1在小米8SE 9.0手机中修复失败了(三星6.0 和 华为5.0修复成功) 才去尝试换成1.9.9过程中才遇到了打补丁包失效的情况,之前打补丁都OK的

@checkming
Copy link

但我觉得这个情况存在偶然性,就在刚才我尝试修改了同样的代码打补丁包时,并完全没有报上述的错误

@CraftsmanHyj
Copy link
Author

不太清楚,bugly需要自己仔细琢磨,感觉文档写的也不是很好用 @checkming

@xsslong
Copy link

xsslong commented Oct 16, 2019

弱鸡,bug一堆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants