2

2.2に更新した後、私は持っています

dex はバージョン 52 のバイトコード android を解析できません

だから私はJavaバージョン1.7の使用を強制しようとしましたが、エラーを渡すことができましたが、今はこれを受け取ります:

エラー: タスク ':app:transformClassesWithPreJackPackagedLibrariesForDebug' の実行に失敗しました。com.android.build.api.transform.TransformException: com.android.jack.api.v01.CompilationException: Jar 変換: null

これが私のモジュールGradleです:

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

    dependencies {
        // The Fabric Gradle plugin uses an open ended version to react
        // quickly to Android tooling updates
        classpath 'io.fabric.tools:gradle:1.+'
    }
}


apply plugin: 'com.android.application'
apply plugin: 'io.fabric'


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


android {
    compileSdkVersion 24
    buildToolsVersion "24.0.1"

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/BCKEY.DSA'
        exclude 'AUTHORS'
        exclude 'META-INF/services/javax.annotation.processing.Processor' // butterknife
        exclude 'META-INF/BCKEY.SF'
        exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
        exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
    }

    defaultConfig {
        applicationId "aroundwise.nepi"
        minSdkVersion 21
        targetSdkVersion 24
        versionCode 1
        versionName "1.1.7"
        multiDexEnabled true
        jackOptions {
            enabled true
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            def apk = output.outputFile;
            def newName;

            if (variant.buildType.name == "release") {
                newName = apk.name.replace("app-debug", "-release-Nepi" + "-v" + defaultConfig.versionName + ".apk");
            } else {
                newName = apk.name.replace("app-debug.apk", "-Nepi" + "-v" + defaultConfig.versionName + ".apk");
            }


            output.outputFile = new File(apk.parentFile, newName);

            if (variant.buildType.zipAlignEnabled) {
                output.outputFile = new File(apk.parentFile, newName.replace("-unaligned", ""));
            }

            logger.info('INFO: Set outputFile to ' + output.outputFile + " for [" + variant.name + "]");
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
}


dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') {
        transitive = true;
    }

    compile 'com.android.support:multidex:1.0.0'

    //BUTTERKNIFE
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.2.1'
    compile 'com.jakewharton:butterknife:8.2.1'

    //MVP & ParcelablePlease & Adapter
    annotationProcessor 'com.hannesdorfmann.annotatedadapter:processor:1.1.1'
    annotationProcessor 'com.hannesdorfmann.parcelableplease:processor:1.0.2'
    compile 'com.hannesdorfmann.annotatedadapter:annotation:1.1.1'
    compile 'com.hannesdorfmann.annotatedadapter:support-recyclerview:1.1.1'
    compile 'com.hannesdorfmann.mosby:mvp:2.0.1'
    compile 'com.hannesdorfmann.mosby:viewstate:2.0.1'
    compile 'com.hannesdorfmann.parcelableplease:annotation:1.0.2'

    //AROUNDWISE SDK's
    compile(name: 'aroundwisesdk', ext: 'aar')
    compile(name: 'aroundwisecards', ext: 'aar')

    //GOOGLE
    compile 'com.google.gms:google-services:2.1.2'
    compile 'com.google.android.gms:play-services-maps:9.4.0'
    compile 'com.google.android.gms:play-services-gcm:9.4.0'
    compile 'com.google.android.gms:play-services-location:9.4.0'
    compile 'com.google.code.gson:gson:2.7'
    compile 'com.google.maps.android:android-maps-utils:0.4.+'

    //FACEBOOK
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.facebook.fresco:fresco:0.13.0'

    //ANDROID
    compile 'com.android.support:support-v4:24.2.1'
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:recyclerview-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:support-annotations:24.2.1'

    //RETROFIT&RxANDROID
    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    compile 'com.squareup.retrofit2:converter-gson:2.0.0'
    compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    compile 'io.reactivex:rxandroid:1.2.0'
    compile 'io.reactivex:rxjava:1.1.5'
    compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0'

    //UTIL
    compile 'com.github.jinatonic.confetti:confetti:1.0.0'
    compile 'com.viewpagerindicator:library:2.4.1@aar'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.orhanobut:logger:1.15'
    compile 'de.greenrobot:eventbus:2.4.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'uk.co.chrisjenx:calligraphy:2.2.0'
    compile 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
    compile 'com.github.lzyzsd:circleprogress:1.1.0@aar'
    compile 'com.lorentzos.swipecards:library:1.0.9@aar'
    compile 'com.daprlabs.aaron:cardstack:0.3.1-beta0'
    compile 'org.altbeacon:android-beacon-library:2.+@aar'
    compile 'me.relex:circleindicator:1.1.5@aar'

    //BeaconSDk needed
    compile 'com.squareup.okhttp:okhttp:2.3.0'
    compile 'com.hannesdorfmann.mosby:retrofit:1.1.0'
    compile 'me.relex:circleindicator:1.1.5@aar'

    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4'
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
    testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4'
}
repositories {
    flatDir {
        dirs 'libs'
    }

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

そして、ここに私のプロジェクトGradleがあります:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.1'

        classpath 'com.google.gms:google-services:3.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        maven { url "http://dl.bintray.com/populov/maven" }
        maven{
            url 'https://oss.sonatype.org/content/repositories/snapshots/'
        }
        maven {
            // For icepick
            url 'https://clojars.org/repo/'
        }
        jcenter()
        jcenter {
            url "http://jcenter.bintray.com/"
        }
    }
}


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

そして、これは私が受け取るすべてのエラーです

エラー:Jar 変換: null

エラー:com.android.jack.JackAbortException: Jar 変換: null

エラー:com.android.jack.JarTransformationException: Jar 変換: null エラー:com.android.jill.JillException

エラー:java.lang.NullPointerException エラー:タスク ':app:transformClassesWithPreJackPackagedLibrariesForDebug' の実行に失敗しました。

com.android.build.api.transform.TransformException: com.android.jack.api.v01.CompilationException: Jar 変換: null

皆さん、ありがとうございました!

4

1 に答える 1

0

この問題を解決できませんでした。私にとってうまくいったのは、Androidスタジオ2.1.3(アップデート前のもの)をインストールして、このバージョンで実行することでした。

于 2016-10-21T07:45:45.483 に答える