Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/303.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在android studio中导入javax.json.binding?_Java_Android_Java 8_Android Studio 3.0_Jsonb Api - Fatal编程技术网

如何在android studio中导入javax.json.binding?

如何在android studio中导入javax.json.binding?,java,android,java-8,android-studio-3.0,jsonb-api,Java,Android,Java 8,Android Studio 3.0,Jsonb Api,我在build.gradle文件中添加了以下依赖项 apply plugin: 'com.android.application' android { compileSdkVersion 26 defaultConfig { applicationId "com.example.canwin.androidmockups" minSdkVersion 15 targetSdkVersion 26 versionCo

我在build.gradle文件中添加了以下依赖项

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.canwin.androidmockups"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        multiDexEnabled = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'com.uncopt:android.justified:1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'

}
编译“javax.json.bind:javax.json.bindapi:1.0.0-M2”,它抛出如下错误


错误:任务“:app:transformClassesWithDesugarForDebug”的执行失败

com.android.build.api.transform.TransformException:java.lang.RuntimeException:java.lang.RuntimeException:com.android.ide.common.process.ProcessException:使用带有参数的主类com.google.devtools.build.android.desugar.desugar执行java进程时出错{--input/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframesfix/debug/11.jar--output/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/app/build/intermediates/transforms/stackframesfix/debug/6.jar---output/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/desugar/debug/5.jar--input/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/desugar/debug/18.jar--input/Users/panmoh/Documents/androidmoh/models/transforms/app/build/intermediates/transforms/stackFramesFixer/debug/18.jar--output/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/desugar/debug/17.jar--input/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframes/stackFramesFixer/debug/26.jar----output/Users/panmoh/Documents/androidmoh/Documents/build/transforms/desugar/debug/21.jar--input/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar--output/Users/panmoh/Documents/AndroidMockUps/debug/4.jar--output/Users/panmoh/Documents/androidmoh/intermediates/transforms/desugar/debug/3.jar----类路径_条目/Users/panmoh/Documents/androidath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar--类路径_entry/Users/panmoh/Documents/Documents/androidmoh/transforms/stackframes/transforms/stackframes/stack/4.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar--classpath_entry/Users/panmoh/Documents/intermediates/transforms/stackFramesFixer/debug/6.jar----classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/transforms/stackFram/stackFramesFixer/debug/7.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar--classpath_entry/Users/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transf/apporms/stackframesfix/debug/10.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframesfix/debug/11.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframesfix/debug/12.jar----classpath_entry/Users/panmoh/Documents/Documents/androidmoh/moh/mockupsermediates/transforms/stackFramesFixer/debug/13.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframes/debug/15.jar----classpath_entry/Users/panmoh/Documents/Documents/panmohUps/app/build/intermediates/transforms/stackframesfix/debug/16.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframesfix/debug/17.jar--classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframesfix/debug/18.jar----classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar--classpath\u entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar--classpath\u entry/Users/panmoh/Documents/androidmohs/transforms/stackframes/transforms/stackFramesFixer/debug/21.jar------类路径\u ent/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackFramesFixer/debug/26.jar——classpath_entry/Users/panmoh/Documents/AndroidMockUps/app/build/intermediates/transforms/stackframes/debug/27.jar——bootclaspath_entry/Users/panmoh/Library/Android/sdk/platforms/Android-26/Android.jar——bootclaspath_entry/Users/panmoh/Library/Android/sdk/platforms/Android-26/optional/org.apache.http.legacy.jar——bootclaspath\u entry/Applications/Android Studio.app/lib/rt.jar——bootclaspath\u entry/Applications/Android Studio.app/Contents/jre/lib/rt.jar——bootclaspath\u entry/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/jre/lib/jsse.jar--bootclasspath\u entry/Applications/Android Studio.app/Contents/jre/Contents/Home/Home/jre/jre/Contents/Home/jre/lib/charsets.jar--minu sdk\u版本15--desugar try\u如果需要的话--desugar try\u使用资源me_类}

这是我的build.gradle文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.example.canwin.androidmockups"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        multiDexEnabled = true
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        targetCompatibility 1.8
        sourceCompatibility 1.8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
    compile 'com.uncopt:android.justified:1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'

}

转到此链接并下载jar文件,然后将其添加到app->libs文件夹中的项目文件夹中。然后,syn您的项目

解决方案2:


错误:任务的执行失败 “:app:transformclasses with desugarfordebug”

com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException:执行时出错 带有主类的java进程 com.google.devt