我在Gradle控制台中一直收到此错误:
AGPBI:{" kind":"错误","文字":"不允许字符串类型(在\ u0027buyButtonAppearance \ u0027有价值\ u0027android_pay_dark \ u0027)""来源":[{"文件":" d:\个人\应用\构建\中间体\分解-AAR \ COM .google.android.gms \玩服务钱包\ 9.4.0 \ RES \值\ values.xml""位置" {" STARTLINE":44,& #34; STARTCOLUMN&#34:4,"开始偏移":5370," ENDLINE":56," ENDCOLUMN":12," endOffset&#34 ;:6369}}],"原":"""工具":" AAPT"}'
在“消息”部分,我不断收到此消息:
D:\ personal \ app \ build \ intermediates \ explosion-aar \ com.google.android.gms \ play-services-wallet \ 9.4.0 \ res \ values \ values.xml错误:(45,5)不允许使用字符串类型(在' buyButtonAppearance'有值' android_pay_dark')。错误:任务':app:processDebugResources'执行失败。 com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令' C:\ xxxx \ AppData \ Local \ Android \ sdk \ build-tools \ 23.0 0.1 \ aapt.exe''完成非零退出值1
这是整个项目的build.grade:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
allprojects {
repositories {
jcenter()
}
}
任何人都可以帮我解决这个问题吗?
另一个build.gradle在这里:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
dexOptions {
javaMaxHeapSize "4g"
}
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.appexample"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
signingConfigs {
release {
storeFile file("android.keystore")
storePassword 'sdsgfgh'
keyAlias "appexample"
keyPassword 'sdsgfgh'
}
}
buildTypes {
release {
//minifyEnabled false
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
//signingConfig signingConfigs.release
//multiDexEnabled true
signingConfig signingConfigs.release
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_5
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
}
}
repositories {
maven { url "https://bitbucket.org/adexim/androidsdk/raw/master/" }
}
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}