Gradle Build Failed
Unity3D/Problems 2018. 12. 6. 13:58<<문제>>
1. Unity2018.2.17f1 , Gradle 빌드 실패
2. GooglePlayGamesPlugin 0.9.55 + Facebook v7.14.1 internal 빌드시 manifast 병합실패
<<상황>>
Unity버전별 폴더를 두고 ex) Unity2018_2.17f1, Unity2018_2.14f1 여러 버전의 유니티가 설치 되어 있음
http://www.devkorea.co.kr/bbs/board.php?bo_table=m03_qna&wr_id=79671
저도 동일한 문제로 헤매다가
http://answers.unity3d.com/questions/1320150/unable-to-list-target-platform.html
참고하여 해결했습니다.
위 링크 들어가 보시면 댓글에 해결책이 있는데
여기에 요약하면
Android SDK tools 가 최신 버전(25.3.1)으로 업데이트 되면서 unity가 사용하던 기능이 없어진거 같다고 합니다.
해결책은 기존 Android SDK설치 폴더에서 tools 폴더 이름을 변경한 후 [Your Android SDK root]/tools -> toolsXXXX
http://dl-ssl.google.com/android/repository/tools_r25.2.5-windows.zip 를 다운로드 받아서 압축 풀고 해당 tools 폴더를 위의
Android SDK설치 폴더에 복사합니다. 그러면 unity에서 예전처럼 잘 됩니다.
이 글을 참고 하여 tools폴더를 변경 한 이력이 있음
<<의심>>
1. Unity 버전
2. Android SDK tools변경
<<과정>>
1. 폴더별 여러 버전으로 설치 되어 있는것을 삭제
2. Unity프로그램을 제어판에서 삭제
3. Unity2018_2.14f1 만 설치
4. AndroidStudio 삭제
5. C:\Users\user\AppData\Local\Android\Sdk 삭제
6. AndroidStudio 설치
7. 새 프로젝트를 생성하여 Gradle 빌드
<<결과>>
새 프로젝트에서 Gradle 빌드 성공
<<시도>>
1. GooglePlayGamesPlugin-0.9.55 인스톨
<<결과>>
Gradle failed to fetch dependencies.
Failed to run 'D:\workspace\unity\svn_savetheprincess\R&D\Test\GradleBuildTest\Temp\PlayServicesResolverGradle\gradlew.bat -b "D:\workspace\unity\svn_savetheprincess\R&D\Test\GradleBuildTest\Temp\PlayServicesResolverGradle\PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=C:\Users\user\AppData\Local\Android\sdk" "-PTARGET_DIR=D:\workspace\unity\svn_savetheprincess\R&D\Test\GradleBuildTest\Assets\Plugins\Android" "-PMAVEN_REPOS=file:///D:/workspace/unity/svn_savetheprincess/R&D/Test/GradleBuildTest/Assets/GooglePlayGames/Editor/m2repository" "-PPACKAGES_TO_COPY=com.google.games:gpgs-plugin-support:0.9.55"'
stdout:
stderr:
'D\Test\GradleBuildTest\Temp\PlayServicesResolverGradle\'��(��) ���� ���� ���� ����, ������ �� ���� ��������, ����
���� ������ ��������.
����: ���� ������ org.gradle.wrapper.GradleWrapperMain��(��) ������ ������ �� ��������.
exit code: 1
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:91)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:691)
GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__28(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:617)
GooglePlayServices.<GradleResolution>c__AnonStorey19:<>m__33() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:708)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:<ExecuteAll>m__6() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
Google.RunOnMainThread:Run(Action, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:349)
GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__29(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:709)
GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__2A(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:760)
GooglePlayServices.ProgressReporter:SignalComplete() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.<RunAsync>c__AnonStorey2:<>m__3() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:<ExecuteAll>m__6() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Resolution failed
Failed to fetch the following dependencies:
com.google.games:gpgs-plugin-support:0.9.55
UnityEngine.Debug:LogError(Object)
Google.Logger:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/Logger.cs:91)
GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/PlayServicesResolver.cs:691)
GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List`1) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:461)
GooglePlayServices.<DoResolutionUnsafe>c__AnonStorey1C:<>m__2F(List`1) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:1056)
GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__28(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:621)
GooglePlayServices.<GradleResolution>c__AnonStorey19:<>m__33() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:708)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:<ExecuteAll>m__6() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
Google.RunOnMainThread:Run(Action, Boolean) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:349)
GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__29(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:709)
GooglePlayServices.<GradleResolution>c__AnonStorey17:<>m__2A(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/ResolverVer1_1.cs:760)
GooglePlayServices.ProgressReporter:SignalComplete() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:116)
GooglePlayServices.ProgressReporter:CommandLineToolCompletion(Result) (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLineDialog.cs:107)
GooglePlayServices.<RunAsync>c__AnonStorey2:<>m__3() (at /Users/smiles/dev/src/unity-jar-resolver/source/PlayServicesResolver/src/CommandLine.cs:136)
Google.RunOnMainThread:ExecuteNext() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:363)
Google.RunOnMainThread:<ExecuteAll>m__6() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:394)
Google.RunOnMainThread:RunAction(Action) (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:234)
Google.RunOnMainThread:ExecuteAll() (at /Users/smiles/dev/src/unity-jar-resolver/source/VersionHandlerImpl/src/RunOnMainThread.cs:392)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
<<시도>>
1. 유니티 재시작
2. Android Resolver > Force Resolve
<<결과>>
Resolution Failed!
Your application will not run, see the for details.
위 에러와 동일
<<시도>>
1. GooglePlayGames폴더 제거
2. PlayServicesResolver 폴더 제거
3. Plugins 폴더 제거
4. 유니티 재시작
5.GooglePlayGamesPlugin-0.9.53 인스톨
6.위 에러와 동일 Gradle failed to fetch dependencies.
7. 유니티 제시작
8. Google Play Games > Android Setup
9. Plugins > Android 에 aar파일 안만들어짐
10. Force Resolve
<<결과>>
Resolution Failed
에러내용 동일 Gradle failed to fetch dependencies.
<<시도>>
1. GooglePlayGames폴더 제거
2. PlayServicesResolver 폴더 제거
3. Plugins 폴더 제거
4. 유니티 재시작
5.GooglePlayGamesPlugin-0.9.54 인스톨
6. 유니티 재시작
<<결과>>
Resolution Failed
에러내용 동일 Gradle failed to fetch dependencies.
<<문제>>
GooglePlayGamesPlugin-0.9.54 인스톨후 aar파일을 만들어 내지 못한다.
구글 검색 'unity google play games doesn't make aar'
<<의심>>
D:\workspace\unity\svn_savetheprincess\R&D\Test\GradleBuildTest\Assets\Scenes
폴더명에 & 가 들어가있다...
명령프롬프트로 접근 하려니 접근 불가 떠서 인지하게 됨.
R&D -> RD로 변경
<<결과>>
ForceResolve 시 정상적으로 jar파일과 aar파일을 생성해냄..
<<결론>>
유니티 버전문제도, GPGS플러그인 버전문제도, SDK문제도 아니었다...
폴더명에 특수문자 & 가 들어가있었기 때문...
-_-;;; 갑분싸
D:\workspace\unity\svn_savetheprincess\RD\Test\GradleBuildTest\Temp\PlayServicesResolverGradle\gradlew.bat파일이 jar, aar파일을 자동으로 만들어주는 배치 파일
'Unity3D > Problems' 카테고리의 다른 글
[SOLVED] UnityWebRequest Unknown Error - Android 9(API 레벨 28+) (0) | 2019.02.20 |
---|---|
[SOLVED] EnableSavedGames ERROR_NOT_AUTHORIZED (0) | 2019.02.01 |
Spine Sprite Attacher (0) | 2018.11.06 |
DEBUG: Star ting Auth Transition. Op: SIGN_IN status: ERROR_TIMEOUT (0) | 2018.10.25 |
CompareApproximately , fRoot (0) | 2017.02.21 |