- https://github.com/FrogSquare/GodotFireBase
- FireBase - Android에서 파일 업로드
- https://stackoverflow.com/questions/50585334/tasksnapshot-getdownloadurl-method-not-working
Compile/Build Env
- Windows 10 Home
- NDK 17c
- Python3
- Android Studio
modules/GodotFirebase/config.py
# 설정내용 # Set your Android app ID p_app_id = "com.domain.packagename" # Update this to customize the module _config = { "Analytics" : True, "AdMob" : True, "Invites" : True, "RemoteConfig" : True, "Notification" : True, "Storage" : False, # java 에러 "Firestore" : True, "Authentication" : True, "AuthGoogle" : True, "AuthFacebook" : False, # true : apk 용량이 많아진다. "AuthTwitter" : False # true : apk 용량이 많아진다. }
platform\android\build.gradle.template 수정
buildscript { repositories { google() // add $$GRADLE_REPOSITORY_URLS$$ jcenter() // move line } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' $$GRADLE_CLASSPATH$$ } } apply plugin: 'com.android.application' allprojects { repositories { mavenCentral() google() $$GRADLE_REPOSITORY_URLS$$ jcenter() // move line } } dependencies { compile 'com.android.support:support-v4:27.+' // can be removed if minSdkVersion 16 and modify DownloadNotification.java & V14CustomNotification.java $$GRADLE_DEPENDENCIES$$ } android { lintOptions { abortOnError false disable 'MissingTranslation' } compileSdkVersion 27 buildToolsVersion "27.0.3" useLibrary 'org.apache.http.legacy' packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' } defaultConfig { $$GRADLE_DEFAULT_CONFIG$$ } // Both signing and zip-aligning will be done at export time buildTypes.all { buildType -> buildType.zipAlignEnabled false buildType.signingConfig null } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src' $$GRADLE_JAVA_DIRS$$ ] res.srcDirs = [ 'res' $$GRADLE_RES_DIRS$$ ] aidl.srcDirs = [ 'aidl' $$GRADLE_AIDL_DIRS$$ ] assets.srcDirs = [ 'assets' $$GRADLE_ASSET_DIRS$$ ] } debug.jniLibs.srcDirs = [ 'libs/debug' $$GRADLE_JNI_DIRS$$ ] release.jniLibs.srcDirs = [ 'libs/release' $$GRADLE_JNI_DIRS$$ ] } applicationVariants.all { variant -> // ApplicationVariant is undocumented, but this method is widely used; may break with another version of the Android Gradle plugin variant.outputs.get(0).setOutputFile(new File("${projectDir}/../../../bin", "android_${variant.name}.apk")) } } $$GRADLE_PLUGINS$$
Firestore Option Error
# modules/GodotFirebase/config.py if _config["Firestore"]: env.android_add_dependency("compile 'com.google.firebase:firebase-firestore:17.1.0'") env.android_add_default_config("multiDexEnabled true") # add #ref:https://stackoverflow.com/questions/38714651/android-studio-dexindexoverflowexception-method-id-not-in env.android_add_dependency("compile 'com.android.support:multidex:1.0.0'") # add
Storage Option Error
이건 해결하지 못했다. java 소스를 변경해서 테스트를 했지만 테스트에서 모두 오류가 났다.
> Task :compileDebugJavaWithJavac C:\Users\username\Downloads\godot-3.0.6-stable\modules\GodotFireBase\android\storage\UploadService.java:130: error: cannot find symbol Uri downloadUri = taskSnapshot.getMetadata().getDownloadUrl(); ^ symbol: method getDownloadUrl() location: class StorageMetadata Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\username\Downloads\godot-3.0.6-stable\modules\GodotFireBase\android\auth\FacebookSignIn.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error
// modules\GodotFireBase\android\storage\UploadService.java:130 // Uri downloadUri = taskSnapshot.getMetadata().getDownloadUrl(); // origin source // Uri downloadUri = taskSnapshot.getMetadata().getReference().getDownloadUrl().toString(); // Error Uri DownloadUri = taskSmapshot.getDownloadUrl(); // Error
반응형
'game > godot' 카테고리의 다른 글
Godot - Google Play Service Lederboard Setting Problem (0) | 2018.12.24 |
---|---|
Godot - Thread safe APIs (0) | 2018.12.13 |
Godot - Compiling (0) | 2018.12.12 |
Godot - Getting the source (0) | 2018.12.12 |
Godot - Introduction to the buildsystem (0) | 2018.12.11 |