简体   繁体   English

Firebase App可以在模拟器上运行,但不能在真正的Android设备上运行吗?

[英]Firebase App works on Emulators but not on real Android device?

I'm using Firebase Authentication and database for my Android App. 我正在为我的Android应用程序使用Firebase身份验证和数据库。 Everything works on an Emulator (Nexus 5X API 26, Nexus 6 API 26, Galaxy Nexus API 24). 一切都可以在模拟器上运行(Nexus 5X API 26,Nexus 6 API 26,Galaxy Nexus API 24)。 When I launch the app on my personal Galaxy S6 Edge API 24, none of my Firebase related items work. 当我在个人Galaxy S6 Edge API 24上启动该应用程序时,与Firebase相关的所有项目均无效。

Here is the Logcat when launched from real android: 这是从真正的android启动时的Logcat:

    09-17 18:22:06.547 21928-21928/? E/Zygote: v2
09-17 18:22:06.547 21928-21928/? I/libpersona: KNOX_SDCARD checking this for 10081
09-17 18:22:06.547 21928-21928/? I/libpersona: KNOX_SDCARD not a persona
09-17 18:22:06.548 21928-21928/? E/Zygote: accessInfo : 0
09-17 18:22:06.548 21928-21928/? W/SELinux: SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0005, [-1 -1 -4 -1 0 1]
09-17 18:22:06.550 21928-21928/? I/SELinux: SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=co.williamdev.cl 
09-17 18:22:06.553 21928-21928/? I/art: Late-enabling -Xcheck:jni
09-17 18:22:06.577 21928-21928/? D/TimaKeyStoreProvider: TimaKeyStore is not enabled: cannot add TimaSignature Service and generateKeyPair Service
09-17 18:22:06.614 21928-21928/co.williamdev.cl W/ActivityThread: Application co.williamdev.cl can be debugged on port 8100...
09-17 18:22:06.625 21928-21928/co.williamdev.cl W/System: ClassLoader referenced unknown path: /data/app/co.williamdev.cl-1/lib/arm64
09-17 18:22:06.688 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:22:06.692 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:22:06.728 21928-21928/co.williamdev.cl D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
09-17 18:22:06.735 21928-21928/co.williamdev.cl I/FA: App measurement is starting up, version: 10084
09-17 18:22:06.736 21928-21928/co.williamdev.cl I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
09-17 18:22:06.736 21928-21928/co.williamdev.cl D/FA: Debug-level message logging enabled
09-17 18:22:06.736 21928-21928/co.williamdev.cl D/FA: AppMeasurement singleton hash: 76751607
09-17 18:22:06.743 21928-21928/co.williamdev.cl V/FA: Collection enabled
09-17 18:22:06.743 21928-21928/co.williamdev.cl V/FA: App package, google app id: co.williamdev.cl, 1:414579005472:android:c605a1af30f21ce2
09-17 18:22:06.744 21928-21928/co.williamdev.cl I/FA: To enable faster debug mode event logging run:
                                                                adb shell setprop debug.firebase.analytics.app co.williamdev.cl
