Unity에서 Gradle Build를 사용하여 FireBase를 추가할 경우
아래 FireBase Android 문서를 보고 내용을 추가하면 여러~ 에러가 발생한다.
문서는 Android를 사용하는 방법이니...
우리는 Unity!!! 문서 내용은 사용하지 않으며, 과감히 지운다.
delete
// classpath 'com.google.gms:google-services:4.0.1'
//implementation "com.google.firebase:firebase-core:16.0.1"
//implementation 'com.google.firebase:firebase-messaging:17.1.0'
// ADD THIS AT THE BOTTOM
//apply plugin: 'com.google.gms.google-services'
* What went wrong:
Execution failed for task ':processReleaseGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\WORKSPACE\kor\Temp\gradleOut\src\nullnull\release\google-services.json
C:/Program Files/Java/jdk1.8.0_171\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2018.2.2f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-4.2.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx2048m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processReleaseGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\WORKSPACE\kor\Temp\gradleOut\src\nullnull\release\google-services.json
C:\WORKSPACE\kor\Temp\gradleOut\src\release\nullnull\google-services.json
C:\WORKSPACEkor\Temp\gradleOut\src\nullnull\google-services.json
C:\WORKSPACE\kor\Temp\gradleOut\src\release\google-services.json
C:\WORKSPACE\kor\Temp\gradleOut\src\nullnullRelease\google-services.json
C:\WORKSPACE\kor\Temp\gradleOut\google-services.json
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
]
stdout[
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
:preBuild UP-TO-DATE
:Firebase:preBuild UP-TO-DATE
댓글 없음:
댓글 쓰기