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

No signature of method: com.android.build.gradle.internal.scope.VariantScopeImpl.getMergeAssetsTask() is applicable for argument types: () values: [] #646

Closed
xuningForAndroid opened this issue Aug 22, 2018 · 5 comments

Comments

@xuningForAndroid
Copy link

问题详细描述 集成host-plugin 出现错误

复现问题步骤 Steps to reproduce the problem

其它重要信息 Caused by: groovy.lang.MissingMethodException: No signature of method: com.android.build.gradle.internal.scope.VariantScopeImpl.getMergeAssetsTask() is applicable for argument types: () values: []

at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)

replugin-host-lib/gradle Version:
rePlugin-plugin-lib/gradle Version:

Android API Version:
Android 手机型号&ROM(Phone model & ROM):
请问怎么解决??

Logcat上下文 Logcat context

@sunshinehu
Copy link

我这边也在Android Studio 3.2上使用3.2 gradle插件时遇到这个问题

@wanliLiu
Copy link

Android build tool gradle 3.2.0做了相关调整,修改项目中的:
1.
variant.getVariantData().getScope().getGenerateBuildConfigTask().name
为:
variant.getVariantData().getTaskContainer().getGenerateBuildConfigTask().name

2.variant.getVariantData().getScope().getMergeAssetsTask().name

variant.getVariantData().getTaskContainer().getMergeAssetsTask().name

就可以了,可以用我自己的地址
maven{url "https://dl.bintray.com/soli/maven"}

然后所有的版本改成:2.3.1就可以用了

@liangchaojie
Copy link

我也是因为Gradle 4.6 BuildTool 3.2.0遇到的这个问题的

解决如下:
classpath 'com.android.tools.build:gradle:3.1.4'
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip

@PicoScott
Copy link

@wanliLiu 修改的replugin代码能提供一份吗?我的项目中已经对replugin进行了修改,所以不能直接用你提供的版本。

@hyongbai
Copy link
Collaborator

#640 duplicated

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

6 participants