转换输出文件不存在

时间:2018-10-08 19:26:55

标签: java android gradle android-gradle

由于以下错误,我的模块无法构建:

出了什么问题

  

无法解析配置':cordova-plugin-connectsdk:Connect-SDK-Android:debugCompileClasspath'的所有文件。

     

使用转换JarTransform无法转换文件“ Java-WebSocket-1.3.7.jar”以匹配属性{artifactType = android-classes}

     

转换输出文件C:\ Users \ Constantine \ Documents \ android-blend \ platforms \ android \ cordova-plugin-connectsdk \ tv-Connect-SDK-Android \ core \ libs \ Java-WebSocket-1.3.7.jar不存在。

     

使用转换JarTransform无法转换文件'javax.jmdns_3.4.1-patch2.jar'以匹配属性{artifactType = android-classes}

     

转换输出文件C:\ Users \ Constantine \ Documents \ android-blend \ platforms \ android \ cordova-plugin-connectsdk \ tv-Connect-SDK-Android \ core \ libs \ javax.jmdns_3.4.1-patch2.jar不存在。

Project的Gradle版本为4.4,Android插件版本为3.1.0

最奇怪的是,我有另一个项目具有相同的gradle文件,并且效果很好。设置似乎是相同的,但似乎我缺少了一些东西。你能给我一个问题的线索吗?

该模块的成绩文件:

buildscript {
    repositories {
        jcenter()
        google()
        maven { url "http://clojars.org/repo" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.2.3'
        classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

apply plugin: 'com.android.library'
apply plugin: 'jacoco'


jacoco {
    toolVersion = "0.7.1.201405082137"
}

task jacocoTestReport(type:JacocoReport, dependsOn: "check") {
    group = "Reporting"

    description = "Generate Jacoco coverage reports"

    classDirectories = fileTree(
            dir: 'build/intermediates/classes/debug',
            excludes: ['**/R.class',
                       '**/R$*.class',
                       '**/*$ViewInjector*.*',
                       '**/BuildConfig.*',
                       '**/Manifest*.*']
    )

    additionalSourceDirs = files(android.sourceSets.main.java.srcDirs)
    sourceDirectories = files(android.sourceSets.main.java.srcDirs)
    executionData = files('build/jacoco/testDebug.exec')

    reports {
        xml.enabled = true
        html.enabled = true
    }

}

build.dependsOn jacocoTestReport

android {
    compileSdkVersion 22
    buildToolsVersion '27.0.3'

    packagingOptions {
        exclude 'LICENSE.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE'
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = [
                    'src',
                    'core/src',
                    'modules/google_cast/src',
                    'modules/firetv/src',
            ]
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
        test {
            java.srcDirs = [
                    'core/test/src',
                    'modules/google_cast/test/src',
                    'modules/firetv/test/src',
            ]
        }
    }
    buildTypes {
        debug {
            testCoverageEnabled = true
        }
        release {
            minifyEnabled false
        }
    }
    android {
        lintOptions {
            abortOnError false
        }
    }
}

android.testOptions.unitTests.all {
     include '**/*Test.class'
 }

dependencies {
    implementation files('core/libs/Java-WebSocket-1.3.7.jar')
    implementation files('core/libs/javax.jmdns_3.4.1-patch2.jar')
    implementation fileTree(dir: 'modules/firetv/libs', include: '*.jar')
    implementation 'com.android.support:support-v4:22.2.1'
    implementation 'com.android.support:appcompat-v7:22.2.1'
    implementation 'com.android.support:mediarouter-v7:22.2.1'
    implementation 'com.google.android.gms:play-services-cast:7.8.0'
    testCompile 'org.apache.maven:maven-ant-tasks:2.1.3'
    testCompile 'junit:junit:4.12'
    testCompile 'org.robolectric:robolectric:2.4'
    testCompile 'org.mockito:mockito-all:1.10.19'
    testCompile 'org.powermock:powermock-api-mockito:1.6.2'
    testCompile 'xmlunit:xmlunit:1.4'
}

apply from: 'maven-push.gradle'

1 个答案:

答案 0 :(得分:2)

这两行指的是不存在的文件。

Billing setup with ID "568283111", status "PENDING", payments_account "customers/6384836037/paymentsAccounts/payments_account_id", payments_account_id "payments_account_id", payments_account_name "", payments_profile_id "payments_profile_id", payments_profile_name "", secondary_payments_profile_id "".

您很可能已经移动了它们,并且路径不再正确