androidx worker manager问题-“ java.lang.IllegalStateException:无法解析结果路径字符串:”

时间:2019-06-14 13:45:53

标签: android android-gradle androidx android-workmanager

我尝试实施

implementation "androidx.work:work-runtime-ktx:2.0.1"
今天

。它下载(初始版本)很好,但是当我尝试重建项目或在设备上运行时,我面临一个非常奇怪的问题。

  

原因:java.lang.IllegalStateException:无法解析结果路径字符串:

现在,即使没有ktx,我也尝试了不同版本的Worker Manager,尝试清理项目,使用--scan选项运行gradle以了解问题,使缓存无效/重新启动,但一切都是徒劳的。

项目gradle文件

buildscript {
    ext.kotlin_version = '1.3.31'
    ext.version_code = 13
    ext.version_name = "2.0.0"
    repositories {
        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url "https://maven.google.com" // Google's Maven repository
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

我的应用gradle文件

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.dawnimpulse.wallup"
        minSdkVersion 21
        targetSdkVersion 28
        versionCode version_code
        versionName version_name
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        debug {
        }

        release {

            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }
    repositories {
        maven { url "https://jitpack.io" }
    }
}

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //--------------- Support Libraries ---------------------
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation "androidx.core:core-ktx:1.0.2"
    implementation "androidx.work:work-runtime:2.0.1"
    implementation "androidx.lifecycle:lifecycle-extensions:2.0.0"

    implementation "com.google.android.material:material:1.0.0"

    //--------------- Firebase Libraries --------------------

    //--------------- 3rd Party Libraries -------------------
    implementation 'com.github.bumptech.glide:glide:4.9.0' // image loading
    implementation 'com.squareup.retrofit2:retrofit:2.4.0' // retrofit
    implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1' //rx android
    implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.0' //rx relay
    implementation 'com.jakewharton.rxbinding3:rxbinding-recyclerview:3.0.0-alpha2' //rx recycler
    implementation 'com.makeramen:roundedimageview:2.3.0' //rounding images
    implementation 'com.github.chrisbanes:PhotoView:2.3.0' // photo view
    implementation 'jp.wasabeef:blurry:3.0.0' //blur library

    //------------------ Additional -------------------------
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
repositories {
    mavenCentral()
}

0 个答案:

没有答案