Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apply plugin: 'com.android.application'
- android {
- compileSdkVersion 25
- buildToolsVersion "26.0.0"
- defaultConfig {
- applicationId "com.example.avi.myapplication"
- minSdkVersion 15
- targetSdkVersion 25
- versionCode 1
- versionName "1.0"
- testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
- }
- buildTypes {
- release {
- minifyEnabled false
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
- }
- }
- packagingOptions {
- exclude 'META-INF/ASL2.0'
- exclude 'META-INF/LICENSE'
- exclude 'META-INF/license.txt'
- exclude 'META-INF/NOTICE'
- exclude 'META-INF/notice.txt'
- //pickFirst 'META-INF/spring.schemas'
- //pickFirst 'META-INF/spring.tooling'
- //pickFirst 'META-INF/spring.handlers'
- //pickFirst 'META-INF/spring.factories'
- }
- }
- dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- 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'
- testCompile 'junit:junit:4.12'
- compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
- compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2'
- }
- repositories {
- maven {
- url 'https://repo.spring.io/libs-milestone'
- }
- }
- Error:Execution failed for task
- ':app:transformResourcesWithMergeJavaResForDebug'.
- > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/spring.schemas
- File1: C:UsersAvi.gradlecachesmodules-2files-2.1org.springframework.dataspring-data-commons2.0.2.RELEASE1befa3239976b856202b1735531910a0c2f4e17fspring-data-commons-2.0.2.RELEASE.jar
- File2: C:UsersAvi.gradlecachesmodules-2files-2.1org.springframeworkspring-beans5.0.2.RELEASE301ee07b390bc8b5691f4206411b49beb06f7ff2spring-beans-5.0.2.RELEASE.jar
- Error:Error converting bytecode to dex:
- Cause: Dex cannot parse version 52 byte code.
- This is caused by library dependencies that have been compiled using Java 8 or above.
- If you are using the 'java' gradle plugin in a library submodule add
- targetCompatibility = '1.7'
- sourceCompatibility = '1.7'
- to that submodule's build.gradle file.
Add Comment
Please, Sign In to add comment