09-17 18:22:06.749 21928-21928/co.williamdev.cl V/FA: Registered activity lifecycle callback
09-17 18:22:06.750 21928-21928/co.williamdev.cl I/FirebaseInitProvider: FirebaseApp initialization successful
09-17 18:22:06.759 21928-21963/co.williamdev.cl V/FA: Using measurement service
09-17 18:22:06.760 21928-21963/co.williamdev.cl V/FA: Connecting to remote service
09-17 18:22:06.778 21928-21928/co.williamdev.cl W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
09-17 18:22:06.781 21928-21928/co.williamdev.cl V/FA: onActivityCreated
09-17 18:22:06.788 21928-21928/co.williamdev.cl W/DynamiteModule: Failed to load module via fast routecom.google.android.gms.dynamite.DynamiteModule$zza: V2 version check failed
09-17 18:22:06.791 21928-21928/co.williamdev.cl I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:6
09-17 18:22:06.791 21928-21928/co.williamdev.cl I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 6
09-17 18:22:06.821 21928-21928/co.williamdev.cl W/System: ClassLoader referenced unknown path: 
09-17 18:22:06.840 21928-21928/co.williamdev.cl W/System: ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/0000002a/n/arm64-v8a
09-17 18:22:06.911 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.912 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.919 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.920 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.922 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.923 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.932 21928-21963/co.williamdev.cl V/FA: Using measurement service
09-17 18:22:06.932 21928-21963/co.williamdev.cl V/FA: Connection attempt already in progress
09-17 18:22:06.932 21928-21963/co.williamdev.cl V/FA: Activity resumed, time: 77667465
09-17 18:22:06.941 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: ThreadedRenderer.create() translucent=false
09-17 18:22:06.944 21928-21928/co.williamdev.cl D/InputTransport: Input channel constructed: fd=62
09-17 18:22:06.944 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: setView = DecorView@703995c[MainActivity] touchMode=true
09-17 18:22:06.947 21928-21928/co.williamdev.cl D/MainActivity: onAuthStateChanged:signed_in:a1uQCuf3RBT69ierqbhApFat3Ky2
09-17 18:22:06.960 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: dispatchAttachedToWindow
09-17 18:22:06.976 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.980 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.981 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.989 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:06.990 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:07.025 21928-21928/co.williamdev.cl D/AbsListView: Get MotionRecognitionManager
09-17 18:22:07.027 21928-21928/co.williamdev.cl D/MotionRecognitionManager: mSContextService = com.samsung.android.hardware.context.ISemContextService$Stub$Proxy@bb55fdb
09-17 18:22:07.031 21928-21928/co.williamdev.cl D/MotionRecognitionManager: motionService = com.samsung.android.gesture.IMotionRecognitionService$Stub$Proxy@dd0ba78
09-17 18:22:07.031 21928-21928/co.williamdev.cl D/MotionRecognitionManager: motionService = com.samsung.android.gesture.IMotionRecognitionService$Stub$Proxy@dd0ba78
09-17 18:22:07.068 21928-21928/co.williamdev.cl D/TextView: setTypeface with style : 0
09-17 18:22:07.069 21928-21928/co.williamdev.cl I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
09-17 18:22:07.101 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: Relayout returned: oldFrame=[0,0][0,0] newFrame=[0,0][1440,2560] result=0x7 surface={isValid=true 510201823232} surfaceGenerationChanged=true
09-17 18:22:07.101 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: mHardwareRenderer.initialize() mSurface={isValid=true 510201823232} hwInitialized=true
09-17 18:22:07.122 21928-21965/co.williamdev.cl D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
09-17 18:22:07.141 21928-21965/co.williamdev.cl I/OpenGLRenderer: Initialized EGL, version 1.4
09-17 18:22:07.141 21928-21965/co.williamdev.cl D/OpenGLRenderer: Swap behavior 1
09-17 18:22:07.146 21928-21965/co.williamdev.cl D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000,  [1440x2560]-format:1
09-17 18:22:07.188 21928-21928/co.williamdev.cl D/AbsListView:  onsize change 
09-17 18:22:07.278 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
09-17 18:22:07.278 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1
09-17 18:22:07.278 21928-21928/co.williamdev.cl D/ViewRootImpl@a269bcf[MainActivity]: mHardwareRenderer.initializeIfNeeded()#2 mSurface={isValid=true 510201823232}
09-17 18:22:07.299 21928-21928/co.williamdev.cl D/SEM_CLIP_SemClipboardManager: isCocktailBarDisplayed : false
09-17 18:22:07.299 21928-21928/co.williamdev.cl V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@a45ad61 nm : co.williamdev.cl ic=null
09-17 18:22:07.299 21928-21928/co.williamdev.cl I/InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
09-17 18:22:07.302 21928-21963/co.williamdev.cl D/FA: Connected to remote service
09-17 18:22:07.302 21928-21963/co.williamdev.cl V/FA: Processing queued up service tasks: 2
09-17 18:22:07.303 21928-21941/co.williamdev.cl D/InputTransport: Input channel constructed: fd=74
09-17 18:22:07.309 21928-21928/co.williamdev.cl V/InputMethodManager: Starting input: tba=android.view.inputmethod.EditorInfo@e092f12 nm : co.williamdev.cl ic=null
09-17 18:22:12.329 21928-21963/co.williamdev.cl V/FA: Inactivity, disconnecting from the service
09-17 18:22:45.273 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:22:49.077 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:22:49.079 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:22:59.163 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:23:05.775 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:23:05.777 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:23:24.611 21928-21953/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.

