我在android studio中的app引擎端点的gradle构建时遇到了问题。
说我在打包APK期间有重复文件
Origin 1
Origin 1: /home/c/.gradle/caches/modules-2/files-2.1/com.google.appengine/appengine-api-1.0-sdk/1.9.19/188d623cac7193f2f46f44dc7b76f3ba2342a09f/appengine-api-1.0-sdk-1.9.19.jar
Origin 2
Origin 2: /home/c/.gradle/caches/modules-2/files-2.1/com.google.appengine/appengine-endpoints/1.9.19/bf21fb26e6f26a9da29f3db35f183092741f3c02/appengine-endpoints-1.9.19.jar
然后它给出选项/解决方案:
You can ignore those files in your build.gradle:
android {
packagingOptions {
}
exclude 'com/google/appengine/repackaged/org/apache/commons/codec/language/bm/ash_approx_common.txt'
}
但我在端点build.gradle中没有android {}。而我也不能添加它?我怎么能排除/解决这个问题
我的代码:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.appengine:gradle-appengine-plugin:1.9.22'
}
}
repositories {
jcenter();
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'appengine'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
dependencies {
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.19'
compile ('com.google.appengine:appengine-endpoints:1.9.19')
compile ('com.google.appengine:appengine-endpoints-deps:1.9.19')
compile ('javax.servlet:servlet-api:2.5')
compile ('com.googlecode.objectify:objectify:5.1.1')
compile ('com.ganyo:gcm-server:1.0.2')
compile ('com.sendgrid:sendgrid-java:2.2.1'){
exclude(group: 'org.apache.httpcomponents', module: 'httpclient')
exclude(group: 'org.json', module: 'json')
}
}
appengine {
downloadSdk = true
appcfg {
oauth2 = true
}
endpoints {
getClientLibsOnBuild = true
getDiscoveryDocsOnBuild = true
}
}