这是我的build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.example.demo"
minSdkVersion 16
targetSdkVersion 21
multiDexEnabled true
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
aaptOptions
{
cruncherEnabled = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile project(':draggerLibrary')
compile project(':staggeredGridViewmaster')
compile files('libs/httpclientandroidlib-1.2.1.jar')
compile files('libs/httpcore-4.4-beta1.jar')
compile files('libs/httpmime-4.3.jar')
compile project(':viewPagerLibrary')
compile project(path: ':ViewPagerLibrary')
compile 'com.android.support:multidex:1.0.1'
compile 'joda-time:joda-time:2.4'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.google.android.gms:play-services:11.0.2'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.google.guava:guava:20.0'
compile "com.daimajia.swipelayout:library:1.2.0@aar"
compile 'com.github.PhilJay:MPAndroidChart:v2.1.6'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
}
错误:任务执行失败 ':DemoProject:transformClassesWithJarMergingForDebug'
com.android.build.api.transform.TransformException:java.util.zip.ZipException:重复条目: 机器人/支撑/ V4 /提供者/ DocumentsContractApi19.class
答案 0 :(得分:3)
配置 build.gradle
。
使用强>
compileSdkVersion 25
buildToolsVersion "25.0.2"
然后
compile 'com.google.android.gms:play-services:11.0.2'
compile 'com.android.support:appcompat-v7:25.3.1'
对于 MAP 问题,请使用 getMapAsync()
SupportMapFragment mapOBJ = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map));
mapOBJ.getMapAsync(this);