No crashing error. 没有崩溃错误。

Here is the Logcat from the working Emulator: 这是正在运行的仿真器中的Logcat:

09-17 18:31:12.950 5373-5373/? I/zygote: Not late-enabling -Xcheck:jni (already on)
09-17 18:31:13.135 5373-5373/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
09-17 18:31:13.812 5373-5384/co.williamdev.cl I/zygote: Background concurrent copying GC freed 9975(2MB) AllocSpace objects, 0(0B) LOS objects, 79% free, 388KB/1924KB, paused 14.209ms total 332.236ms
09-17 18:31:13.893 5373-5394/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:31:14.028 5373-5373/co.williamdev.cl D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
09-17 18:31:14.066 5373-5373/co.williamdev.cl I/FA: App measurement is starting up, version: 10084
09-17 18:31:14.067 5373-5373/co.williamdev.cl I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
09-17 18:31:14.067 5373-5373/co.williamdev.cl D/FA: Debug-level message logging enabled
09-17 18:31:14.067 5373-5373/co.williamdev.cl D/FA: AppMeasurement singleton hash: 33108808
09-17 18:31:14.169 5373-5373/co.williamdev.cl V/FA: Collection enabled
09-17 18:31:14.169 5373-5373/co.williamdev.cl V/FA: App package, google app id: co.williamdev.cl, 1:414579005472:android:c605a1af30f21ce2
09-17 18:31:14.170 5373-5373/co.williamdev.cl I/FA: To enable faster debug mode event logging run:
                                                              adb shell setprop debug.firebase.analytics.app co.williamdev.cl
09-17 18:31:14.204 5373-5373/co.williamdev.cl V/FA: Registered activity lifecycle callback
09-17 18:31:14.211 5373-5373/co.williamdev.cl I/FirebaseInitProvider: FirebaseApp initialization successful
09-17 18:31:14.347 5373-5373/co.williamdev.cl V/FA: onActivityCreated
09-17 18:31:14.348 5373-5404/co.williamdev.cl V/FA: Using measurement service
09-17 18:31:14.349 5373-5404/co.williamdev.cl V/FA: Connecting to remote service
09-17 18:31:14.421 5373-5373/co.williamdev.cl I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:6
09-17 18:31:14.421 5373-5373/co.williamdev.cl I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 6
09-17 18:31:14.424 5373-5373/co.williamdev.cl W/zygote: Skipping duplicate class check due to unrecognized classloader
09-17 18:31:14.449 5373-5373/co.williamdev.cl W/zygote: Skipping duplicate class check due to unrecognized classloader
09-17 18:31:14.509 5373-5380/co.williamdev.cl W/zygote: Suspending all threads took: 37.690ms
09-17 18:31:14.595 5373-5394/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
09-17 18:31:14.679 5373-5412/co.williamdev.cl D/NetworkSecurityConfig: No Network Security Config specified, using platform default
09-17 18:31:14.837 5373-5404/co.williamdev.cl V/FA: Using measurement service
09-17 18:31:14.837 5373-5404/co.williamdev.cl V/FA: Connection attempt already in progress
09-17 18:31:14.838 5373-5404/co.williamdev.cl V/FA: Activity resumed, time: 1920104
09-17 18:31:14.871 5373-5414/co.williamdev.cl D/OpenGLRenderer: HWUI GL Pipeline
09-17 18:31:14.903 5373-5373/co.williamdev.cl D/MainActivity: onAuthStateChanged:signed_in:RY1vRHRecNN6qMbgw0h9bcxAEnj2
09-17 18:31:15.084 5373-5378/co.williamdev.cl I/zygote: Do partial code cache collection, code=25KB, data=24KB
09-17 18:31:15.087 5373-5378/co.williamdev.cl I/zygote: After code cache collection, code=24KB, data=24KB
09-17 18:31:15.087 5373-5378/co.williamdev.cl I/zygote: Increasing code cache capacity to 128KB
09-17 18:31:15.088 5373-5378/co.williamdev.cl I/zygote: Do partial code cache collection, code=24KB, data=42KB
09-17 18:31:15.088 5373-5378/co.williamdev.cl I/zygote: After code cache collection, code=24KB, data=42KB
09-17 18:31:15.088 5373-5378/co.williamdev.cl I/zygote: Increasing code cache capacity to 256KB
09-17 18:31:15.088 5373-5378/co.williamdev.cl I/zygote: JIT allocated 71KB for compiled code of void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
09-17 18:31:15.089 5373-5378/co.williamdev.cl I/zygote: Compiler allocated 4MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
09-17 18:31:15.167 5373-5373/co.williamdev.cl I/TextInputLayout: EditText added is not a TextInputEditText. Please switch to using that class instead.
09-17 18:31:15.470 5373-5414/co.williamdev.cl I/OpenGLRenderer: Initialized EGL, version 1.4
09-17 18:31:15.470 5373-5414/co.williamdev.cl D/OpenGLRenderer: Swap behavior 1
09-17 18:31:15.470 5373-5414/co.williamdev.cl W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
09-17 18:31:15.470 5373-5414/co.williamdev.cl D/OpenGLRenderer: Swap behavior 0
09-17 18:31:15.487 5373-5414/co.williamdev.cl D/EGL_emulation: eglCreateContext: 0xa4475920: maj 2 min 0 rcv 2
09-17 18:31:15.492 5373-5414/co.williamdev.cl D/EGL_emulation: eglMakeCurrent: 0xa4475920: ver 2 0 (tinfo 0xa3f24fe0)

                                                                       [ 09-17 18:31:15.584  5373: 5414 D/         ]
                                                                       SurfaceInterface::setAsyncMode: set async mode 1
