我在Firebase上传

时间:2018-05-15 13:27:20

标签: firebase firebase-storage

此代码之前正在运行,我不知道为什么我突然从firebase获得此错误存储异常。我期待着您的直接解决方案。谢谢。

mSelectimage = MediaStore.Images.Media.getBitmap(getContentResolver(),imageUri);
        int bitmapByteCount   = BitmapCompat.getAllocationByteCount(mSelectimage);
        int quality;
        if(bitmapByteCount > 60000000){
            quality = 10;
        } else {
            quality = 30;
        }
        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
        mSelectimage.compress(Bitmap.CompressFormat.JPEG, quality, byteArrayOutputStream);
        dataBytes = byteArrayOutputStream.toByteArray();
        final StorageReference fileToUpload = mStorage.child("community").child("post_images").child(currentUserId).child(newFileName);
        uploadTask = fileToUpload.putBytes(dataBytes);
        uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
            @Override
            public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
                imageUrl = taskSnapshot.getDownloadUrl().toString();                 

            }
        })

Logcat错误消息:

  

2018-05-15 20:57:58.320 16070-25649 / com.test.test E / ChimeraFileApk:无法验证DexClassLoader。           java.lang.ClassNotFoundException:没找到类&#34; com.google.android.gms.chimera.DynamiteModuleInitializer&#34; on path:DexPathList [[],nativeLibraryDirectories = [/ system / lib64,/ vendor / lib64,/ system / vendor / lib64,/ product / lib64]]               在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)               at java.lang.ClassLoader.loadClass(ClassLoader.java:380)               在ddb.loadClass(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):3)               在java.lang.ClassLoader.loadClass(ClassLoader.java:312)               at day.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):22)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):84)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):52)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):117)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):114)               在ryk.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):13)               在com.google.android.gms.chimera.container.DynamiteLoaderImpl.createModuleContext(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):18)               在ryf.onTransact(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):12)               在android.os.Binder.transact(Binder.java:499)               在com.google.android.gms.internal.stable.zza.transactAndReadException(未知来源)               在com.google.android.gms.dynamite.IDynamiteLoader $ Stub $ Proxy.createModuleContext(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zzb(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zza(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.load(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)       2018-05-15 20:57:58.321 16070-25649 / com.test.test E / ChimeraModuleLdr:无法加载模块FileApk的代码(/data/user_de/0/com.google.android.gms/app_chimera/m/ 0000001b / DynamiteModulesC_GmsCore_prodmnc_alldpi_release.apk)           ddp:无法加载/data/user_de/0/com.google.android.gms/app_chimera/m/0000001b/DynamiteModulesC_GmsCore_prodmnc_alldpi_release.apk的代码               at day.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):23)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):84)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):52)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):117)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):114)               在ryk.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):13)               在com.google.android.gms.chimera.container.DynamiteLoaderImpl.createModuleContext(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):18)               在ryf.onTransact(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):12)               在android.os.Binder.transact(Binder.java:499)               在com.google.android.gms.internal.stable.zza.transactAndReadException(未知来源)               在com.google.android.gms.dynamite.IDynamiteLoader $ Stub $ Proxy.createModuleContext(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zzb(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zza(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.load(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)       2018-05-15 20:57:58.321 16070-25649 / com.test.test W / ChimeraDebugLogger:未设置Singleton记录器实例。       2018-05-15 20:57:58.322 16070-25649 / com.test.test E / DynamiteLoaderV2:无法创建模块上下文。           ddp:无法加载/data/user_de/0/com.google.android.gms/app_chimera/m/0000001b/DynamiteModulesC_GmsCore_prodmnc_alldpi_release.apk的代码               at day.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):23)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):84)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):52)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):117)               at ddn.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):114)               在ryk.a(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):13)               在com.google.android.gms.chimera.container.DynamiteLoaderImpl.createModuleContext(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):18)               在ryf.onTransact(:com.google.android.gms @ 12673023 @ 12.6.73(040400-194189626):12)               在android.os.Binder.transact(Binder.java:499)               在com.google.android.gms.internal.stable.zza.transactAndReadException(未知来源)               在com.google.android.gms.dynamite.IDynamiteLoader $ Stub $ Proxy.createModuleContext(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zzb(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zza(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.load(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)       2018-05-15 20:57:58.323 16070-25649 / com.test.test W / DynamiteModule:无法加载远程模块:无法加载远程模块。       2018-05-15 20:57:58.324 16070-25649 / com.test.test E / NetworkRqFactoryProxy:NetworkRequestFactoryProxy因RemoteException失败:           com.google.android.gms.dynamite.DynamiteModule $ LoadingException:远程加载失败。没有发现本地回退。               在com.google.android.gms.dynamite.DynamiteModule.load(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)            原因:com.google.android.gms.dynamite.DynamiteModule $ LoadingException:无法加载远程模块。               在com.google.android.gms.dynamite.DynamiteModule.zzb(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.zza(未知来源)               在com.google.android.gms.dynamite.DynamiteModule.load(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)       2018-05-15 20:57:58.324 16070-25649 / com.test.test E / UploadTask:无法从元数据创建网络请求           android.os.RemoteException               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)       2018-05-15 20:57:58.324 16070-25649 / com.test.test E / StorageException:发生了StorageException。           发生未知错误,请检查HTTP结果代码和服务器响应的内部异常。            代码:-13000 HttpResult:0       2018-05-15 20:57:58.324 16070-25649 / com.test.test E / StorageException:null           android.os.RemoteException               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)       2018-05-15 20:57:58.324 16070-25649 / com.test.test E / StorageException:发生了StorageException。           发生未知错误,请检查HTTP结果代码和服务器响应的内部异常。            代码:-13000 HttpResult:0       2018-05-15 20:57:58.325 16070-25649 / com.test.test E / StorageException:null           android.os.RemoteException               在com.google.android.gms.internal.firebase_storage.zzp。(未知来源)               在com.google.android.gms.internal.firebase_storage.zzp.zzb(未知来源)               在com.google.firebase.storage.StorageReference.zzd(未知来源)               在com.google.firebase.storage.UploadTask.run(未知来源)               在com.google.firebase.storage.StorageTask.zzl(未知来源)               在com.google.firebase.storage.zzq.run(未知来源)               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)               at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)               在java.lang.Thread.run(Thread.java:776)

1 个答案:

答案 0 :(得分:0)

我有同样的问题。我还没有在互联网上找到解决方案。 我写信给Firebase支持。如果他们回答我,我会更新你。 您可以参考以下网站:https://status.firebase.google.com/来验证Firebase服务的状态。