Android 我实现了VirtualApp库,但任务';的执行失败:应用程序:CompiledBugJavaWithJavaC';

Android 我实现了VirtualApp库,但任务';的执行失败:应用程序:CompiledBugJavaWithJavaC';,android,android-gradle-plugin,Android,Android Gradle Plugin,我已实现库,无法生成项目 我的Project gradle文件: buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.4.1' classpath 'com.didi.virtualapk:gradle:0.9.8.6' //

我已实现库,无法生成项目

我的
Project gradle
文件:

buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.didi.virtualapk:gradle:0.9.8.6'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
我还按照
模块gradle
中的库指南实现了库并应用了库:

apply plugin: 'com.android.application'

apply plugin: 'com.didi.virtualapk.host'

android {
    compileSdkVersion 28
    dataBinding {
        enabled = true
    }
    defaultConfig {
        applicationId "com.example.vspace"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.didi.virtualapk:core:0.9.8'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
在这之后,我尝试构建项目,并得到类似()的错误:

:app:CompiledBugJavaWithJavaC(线程[Daemon worker,5,main])已完成。花了2.586秒

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.NoSuchMethodException: No similar method computeBuildMapping with params [class org.gradle.invocation.DefaultGradle_Decorated] could be found on type class com.android.build.gradle.internal.ide.ModelBuilder.

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

我还尝试降级和升级升级升级升级升级版本,也尝试了旧的Android Studio 3.0.1和3.4.1。但这里什么都不管用。因此,如果有人能提供帮助,那么这肯定是可以接受的


我也提到了这一点,但它帮不了我。

VirtualApp正在这样做……gradle 3.4.1中不支持computeBuildMapping(基于您文章中的错误)

if (project.extensions.extraProperties.get(Constants.GRADLE_3_1_0)) {
                    ImmutableMap<String, String> buildMapping = Reflect.on('com.android.build.gradle.internal.ide.ModelBuilder')
                            .call('computeBuildMapping', project.gradle)
                            .get()
                    compileArtifacts = ArtifactDependencyGraph.getAllArtifacts(
                            applicationVariant.variantData.scope, AndroidArtifacts.ConsumedConfigType.COMPILE_CLASSPATH, null, buildMapping)
                } else {
                    compileArtifacts = ArtifactDependencyGraph.getAllArtifacts(
                            applicationVariant.variantData.scope, AndroidArtifacts.ConsumedConfigType.COMPILE_CLASSPATH, null)
                }
gradle-wrapper.properties

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

VirtualApp正在这样做……gradle 3.4.1不支持computeBuildMapping(基于您文章中的错误)

if (project.extensions.extraProperties.get(Constants.GRADLE_3_1_0)) {
                    ImmutableMap<String, String> buildMapping = Reflect.on('com.android.build.gradle.internal.ide.ModelBuilder')
                            .call('computeBuildMapping', project.gradle)
                            .get()
                    compileArtifacts = ArtifactDependencyGraph.getAllArtifacts(
                            applicationVariant.variantData.scope, AndroidArtifacts.ConsumedConfigType.COMPILE_CLASSPATH, null, buildMapping)
                } else {
                    compileArtifacts = ArtifactDependencyGraph.getAllArtifacts(
                            applicationVariant.variantData.scope, AndroidArtifacts.ConsumedConfigType.COMPILE_CLASSPATH, null)
                }
gradle-wrapper.properties

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

Nick,使用“gradlew AssembledBug--debug--info”编译并共享日志。@Ranjan Kumar检查我编辑的描述。有人在virtualapk github上提出了这个问题,回应说要进行releasebuild/gradlew clean AssembreRelease构建失败!我试过了!Nick,使用“gradlew AssembledBug--debug--info”编译并共享日志。@Ranjan Kumar检查我编辑的描述。有人在virtualapk github上提出了这个问题,回应说要进行releasebuild/gradlew clean AssembreRelease构建失败!我试过了!那我需要做什么?那我需要做什么?