09-17 18:31:15.703 5373-5373/co.williamdev.cl I/Choreographer: Skipped 38 frames!  The application may be doing too much work on its main thread.
09-17 18:31:15.760 5373-5414/co.williamdev.cl D/EGL_emulation: eglMakeCurrent: 0xa4475920: ver 2 0 (tinfo 0xa3f24fe0)
09-17 18:31:16.075 5373-5404/co.williamdev.cl D/FA: Connected to remote service
09-17 18:31:16.075 5373-5404/co.williamdev.cl V/FA: Processing queued up service tasks: 2
09-17 18:31:16.601 5373-5378/co.williamdev.cl I/zygote: Do full code cache collection, code=124KB, data=75KB
09-17 18:31:16.603 5373-5378/co.williamdev.cl I/zygote: After code cache collection, code=116KB, data=47KB
09-17 18:31:16.630 5373-5378/co.williamdev.cl I/zygote: Do partial code cache collection, code=116KB, data=53KB
09-17 18:31:16.631 5373-5378/co.williamdev.cl I/zygote: After code cache collection, code=116KB, data=53KB
09-17 18:31:16.631 5373-5378/co.williamdev.cl I/zygote: Increasing code cache capacity to 512KB
09-17 18:31:21.240 5373-5404/co.williamdev.cl V/FA: Inactivity, disconnecting from the service
09-17 18:31:22.042 5373-5378/co.williamdev.cl I/zygote: Do full code cache collection, code=249KB, data=142KB
09-17 18:31:22.042 5373-5378/co.williamdev.cl I/zygote: After code cache collection, code=154KB, data=99KB
09-17 18:31:22.510 5373-5380/co.williamdev.cl W/zygote: Suspending all threads took: 13.159ms
09-17 18:31:25.758 5373-5394/co.williamdev.cl W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.

Sorry for such a long log, I just can't seem to figure out the issue. 抱歉,日志这么长,我似乎无法弄清楚问题所在。 Please let me know if you notice what went wrong, or if there's a debugging process that I can use. 如果您注意到出了什么问题,或者有可以使用的调试过程,请告诉我。 I'm new to Android. 我是Android新手。

Also my App level bundle.gradle if that helps 还有我的应用程序级别bundle.gradle是否有帮助

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "co.williamdev.cl"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        resConfigs "auto"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.2'
    compile 'com.android.support:design:26.0.2'
    compile 'com.android.support:support-vector-drawable:26.0.2'
    compile 'com.android.support:animated-vector-drawable:26.0.2'
    compile 'com.gelitenight.waveview:waveview:1.0.0'
    compile 'com.android.support:customtabs:26.0.2'
    compile 'com.android.support:cardview-v7:26.0.2'

    compile 'com.google.firebase:firebase-core:10.0.0'
    compile 'com.google.firebase:firebase-auth:10.0.0'
    compile 'com.google.firebase:firebase-database:10.0.0'
    compile 'com.firebaseui:firebase-ui-database:1.1.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.mxn.soul:flowingdrawer-core:2.0.0'
    compile 'com.nineoldandroids:library:2.4.0'
    testCompile 'junit:junit:4.12'
}





