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

cannot work. com.android.build.gradle.AppPlugin.getVariantManager()Lcom/android/build/gradle/internal/VariantManager; #72

Open
hr1995 opened this issue Sep 11, 2021 · 1 comment

Comments

@hr1995
Copy link

hr1995 commented Sep 11, 2021

the same issue , has any good solution?

AndroidStudio 4.1.1
gradle plugin "com.android.tools.build:gradle:4.1.1" or 4.1.3
gradle-wrapper distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip

Sync Error Detail:

Unable to find method 'com.android.build.gradle.AppPlugin.getVariantManager()Lcom/android/build/gradle/internal/VariantManager;'
com.android.build.gradle.AppPlugin.getVariantManager()Lcom/android/build/gradle/internal/VariantManager;

Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

Originally posted by @hr1995 in #42 (comment)

@hr1995
Copy link
Author

hr1995 commented Sep 11, 2021

done!

thx the bro's solution
classpath "com.bytedance.android:aabresguard-plugin:0.1.8"
apply from: 'resguard_aab.gradle'

I encapsulated the aab obfuscation script in resguard_aab.gradle, put this file under the app directory, and then apply from:'resguard_aab.gradle' by reference

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

1 participant