Задать вопрос
@homt60

Unity ошибка при создании билда android как исправить?

При попытки забилдить проект под андроид Несколько ошибок
670a1d70bbace760883761.png
Вот третья ошибка

CommandInvokationFailure: Gradle build failed.
/Applications/Unity/Hub/Editor/2022.3.30f1/PlaybackEngines/AndroidPlayer/OpenJDK/bin/java -classpath "/Applications/Unity/Hub/Editor/2022.3.30f1/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-7.2.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

Environment Variables:
AMPLITUDE_API_KEY_REDBUCKET_DEV = 46b8b46515e7632fc42a504b72e05fd0
DEBUG_ENV_VAR = UnityHub
XPC_FLAGS = 0x0
DISPLAY = /private/tmp/com.apple.launchd.qoyblhXQ5c/org.xquartz:0
__CFBundleIdentifier = com.unity3d.unityhub
AMPLITUDE_API_KEY_GREENBUCKET_DEV = 3ded2a762163603391a425f688f990c8
AMPLITUDE_TOKEN_REDBUCKET_DEV = U4PSN7S7PuYVRODivvdcFwbu8R6IHGqa
COMMAND_MODE = unix2003
AMPLITUDE_API_KEY_GREENBUCKET_PROD = c86fea37a9e1d3f0878b96e15b111c7c
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
SENTRY_ACCESS_TOKEN = 3df78d9e53f8456aa90fbae044ce1a6261421ab1d0014674bc2e933477289017
JAVA_HOME = /Applications/Unity/Hub/Editor/2022.3.30f1/PlaybackEngines/AndroidPlayer/OpenJDK
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_DEV = client-wbjHYrmeSR87GmWOE7LDpf7sUySOIKHm
AMPLITUDE_TOKEN_GREENBUCKET_PROD = ZpUcbAdZXJYzNSoHsAWtL_s_JppwWid9
AMPLITUDE_API_KEY = 28f3cae0b33b8b3702120c9ed1a935aa
XPC_SERVICE_NAME = application.com.unity3d.unityhub.81472191.81472197
ANDROID_NDK_ROOT = /Applications/Unity/Hub/Editor/2022.3.30f1/PlaybackEngines/AndroidPlayer/NDK
AMPLITUDE_API_KEY_STAGING = 83ee04fccc67e4fcc7dd527c4c6f1e21
WOOTRIC_CLIENT_TOKEN = NPS-aa8be4c3
USER = arseniysitnikov
MallocNanoZone = 0
LOGNAME = arseniysitnikov
__CF_USER_TEXT_ENCODING = 0x1F5:0x7:0x31
AMPLITUDE_API_KEY_YELLOWBUCKET_DEV = 48835b4d1f5e342aefe5f016324d296a
PATH = /usr/bin:/bin:/usr/sbin:/sbin
SSH_AUTH_SOCK = /private/tmp/com.apple.launchd.YcSy7E1vL7/Listeners
AMPLITUDE_API_KEY_YELLOWBUCKET_PROD = e03a9bbe92dc38a88cdb068d24c65b46
AMPLITUDE_TOKEN_REDBUCKET_PROD = jTIgKs5KTZOjiqEEVdZFbgo_VRhABduL
AMPLITUDE_TOKEN_YELLOWBUCKET_PROD = UYDQtPOw83dIfVy3SrW5oMyo7ru4PRkV
HOME = /Users/arseniysitnikov
TMPDIR = /var/folders/79/f9270rms3mx05q5rcg1k2sc80000gn/T/
AMPLITUDE_TOKEN_GREENBUCKET_DEV = 84H2gMm_FJzhr3mBaX1lM1JVukmCM7d9
AMPLITUDE_TOKEN_YELLOWBUCKET_DEV = wKi8foVigDditGFvmZewRFWsEbX9Y0YO
SHELL = /bin/zsh
AMPLITUDE_API_KEY_REDBUCKET_PROD = ca12bb461ea96f9bdf5df4ded7d52994
AMPLITUDE_DEPLOYMENT_KEY_RED_BUCKET_PROD = client-zH8Y7OK1i331EKuG77C6UxN8ygcM6LzS
ORIGINAL_XDG_CURRENT_DESKTOP = undefined

