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

android studio4.2.1编译demo报错 #459

Open
dijiubuzhan opened this issue Jun 15, 2021 · 2 comments
Open

android studio4.2.1编译demo报错 #459

dijiubuzhan opened this issue Jun 15, 2021 · 2 comments

Comments

@dijiubuzhan
Copy link

异常类型:app编译异常

Robust版本:如:0.4.96

Gradle版本:6.5

系统:如:Windows

Compile Sdk Version:29(android 10.0 (Q))

Build Toll Version:29.0.2

android studio版本:4.2.1

堆栈/日志:

Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'com.github.dcendents.android-maven']
Caused by: org.gradle.api.plugins.PluginInstantiationException: Could not create plugin of type 'AndroidMavenPlugin'.
Caused by: java.lang.IllegalArgumentException: Unable to determine constructor argument #1: missing parameter of type Factory, or no service of type Factory.

@dijiubuzhan
Copy link
Author

使用android studio3.5.2编译没问题,所以问题是Robust对android studio版本的兼容性问题

@jacky1234
Copy link

  1. Open your root project file - build.gradle
  2. Modify the repositories as follows:
buildscript {
    repositories {
        mavenLocal()
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.meituan.robust:gradle-plugin:0.4.96'
        classpath 'com.meituan.robust:auto-patch-plugin:0.4.96'
        classpath 'me.tatarka:gradle-retrolambda:3.2.0'
        classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
        classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
    }
    configurations.classpath.exclude group: 'com.android.tools.external.lombok'
}
configurations.all {
    resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()

        maven {
            url "http://depot.sankuai.com/nexus/content/groups/public/"
        }
    }
    tasks.withType(JavaCompile) { options.encoding = "UTF-8" }
}

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

2 participants