apply plugin: 'com.google.gms.google-services'

apply plugin: 'com.android.application'

Android Studio SDK: Google Play Services: v44 Google Repository: v58 Android Studio SDK:Google Play服务:v44 Google存储库:v58

Firebase Test Lab's Robo Test also had no issues loading the Firebase data (Galaxy S6 Edge, API Level 22) Firebase测试实验室的Robo测试在加载Firebase数据时也没有问题(Galaxy S6 Edge,API级别22)


EDIT: 编辑:

Okay I finally fixed this issue. 好吧,我终于解决了这个问题。 The problem was really outdated Firebase libraries. 问题实际上是过时的Firebase库。 I updated all my firebase dependencies to the latest versions (11.2.2 right now). 我将所有Firebase依赖项更新到最新版本(现在是11.2.2)。

compile 'com.google.firebase:firebase-core:11.2.2'
compile 'com.google.firebase:firebase-auth:11.2.2'
compile 'com.google.firebase:firebase-database:11.2.2'
compile 'com.firebaseui:firebase-ui-database:2.3.0'

Then I got these errors: 然后我得到了这些错误:

Launched from Emulator - 从模拟器启动-

co.williamdev.cl E/FA: Discarding data. Failed to send app launch 
co.williamdev.cl E/FA: Failed to get app instance id 
co.williamdev.cl E/FA: Failed to send current screen to service 
co.williamdev.cl E/FA: Discarding data. Failed to send event to service 
co.williamdev.cl E/FA: Discarding data. Failed to send event to service

Launched from real device- 从真实设备启动-

? E/Zygote: v2 
? E/Zygote: accessInfo : 0

Solved by reinstalling a new Emulator, updating the Google Play Services through my Emulator -> More (... button on sidebar) or Extended Controls -> Google Play -> Update. 通过重新安装新的模拟器,通过我的模拟器->更多(侧栏上的...按钮)或扩展控件-> Google Play->更新来解决Google Play服务。 Updating through SDK manager didn't help. 通过SDK Manager更新无济于事。 I also uninstalled the existing App on my phone, so that might've cleared the cached data. 我还卸载了手机上的现有应用程序,因此可能已清除了缓存的数据。

Anyways thank you guys for your help. 无论如何,谢谢你们的帮助。

Update : Check "rules" in your firebase's console and then in database. 更新 :在Firebase控制台中然后在数据库中检查“规则”。 And change it to this: 并将其更改为:

{
"rules": {

".read": true,

".write":true
  }
} 

First post 第一篇文章

Check the Google Play Services version. 检查Google Play服务版本。 Also for feature reference please post your code. 另外,作为功能参考,请发布您的代码。

From Firebase Firebase

Make sure, 确保,

  • A device running Android 4.0 (Ice Cream Sandwich) or newer, and Google Play services 11.2.2 or higher 运行Android 4.0(冰淇淋三明治)或更高版本以及Google Play服务11.2.2或更高版本的设备
  • The Google Play services SDK from the Google Repository, available in the Android SDK Manager Android SDK Manager中提供的Google Repository中的Google Play服务SDK
  • The latest version of Android Studio, version 1.5 or higher 最新版本的Android Studio 1.5或更高版本

Update your libraries 更新您的图书馆

  compile 'com.google.firebase:firebase-core:11.2.2' compile 'com.google.firebase:firebase-auth:11.2.2' compile 'com.google.firebase:firebase-database:11.2.2' compile 'com.firebaseui:firebase-ui-database:2.3.0' 

Google play Services: Google Play服务:

https://play.google.com/store/apps/details?id=com.google.android.gms&hl=en https://play.google.com/store/apps/details?id=com.google.android.gms&hl=en

它不能在设备上运行但可以在仿真器上运行的原因是,仿真器在gradle构建中不需要Google Play服务,因为在运行应用程序时,仿真器会创建自己的库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM