2017-04-03 5 views
-1

Ich habe Bibliothek enter link description here aber die App nach dem Start nehme ich einen Fehler wie diese Fehler: Fehler Bytecode Umwandlung Dex: Ursache: nicht unterstützte Klassendatei Version 52.0 Sorry für mein Englisch. Bitte helfen Sie mirYandex Übersetzen Api android

Das ist mein build.gradle Datei

apply plugin: 'com.android.application' 


android { 
compileSdkVersion 25 
buildToolsVersion '25.0.2' 
defaultConfig { 
    applicationId "com.example.macbookairmd760.zaebalas" 
    minSdkVersion 23 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    javaCompileOptions{ 
     annotationProcessorOptions{ 
      includeCompileClasspath true 
     } 
    } 

} 
buildscript { 
    tasks.withType(JavaCompile) { 

    } 
} 


packagingOptions { 
    exclude 'META-INF/DEPENDENCIES.txt' 
    exclude 'META-INF/LICENSE.txt' 
    exclude 'META-INF/NOTICE.txt' 
    exclude 'META-INF/NOTICE' 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/DEPENDENCIES' 
    exclude 'META-INF/notice.txt' 
    exclude 'META-INF/license.txt' 
    exclude 'META-INF/dependencies.txt' 
    exclude 'META-INF/LGPL2.1' 
} 

configurations.all { 
    resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1' 
} 
repositories { 
    maven { 
     url "https://jitpack.io" 
    } 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 

dexOptions { 
    incremental false 
} 
} 

dependencies { 

compile fileTree(include: ['*.jar'], dir: 'libs') 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.github.vbauer:yandex-translate-api:1.2.5' 

}

Dies ist ein Fehler:

Information:Gradle tasks [:app:assembleDebug] 
Warning:The `android.dexOptions.incremental` property is deprecated and it has no effect on the build process. 
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency commons-logging:commons-logging:1.2 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency org.json:json:20160212 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency commons-logging:commons-logging:1.2 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5.2 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Warning:WARNING: Dependency org.json:json:20160212 is ignored for debug as it may be conflicting with the internal version provided by Android. 
Error:Error converting bytecode to dex: 
Cause: unsupported class file version 52.0 
Error:java.lang.RuntimeException: com.android.dx.cf.iface.ParseException: unsupported class file version 52.0 
Error: at com.android.ide.common.internal.WaitableExecutor.waitForTasksWithQuickFail(WaitableExecutor.java:176) 
Error: at com.android.builder.dexing.DexArchiveBuilder.processOutputs(DexArchiveBuilder.java:95) 
Error: at com.android.builder.dexing.DexArchiveBuilder.convert(DexArchiveBuilder.java:78) 
Error: at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.lambda$cacheMissAction$0(DexArchiveBuilderTransformCallable.java:233) 
Error: at com.android.builder.utils.FileCache.lambda$createFile$1(FileCache.java:262) 
Error: at com.android.builder.utils.FileCache.lambda$null$5(FileCache.java:423) 
Error: at com.android.builder.utils.FileCache.doInterProcessLocked(FileCache.java:668) 
Error: at com.android.builder.utils.FileCache.doLocked(FileCache.java:620) 
Error: at com.android.builder.utils.FileCache.lambda$queryCacheEntry$6(FileCache.java:402) 
Error: at com.android.builder.utils.FileCache.doInterProcessLocked(FileCache.java:668) 
Error: at com.android.builder.utils.FileCache.doLocked(FileCache.java:620) 
Error: at com.android.builder.utils.FileCache.queryCacheEntry(FileCache.java:378) 
Error: at com.android.builder.utils.FileCache.createFile(FileCache.java:275) 
Error: at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.getFromCacheAndCreateIfMissing(DexArchiveBuilderTransformCallable.java:184) 
Error: at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.call(DexArchiveBuilderTransformCallable.java:146) 
Error: at com.android.build.gradle.internal.transforms.DexArchiveBuilderTransformCallable.call(DexArchiveBuilderTransformCallable.java:53) 
Error: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
Error: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
Error: at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
Error: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
Error: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
Error: at java.lang.Thread.run(Thread.java:745) 
Error:Caused by: com.android.dx.cf.iface.ParseException: unsupported class file version 52.0 
Error: at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:485) 
Error: at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406) 
Error: at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388) 
Error: at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251) 
Error: at com.android.builder.dexing.DexArchiveBuilderCallable.parseClass(DexArchiveBuilderCallable.java:80) 
Error: at com.android.builder.dexing.DexArchiveBuilderCallable.call(DexArchiveBuilderCallable.java:66) 
Error: at com.android.builder.dexing.DexArchiveBuilderCallable.call(DexArchiveBuilderCallable.java:40) 
Error: ... 6 more 
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'. 
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.utils.FileCache$FileCreatorException: com.android.builder.dexing.DexArchiveBuilder$DexBuilderException: Unable to convert input to dex archive. 
Information:BUILD FAILED 
Information:Total time: 3.325 secs 
Information:34 errors 
Information:9 warnings 
Information:See complete output in console 

Antwort

1

com.github.vbauer:yandex-translate-api:1.2.5 Bibliothek verwendet Java 8 und Android unterstützt nur Java 7 .

Leider können Sie diese Bibliothek nicht in Ihrem Projekt verwenden.

+0

Danke für Ihre Antwort! Aber keine Varianten zum Hinzufügen dieser Bibliothek ??: – Bekha

+0

Sie können Retrofit2 http://square.github.io/retrofit/ Bibliothek verwenden und einfach Ihren eigenen Rest-api-Service @bekha erstellen – shmakova