Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transform output file does not exist

my module can't build because of error below:

What went wrong:

Could not resolve all files for configuration ':cordova-plugin-connectsdk:Connect-SDK-Android:debugCompileClasspath'.

Failed to transform file 'Java-WebSocket-1.3.7.jar' to match attributes {artifactType=android-classes} using transform JarTransform

Transform output file C:\Users\Constantine\Documents\android-blend\platforms\android\cordova-plugin-connectsdk\tv-Connect-SDK-Android\core\libs\Java-WebSocket-1.3.7.jar does not exist.

Failed to transform file 'javax.jmdns_3.4.1-patch2.jar' to match attributes {artifactType=android-classes} using transform JarTransform

Transform output file C:\Users\Constantine\Documents\android-blend\platforms\android\cordova-plugin-connectsdk\tv-Connect-SDK-Android\core\libs\javax.jmdns_3.4.1-patch2.jar does not exist.

Project's Gradle version is 4.4 and Android Plugin version is 3.1.0

The most strange thing, is that I have other project with the very same gradle file and it works perfectly. The settings seems to be the same, but seems I missing something. Could you please give me a clue of the problem?

Gradle file of this module:

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'
like image 440
Konstantin Kozirev Avatar asked Oct 08 '18 19:10

Konstantin Kozirev


1 Answers

Those two lines were referring to files that didn't exist.

implementation files('core/libs/Java-WebSocket-1.3.7.jar')
implementation files('core/libs/javax.jmdns_3.4.1-patch2.jar')

Most likely you had moved them and the paths were no longer correct

like image 108
Maciej Beimcik Avatar answered Oct 17 '22 04:10

Maciej Beimcik