并且此控制台错误:
`CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_131\bin\java.exe -classpath "C:\Program Files\Unity2017.2\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleDebug"
stderr[
C:\Projects\UpJump\Temp\gradleOut\build\intermediates\exploded-aar\com.android.support.appcompat-v7-28.0.0-alpha1\res\values-v28\values-v28.xml:5:5-8:13: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\DevTools\sdk\build-tools\26.0.1\aapt.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]
stdout[
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location 'D:\DevTools\sdk\add-ons\addon-google_apis-google-19-1' (Expected 'D:\DevTools\sdk\add-ons\addon-google_apis-google-19')
Observed package id 'build-tools;18.0.1' in inconsistent location 'D:\DevTools\sdk\build-tools\android-4.3' (Expected 'D:\DevTools\sdk\build-tools\18.0.1')
Observed package id 'system-images;android-17;default;mips' in inconsistent location 'D:\DevTools\sdk\system-images\android-17\mips' (Expected 'D:\DevTools\sdk\system-images\android-17\default\mips')
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:preReleaseBuild UP-TO-DATE
我不确定要关注什么错误,我做了一些研究,有些人建议更新SDK其他说更新是导致这个的原因,我最终安装Android工作室并使用其SDK路径统一,也安装了Android- p(预览)sdk,错误更改为:
错误代码:
stderr[
C:\Projects\UpJump\Temp\gradleOut\build\intermediates\exploded-aar\com.android.support.appcompat-v7-28.0.0-alpha1\res\values-v28\values-v28.xml:5:5-8:13: AAPT: No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\DevTools\New_SDK\build-tools\27.0.3\aapt.exe'' finished with non-zero exit value 1
请问好吗?
编辑: 添加Build.gradle
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.application'
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name: 'cardview-v7-25.3.1', ext:'aar')
compile(name: 'common', ext:'aar')
compile(name: 'GoogleAIDL', ext:'aar')
compile(name: 'GooglePlay', ext:'aar')
compile(name: 'onesignal-unity', ext:'aar')
compile(name: 'percent-25.3.1', ext:'aar')
compile(name: 'unity-ads', ext:'aar')
compile project(':answers')
compile project(':beta')
compile project(':crashlytics')
compile project(':crashlytics-wrapper')
compile project(':fabric')
compile project(':fabric-init')
compile project(':GoogleMobileAdsPlugin')
compile project(':OneSignalConfig')
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
multiDexEnabled true
targetSdkVersion 27
applicationId 'com.chorusworldwide.upjump'
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb'
}
buildTypes {
debug {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
jniDebuggable true
}
release {
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
}
}
}
谢谢