- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
几天来我一直在为这个问题苦苦挣扎,我似乎找不到解决它的方法,这里是完整的错误:
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[
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'gradleOut'.
> failed to find Build Tools revision 28.0.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]
stdout[
BUILD FAILED
Total time: 2.877 secs
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
这是我的 gradle.build 内容:
// 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: 'android.arch.core.runtime-1.1.0', ext:'aar')
compile(name: 'android.arch.lifecycle.livedata-core-1.1.0', ext:'aar')
compile(name: 'android.arch.lifecycle.runtime-1.1.0', ext:'aar')
compile(name: 'android.arch.lifecycle.viewmodel-1.1.0', ext:'aar')
compile(name: 'cardview-v7-25.3.1', ext:'aar')
compile(name: 'com.android.support.animated-vector-drawable-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.appcompat-v7-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.asynclayoutinflater-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.cardview-v7-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.coordinatorlayout-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.cursoradapter-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.customtabs-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.customview-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.documentfile-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.drawerlayout-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.interpolator-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.loader-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.localbroadcastmanager-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.percent-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.print-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.recyclerview-v7-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.slidingpanelayout-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-compat-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-core-ui-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-core-utils-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-fragment-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-media-compat-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-v4-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.support-vector-drawable-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.swiperefreshlayout-28.0.0-alpha1', ext:'aar')
compile(name: 'com.android.support.viewpager-28.0.0-alpha1', ext:'aar')
compile(name: 'com.github.vungle.vungle-android-sdk-5.3.0', ext:'aar')
compile(name: 'com.google.ads.mediation.unity-2.1.2.0', ext:'aar')
compile(name: 'com.google.ads.mediation.vungle-5.3.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-lite-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-ads-lite-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-base-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-base-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-basement-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-basement-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-gass-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-gass-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-gcm-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-gcm-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-iid-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-iid-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-location-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-location-license-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-tasks-11.8.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-tasks-license-11.8.0', ext:'aar')
compile(name: 'com.sglib.easymobile.easy-mobile-1.0.2', ext:'aar')
compile(name: 'com.unity3d.ads.unity-ads-2.1.2', ext:'aar')
compile(name: 'common', ext:'aar')
compile(name: 'constraint-layout-1.0.2', 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 21
buildToolsVersion '28.0.0'
defaultConfig {
multiDexEnabled true
targetSdkVersion 21
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'
}
}
}
出于某种原因,它一直将其 buildToolsVersion 覆盖为“'28.0.0'”,即使我专门将build设置设置为此:
我还将我自己的 gradle.build 文件添加到 Plugin/Android,这是同一个文件,但不同的 BuildToolsVersion 设置为 27.0.0,然而,位于项目内 Temp 文件夹中的 build.gradle 文件仍在重置自身到“28”,
我还将我自己的 gradle.build 文件添加到 Plugin/Android,这是同一个文件,但不同的 BuildToolsVersion 设置为 27.0.0,然而,位于项目内 Temp 文件夹中的 build.gradle 文件仍在重置自身到“28”,最后是我的 SDK 管理器的一些截图:
Android (P) 的部分安装是因为这个(我不必全部安装它们不是吗?):
SDK 工具:
更新:从构建工具中删除 28.0.0-rc1 后,build.gradle 开始构建版本 27,但现在出现新错误:
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\New_SDK\build-tools\27.0.0\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.
]
最佳答案
AWrightIV's answer把我带到了那里。但对我来说,解决方案没那么复杂。当您在播放器设置中打开“使用自定义 gradle 文件”并更改 buildToolsVersion 行时,我生成了一个统一创建的 mainTemplate.gradle 文件。
Assets/Plugins/Android/mainTemplate.gradle 中的原始行:
buildToolsVersion '**BUILDTOOLS**'
新:
buildToolsVersion '27'
关于android - Unity Gradle build 找不到 Build Tools 修订版 28.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49323682/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!