stderr[
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Could not isolate value com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskWorkActionParameters_Decorated@5eaf3881 of type LinkApplicationAndroidResourcesTask.TaskWorkActionParameters
> Could not resolve all files for configuration ':launcher:detachedConfiguration1'.
> Failed to transform aapt2-7.1.2-7984345-osx.jar (com.android.tools.build:aapt2:7.1.2-7984345) to match attributes {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find aapt2-7.1.2-7984345-osx.jar (com.android.tools.build:aapt2:7.1.2-7984345).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/androi...

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
]
stdout[
> Task :launcher:preBuild UP-TO-DATE
> Task :unityLibrary:preBuild UP-TO-DATE
> Task :launcher:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:preReleaseBuild UP-TO-DATE
> Task :unityLibrary:compileReleaseAidl NO-SOURCE
> Task :unityLibrary:mergeReleaseJniLibFolders UP-TO-DATE
> Task :launcher:generateReleaseBuildConfig UP-TO-DATE
> Task :launcher:compileReleaseAidl NO-SOURCE
> Task :launcher:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:mergeReleaseNativeLibs UP-TO-DATE
> Task :launcher:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:stripReleaseDebugSymbols UP-TO-DATE
> Task :launcher:createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :unityLibrary:copyReleaseJniLibsProjectAndLocalJars UP-TO-DATE
> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE
> Task :launcher:extractDeepLinksRelease UP-TO-DATE
> Task :launcher:extractProguardFiles UP-TO-DATE
> Task :unityLibrary:generateReleaseBuildConfig UP-TO-DATE
> Task :launcher:mergeReleaseJniLibFolders UP-TO-DATE
> Task :unityLibrary:generateReleaseResValues UP-TO-DATE
> Task :unityLibrary:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:packageReleaseResources UP-TO-DATE
> Task :unityLibrary:parseReleaseLocalResources UP-TO-DATE
> Task :launcher:checkReleaseDuplicateClasses UP-TO-DATE
> Task :unityLibrary:processReleaseManifest UP-TO-DATE
> Task :launcher:desugarReleaseFileDependencies UP-TO-DATE
> Task :unityLibrary:generateReleaseRFile UP-TO-DATE
> Task :launcher:mergeExtDexRelease UP-TO-DATE
> Task :launcher:mergeReleaseShaders UP-TO-DATE
> Task :launcher:compileReleaseShaders NO-SOURCE
> Task :launcher:generateReleaseAssets UP-TO-DATE
> Task :launcher:processReleaseJavaRes NO-SOURCE
> Task :launcher:collectReleaseDependencies UP-TO-DATE
> Task :launcher:sdkReleaseDependencyData UP-TO-DATE
> Task :launcher:validateSigningRelease UP-TO-DATE
> Task :launcher:writeReleaseAppMetadata UP-TO-DATE
> Task :launcher:writeReleaseSigningConfigVersions UP-TO-DATE
> Task :unityLibrary:extractReleaseAnnotations UP-TO-DATE
> Task :unityLibrary:javaPreCompileRelease UP-TO-DATE
> Task :unityLibrary:compileReleaseJavaWithJavac UP-TO-DATE
> Task :unityLibrary:mergeReleaseGeneratedProguardFiles UP-TO-DATE
> Task :unityLibrary:mergeReleaseConsumerProguardFiles UP-TO-DATE
> Task :unityLibrary:mergeReleaseShaders UP-TO-DATE
> Task :unityLibrary:compileReleaseShaders NO-SOURCE
> Task :unityLibrary:generateReleaseAssets UP-TO-DATE
> Task :unityLibrary:packageReleaseAssets UP-TO-DATE
> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE
> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE
> Task :unityLibrary:prepareReleaseArtProfile UP-TO-DATE
> Task :launcher:mergeReleaseAssets UP-TO-DATE
> Task :unityLibrary:processReleaseJavaRes UP-TO-DATE
> Task :launcher:compileReleaseRenderscript NO-SOURCE
> Task :launcher:generateReleaseResources UP-TO-DATE
> Task :unityLibrary:mergeReleaseJavaResource UP-TO-DATE
> Task :launcher:mergeReleaseResources UP-TO-DATE
> Task :unityLibrary:syncReleaseLibJars UP-TO-DATE
> Task :launcher:mergeReleaseArtProfile UP-TO-DATE
> Task :unityLibrary:writeReleaseAarMetadata UP-TO-DATE
> Task :launcher:compressReleaseAssets UP-TO-DATE
> Task :launcher:checkReleaseAarMetadata UP-TO-DATE
> Task :unityLibrary:bundleReleaseLocalLintAar UP-TO-DATE
> Task :unityLibrary:extractDeepLinksRelease UP-TO-DATE
> Task :unityLibrary:compileReleaseLibraryResources UP-TO-DATE
> Task :unityLibrary:bundleLibCompileToJarRelease UP-TO-DATE
> Task :launcher:processReleaseMainManifest UP-TO-DATE
> Task :unityLibrary:bundleLibResRelease UP-TO-DATE
> Task :unityLibrary:bundleLibRuntimeToJarRelease UP-TO-DATE
> Task :launcher:processReleaseManifest UP-TO-DATE
> Task :launcher:processReleaseManifestForPackage UP-TO-DATE
> Task :unityLibrary:createFullJarRelease UP-TO-DATE
> Task :unityLibrary:writeReleaseLintModelMetadata UP-TO-DATE
> Task :unityLibrary:copyReleaseJniLibsProjectOnly UP-TO-DATE
> Task :launcher:processReleaseResources FAILED
57 actionable tasks: 1 executed, 56 up-to-date
]
exit code: 1
  • Вопрос задан
  • 186 просмотров
Подписаться 1 Простой Комментировать
Пригласить эксперта
Ответы на вопрос 3
@AuthorOfTheQuestion
По-моему он хочет, чтобы Вы обновили Unity, SDK, NDK, потом, если не поможет удалите папку Bee в Library, она генерируется каждый раз и иногда косячит
Ответ написан
mopsicus
@mopsicus
Тут можно только гадать, потому что не написано какие сторонние плагины используются, а они скорее всего используются. Судя по ошибке, можно попробовать использовать свежий билд-тулс: добавить в файл gradleTemplate.properties такую строчку и путь до билд-тулс:
android.aapt2FromMavenOverride=/Users/YOUR_USER/Library/Android/sdk/build-tools/34.0.0/aapt2
Ответ написан
Комментировать
@sh1zue
У меня была похожая ошибка, я всë делал на юнити 2021.3.43f1 (если не ошибаюсь) после перехода на unity 2022.3.51f1 всë начало работать.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы