任务':app:compileProductionReleaseJavaWithJavac'的执行失败。 > javax / xml / bind / JAXBException

时间:2019-09-09 12:45:14

标签: java android

我无法在应用中找到此错误的解决方案。我已经应用了依赖关系,但是我也无法解决它。

OpenJDK 11.0.2 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

我试图解决此版本的错误,但是在这方面没有任何帮助。

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.26.1'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

apply plugin: 'com.google.gms.google-services'

apply from: 'variable.gradle'

android {
    compileSdkVersion VERSION_COMPILE_VERSION

    defaultConfig {
        applicationId "glass.round.reach"
        minSdkVersion VERSION_MIN_SDK
        targetSdkVersion VERSION_TARGET_SDK
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        vectorDrawables.useSupportLibrary = true
        ndk {
            abiFilters "armeabi-v7a","x86"
        }
    }

    dataBinding {
        enabled = true
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    buildTypes {
        debug{
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            consumerProguardFiles 'proguard-rules.pro'
        }
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }

compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}

flavorDimensions "default"


productFlavors {

    development {
        buildConfigField 'String', 'ZOOM_SDK_URL','"https://platform.api.crosshealthexchange.com/connect-dev/"'
        buildConfigField 'String', 'RG_USER_TYPE', '"patient"'
        buildConfigField 'String', 'AWARE_BASE_URL', '"https://dev.backend.rgreach.com/aware/"'
        buildConfigField 'String', 'REACH_BASE_URL', '"https://dev.backend.rgreach.com/reach_api/"'
        buildConfigField 'String', 'SSO_GLOBAL_ID', '"5jp19q2c2g3ph98rdh7a83bpgs"'
        buildConfigField 'String', 'ORG', '"cross"'
        buildConfigField 'String', 'BASE_URL', '"https://dev.cross.crosshealthsolutions.com/v1/"'
        buildConfigField 'String', 'BASE_URL_PLATFORM', '"https://platform.api.crosshealthexchange.com/rgsso-patient-dev/"'
        buildConfigField 'String', 'BASE_URL_DOCUMENT', '"https://dev.phdm.crosshealthexchange.com/"'
        buildConfigField 'String', 'BASE_URL_CROSS_REACH', '"https://platform.api.crosshealthexchange.com/phdm-dev/"'
        buildConfigField 'String', 'BASE_URL_SEARCH_PROVIDER', '"http://dev.dashboard.crosshealthexchange.com:9090/"'
        buildConfigField 'String', 'BASE_URL_CROSSEX', '"http://dev.dashboard.crosshealthexchange.com:9090/"'
        buildConfigField 'String', 'BASE_URL_PEDIATRIC', '"http://dev.pediatric.crosshealthsolutions.com/api/v1/"'
        buildConfigField 'String', 'BASE_URL_MINDFULNESS', '"https://dev.rgreach.com/programmes-api/"'
        buildConfigField 'String', 'BASE_URL_OBINO', '"https://dev.backend.rgreach.com/rgobino/"'
        buildConfigField 'String', 'BASE_URL_HOME', '"https://dev.backend.rgreach.com"'
        buildConfigField 'String', 'BASE_URL_NOTIFICATION', '"https://platform.api.crosshealthexchange.com/notification-dev/"'
        buildConfigField 'String', 'CONTENT_ORG', '"reach_dev"'
        buildConfigField 'int', 'DEV_JSON', 'R.raw.rgsso_dev'
        buildConfigField 'String', 'REACH_CLIENT_SECRET', '"lds852WhHN"'
        buildConfigField 'String', 'BASE_URL_CONTENT', '"http://dev.article.crosshealthexchange.com"'
        buildConfigField 'String', 'WEB_CHAT_BASE_URL', '"chatsdk.dev.rgreach.com"'
        buildConfigField 'String', 'WEB_LISTING_URL', '"https://dev.listing.crosshealthexchange.com/?type=webview"'
        buildConfigField 'String', 'PHDM_IMAGES_BASE_URL', '"https://static.crosshealthexchange.com/ui/dev/images/rg-reach/phdm/observations/"'
        buildConfigField 'String', 'CONTENT_IMAGES_BASE_URL', '"https://static.crosshealthexchange.com/ui/dev/images/rg-reach/content/"'
        buildConfigField 'String', 'WEB_URL_CONTACT_US', '"https://static.dev.rgreach.com/contact-us"'
        buildConfigField 'String', 'WEB_URL_FAQ', '"https://static.dev.rgreach.com/faq"'
        buildConfigField 'String', 'WEB_URL_T_N_C', '"https://static.dev.rgreach.com/terms"'
        buildConfigField 'String', 'MIX_PANEL_TOKEN', '"856a1378c1b5a9c5575708cf2ba8fd9d"'
    }

    stage {
        buildConfigField 'String', 'ZOOM_SDK_URL','"https://platform.api.crosshealthexchange.com/connect-stage/"'
        buildConfigField 'String', 'RG_USER_TYPE', '"patient"'
        buildConfigField 'String', 'AWARE_BASE_URL', '"https://stage.backend.rgreach.com/aware/"'
        buildConfigField 'String', 'REACH_BASE_URL', '"https://stage.backend.rgreach.com/reach_api/"'
        buildConfigField 'String', 'SSO_GLOBAL_ID', '"69or1dt5925rcqih0bm9mn80el"'
        buildConfigField 'String', 'ORG', '"cross"'
        buildConfigField 'String', 'BASE_URL', '"https://stage.cross.crosshealthsolutions.com/v1/"'
        buildConfigField 'String', 'BASE_URL_PLATFORM', '"https://platform.api.crosshealthexchange.com/rgsso-patient-stage/"'
        buildConfigField 'String', 'BASE_URL_DOCUMENT', '"https://stage.phdm.crosshealthexchange.com/"'
        buildConfigField 'String', 'BASE_URL_CROSS_REACH', '"https://platform.api.crosshealthexchange.com/phdm-stage/"'
        buildConfigField 'String', 'BASE_URL_SEARCH_PROVIDER', '"http://stage.dashboard.crosshealthexchange.com:8080/"'
        buildConfigField 'String', 'BASE_URL_CROSSEX', '"http://dev.dashboard.crosshealthexchange.com:9090/"'
        buildConfigField 'String', 'BASE_URL_PEDIATRIC', '"https://stage.pediatric.crosshealthsolutions.com/api/v1/"'
        buildConfigField 'String', 'BASE_URL_MINDFULNESS', '"https://stage.rgreach.com/programmes-api/"'
        buildConfigField 'String', 'BASE_URL_OBINO', '"https://stage.backend.rgreach.com/rgobino/"'
        buildConfigField 'String', 'BASE_URL_NOTIFICATION', '"https://platform.api.crosshealthexchange.com/notification-stage/"'
        buildConfigField 'String', 'CONTENT_ORG', '"reach_stage"'
        buildConfigField 'int', 'DEV_JSON', 'R.raw.rgsso_stage'
        buildConfigField 'String', 'REACH_CLIENT_SECRET', '"lds852WhHN"'
        buildConfigField 'String', 'BASE_URL_CONTENT', '"https://dev.article.crosshealthexchange.com"'
        buildConfigField 'String', 'BASE_URL_HOME', '"https://stage.backend.rgreach.com"'
        buildConfigField 'String', 'WEB_CHAT_BASE_URL', '"chatsdk.stage.rgreach.com"'
        buildConfigField 'String', 'WEB_LISTING_URL', '"https://stage.listing.crosshealthexchange.com/?type=webview"'
        buildConfigField 'String', 'PHDM_IMAGES_BASE_URL', '"https://static.crosshealthexchange.com/ui/dev/images/rg-reach/phdm/observations/"'
        buildConfigField 'String', 'CONTENT_IMAGES_BASE_URL', '"https://static.crosshealthexchange.com/ui/dev/images/rg-reach/content/"'
        buildConfigField 'String', 'WEB_URL_CONTACT_US', '"https://static.stage.rgreach.com/contact-us"'
        buildConfigField 'String', 'WEB_URL_FAQ', '"https://static.stage.rgreach.com/faq"'
        buildConfigField 'String', 'WEB_URL_T_N_C', '"https://static.stage.rgreach.com/terms"'
        buildConfigField 'String', 'MIX_PANEL_TOKEN', '"856a1378c1b5a9c5575708cf2ba8fd9d"'
    }

    production {
        buildConfigField 'String', 'ZOOM_SDK_URL','"https://platform.api.crosshealthexchange.com/connect/"'
        buildConfigField 'String', 'RG_USER_TYPE', '"patient"'
        buildConfigField 'String', 'AWARE_BASE_URL', '"https://backend.rgreach.com/aware/"'
        buildConfigField 'String', 'REACH_BASE_URL', '"https://backend.rgreach.com/reach_api/"'
        buildConfigField 'String', 'SSO_GLOBAL_ID', '"1imlcr1hu48klf5e2kmbe34kdm"'
        buildConfigField 'String', 'ORG', '"cross"'
        buildConfigField 'String', 'BASE_URL', '"https://cross.crosshealthsolutions.com/v1/"'
        buildConfigField 'String', 'BASE_URL_PLATFORM', '"https://platform.api.crosshealthexchange.com/rgsso-patient/"'
        buildConfigField 'String', 'BASE_URL_DOCUMENT', '"https://phdm.crosshealthexchange.com/"'
        buildConfigField 'String', 'BASE_URL_CROSS_REACH', '"https://platform.api.crosshealthexchange.com/phdm/"'
        buildConfigField 'String', 'BASE_URL_SEARCH_PROVIDER', '"https://dashboard.crosshealthexchange.com/"'
        buildConfigField 'String', 'BASE_URL_CROSSEX', '"https://crossex-stage.crosshealthexchange.com/"'
        buildConfigField 'String', 'BASE_URL_PEDIATRIC', '"https://pediatric.crosshealthsolutions.com/api/v1/"'
        buildConfigField 'String', 'BASE_URL_MINDFULNESS', '"https://rgreach.com/programmes_api/public/"'
        buildConfigField 'String', 'BASE_URL_OBINO', '"https://backend.rgreach.com/rgobino/"'
        buildConfigField 'String', 'BASE_URL_NOTIFICATION', '"https://platform.api.crosshealthexchange.com/notification/"'
        buildConfigField 'String', 'CONTENT_ORG', '"reach"'
        buildConfigField 'int', 'DEV_JSON', 'R.raw.rgsso_prod'
        buildConfigField 'String', 'REACH_CLIENT_SECRET', '"lds852WhHN"'
        buildConfigField 'String', 'BASE_URL_CONTENT', '"https://article.crosshealthexchange.com"'
        buildConfigField 'String', 'WEB_CHAT_BASE_URL', '"chatsdk.rgreach.com"'
        buildConfigField 'String', 'WEB_LISTING_URL', '"https://listing.crosshealthexchange.com/?type=webview"'
        buildConfigField 'String', 'PHDM_IMAGES_BASE_URL', '"https://static.crosshealthexchange.com/ui/v2.1.10/images/rg-reach/phdm/observations/"'
        buildConfigField 'String', 'CONTENT_IMAGES_BASE_URL', '"https://static.crosshealthexchange.com/ui/v2.1.12/images/rg-reach/content/"'
        buildConfigField 'String', 'BASE_URL_HOME', '"https://backend.rgreach.com"'
        buildConfigField 'String', 'WEB_URL_CONTACT_US', '"https://static.rgreach.com/contact-us"'
        buildConfigField 'String', 'WEB_URL_FAQ', '"https://static.rgreach.com/faq"'
        buildConfigField 'String', 'WEB_URL_T_N_C', '"https://static.rgreach.com/terms"'
       /* buildConfigField 'String', 'MIX_PANEL_TOKEN', '"e0dd84b53c11d0546ddf86ba358222b1"'*/
        buildConfigField 'String', 'MIX_PANEL_TOKEN', '"856a1378c1b5a9c5575708cf2ba8fd9d"'
    }
  }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'

    api project(':ui')

    //support
    implementation "androidx.appcompat:appcompat:$VERSION_SUPPORT_LIBRARY"
    implementation "com.google.android.material:material:$VERSION_SUPPORT_LIBRARY_MATERIAL"
    implementation "androidx.cardview:cardview:$VERSION_SUPPORT_LIBRARY"
    implementation "androidx.multidex:multidex:$VERSION_MULTIDEX"
    implementation "androidx.cardview:cardview:$VERSION_SUPPORT_LIBRARY"
    implementation "androidx.legacy:legacy-support-v4:$VERSION_SUPPORT_LIBRARY"
    implementation "androidx.constraintlayout:constraintlayout:1.1.3"


    //retrofit
    implementation "com.squareup.retrofit2:retrofit:$VERSION_RETROFIT"
    implementation "com.squareup.retrofit2:converter-gson:$VERSION_RETROFIT"
    implementation "com.squareup.retrofit2:adapter-rxjava2:$VERSION_RETROFIT"
    implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

    //rxjava
    implementation "io.reactivex.rxjava2:rxjava:2.2.1"
    implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'

    //dagger for DI
    implementation "com.google.dagger:dagger:$DAGGER_VERSION"
    implementation "com.google.dagger:dagger-android-support:$DAGGER_VERSION"
    annotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
    annotationProcessor "com.google.dagger:dagger-android-processor:$DAGGER_VERSION"
    androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:$DAGGER_VERSION"


    ///butterknife
    implementation 'com.jakewharton:butterknife:10.0.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'

    //Glide
    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
    implementation "com.github.bumptech.glide:okhttp3-integration:4.7.1"
    implementation 'com.github.bumptech.glide:compiler:4.7.1'

    //MP Chart Library for graphs
    implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
    implementation 'com.code-troopers.betterpickers:library:3.1.0'

    //csvreader and normal distribution
    implementation 'net.sf.opencsv:opencsv:2.3'
    implementation 'org.apache.commons:commons-math3:3.6.1'

    //platform
    implementation 'com.rg.crossex:rgsso-careseeker-sdk:0.4.41-SNAPSHOT'
    implementation 'com.rg.crossex:rgnotification-sdk:0.0.8'
    implementation 'com.rg.crossex:filepicker:0.0.2'
    implementation 'com.rg.crossex:rgcontent-sdk:0.0.8'

    //FCM library
    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation "com.google.firebase:firebase-messaging:17.3.4"

    //Location
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-base:16.0.1'
    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation 'com.google.android.gms:play-services-fitness:16.0.1'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'

    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.7'
    implementation 'com.google.android:flexbox:1.1.0'

    //Mixpanel
    implementation 'com.mixpanel.android:mixpanel-android:5.+'

    implementation group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.7.0'

    //Work manager
    implementation "android.arch.work:work-runtime:$VERSION_WORK"

    //life cycle
    implementation "android.arch.lifecycle:extensions:1.1.1"

    //lombok
//    compileOnly 'org.projectlombok:lombok:1.18.4'
//    annotationProcessor 'org.projectlombok:lombok:1.18.4'

    // Room SQLite for data persistence
    implementation "android.arch.persistence.room:runtime:$ROOM_VERSION"
    annotationProcessor "android.arch.persistence.room:compiler:$ROOM_VERSION"

    // optional - RxJava support for Room
    implementation "android.arch.persistence.room:rxjava2:$ROOM_VERSION"

    // Android Architecture Components
    implementation "android.arch.lifecycle:extensions:$ARCHITECTURE_COMPONENT_VERSION"
    implementation "android.arch.lifecycle:common-java8:$ARCHITECTURE_COMPONENT_VERSION"
    implementation "android.arch.lifecycle:reactivestreams:$ARCHITECTURE_COMPONENT_VERSION"

    //Shimmer
    implementation 'com.facebook.shimmer:shimmer:0.4.0'

    //Payment gateway
    implementation 'com.razorpay:checkout:1.5.5'
    implementation project(':platform-zoom-android-sdk')
    implementation "javax.xml.bind:jaxb-api:2.3.0"
    implementation "com.sun.xml.bind:jaxb-core:2.2.11"
    implementation "com.sun.xml.bind:jaxb-impl:2.2.11"
    implementation "javax.activation:activation:1.1.1"
}

出了什么问题

  

执行任务失败   ':app:compileProductionReleaseJavaWithJavac'。   javax / xml / bind / JAXBException

1 个答案:

答案 0 :(得分:0)

尝试使用较低版本的JDK。我在android studio中有一个类似的问题(在设置数据绑定和viewBinding时),当我将openjdk11中使用的jdk更改为android Studio中的嵌入jdk时,它起作用了。