Guest User

Untitled

a guest
Jan 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. apply plugin: 'com.android.application'
  2.  
  3. android {
  4. compileSdkVersion 25
  5. buildToolsVersion "26.0.0"
  6. defaultConfig {
  7. applicationId "com.example.avi.myapplication"
  8. minSdkVersion 15
  9. targetSdkVersion 25
  10. versionCode 1
  11. versionName "1.0"
  12. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  13. }
  14. buildTypes {
  15. release {
  16. minifyEnabled false
  17. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  18. }
  19. }
  20.  
  21. packagingOptions {
  22. exclude 'META-INF/ASL2.0'
  23. exclude 'META-INF/LICENSE'
  24. exclude 'META-INF/license.txt'
  25. exclude 'META-INF/NOTICE'
  26. exclude 'META-INF/notice.txt'
  27. //pickFirst 'META-INF/spring.schemas'
  28. //pickFirst 'META-INF/spring.tooling'
  29. //pickFirst 'META-INF/spring.handlers'
  30. //pickFirst 'META-INF/spring.factories'
  31. }
  32. }
  33.  
  34. dependencies {
  35. compile fileTree(dir: 'libs', include: ['*.jar'])
  36. androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  37. exclude group: 'com.android.support', module: 'support-annotations'
  38. })
  39.  
  40.  
  41. compile 'com.android.support:appcompat-v7:25.3.1'
  42. compile 'com.android.support.constraint:constraint-layout:1.0.2'
  43. testCompile 'junit:junit:4.12'
  44. compile 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
  45. compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2'
  46. }
  47.  
  48. repositories {
  49. maven {
  50. url 'https://repo.spring.io/libs-milestone'
  51. }
  52. }
  53.  
  54. Error:Execution failed for task
  55.  
  56. ':app:transformResourcesWithMergeJavaResForDebug'.
  57. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/spring.schemas
  58. File1: C:UsersAvi.gradlecachesmodules-2files-2.1org.springframework.dataspring-data-commons2.0.2.RELEASE1befa3239976b856202b1735531910a0c2f4e17fspring-data-commons-2.0.2.RELEASE.jar
  59. File2: C:UsersAvi.gradlecachesmodules-2files-2.1org.springframeworkspring-beans5.0.2.RELEASE301ee07b390bc8b5691f4206411b49beb06f7ff2spring-beans-5.0.2.RELEASE.jar
  60.  
  61. Error:Error converting bytecode to dex:
  62. Cause: Dex cannot parse version 52 byte code.
  63. This is caused by library dependencies that have been compiled using Java 8 or above.
  64. If you are using the 'java' gradle plugin in a library submodule add
  65. targetCompatibility = '1.7'
  66. sourceCompatibility = '1.7'
  67. to that submodule's build.gradle file.
Add Comment
Please, Sign In to add comment