添加邀请,远程配置依赖项

时间:2017-04-05 09:21:11

标签: java firebase cocos2d-x cocos2d-x-3.0

我在v3.2中有一个cocos2d-x c ++游戏,而firebase(10.0.1)在auth,数据库,分析等方面运行良好。但是当我添加其他功能时,例如邀请或< strong>远程配置,cocos库在启动时崩溃。

请帮忙,因为它需要花费太多时间来解决这个问题,而且firebase似乎仍然不稳定使用?。

compile 'com.google.firebase:firebase-invites:10.0.1'

compile 'com.google.firebase:firebase-storage:10.0.1'

compile 'com.google.firebase:firebase-config:10.0.1'

崩溃洛杉矶(似乎无法找到添加这些的java类引用)

VFY: unable to resolve virtual method 2339: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x001c
I/FA      (17438): App measurement is starting up, version: 10084
I/FA      (17438): To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
I/FA      (17438): To enable faster debug mode event logging run:
I/FA      (17438):   adb shell setprop debug.firebase.analytics.app com.casualgames.magicgem
I/FirebaseCrash(17438): FirebaseCrash reporting initialized com.google.android.gms.internal.zzbks@42700c48
I/FirebaseInitProvider(17438): FirebaseApp initialization successful
D/dalvikvm(17438): Trying to load lib /data/app-lib/com.casualgames.magicgem-1/libcocos2dcpp.so 0x42659120
D/dalvikvm(17438): Added shared lib /data/app-lib/com.casualgames.magicgem-1/libcocos2dcpp.so 0x42659120
D/JniHelper(17438): JniHelper::setJavaVM(0x41d6df78), pthread_self() = 1074569556
D/dalvikvm(17438): Trying to load lib /data/app-lib/com.casualgames.magicgem-1/libcocos2dcpp.so 0x42659120
D/dalvikvm(17438): Shared lib '/data/app-lib/com.casualgames.magicgem-1/libcocos2dcpp.so' already loaded in same CL 0x42659120
E/dalvikvm(17438): Could not find class 'org.cocos2dx.lib.Cocos2dxHandler$1', referenced from method org.cocos2dx.lib.Cocos2dxHandler.showDialog
W/dalvikvm(17438): VFY: unable to resolve new-instance 9119 (Lorg/cocos2dx/lib/Cocos2dxHandler$1;) in Lorg/cocos2dx/lib/Cocos2dxHandler;
D/dalvikvm(17438): VFY: replacing opcode 0x22 at 0x001f
E/dalvikvm(17438): Could not find class 'org.cocos2dx.lib.Cocos2dxEditBoxDialog', referenced from method org.cocos2dx.lib.Cocos2dxHandler.showEditBoxDialog
W/dalvikvm(17438): VFY: unable to resolve new-instance 9103 (Lorg/cocos2dx/lib/Cocos2dxEditBoxDialog;) in Lorg/cocos2dx/lib/Cocos2dxHandler;
D/dalvikvm(17438): VFY: replacing opcode 0x22 at 0x0004
D/dalvikvm(17438): DexOpt: unable to opt direct call 0xfce1 at 0x21 in Lorg/cocos2dx/lib/Cocos2dxHandler;.showDialog
D/dalvikvm(17438): DexOpt: unable to opt direct call 0xfcaa at 0x1a in Lorg/cocos2dx/lib/Cocos2dxHandler;.showEditBoxDialog
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxAccelerometer.disable, referenced from method org.cocos2dx.lib.Cocos2dxHelper.disableAccelerometer
W/dalvikvm(17438): VFY: unable to resolve virtual method 64655: Lorg/cocos2dx/lib/Cocos2dxAccelerometer;.disable ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0005
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxAccelerometer.enable, referenced from method org.cocos2dx.lib.Cocos2dxHelper.enableAccelerometer
W/dalvikvm(17438): VFY: unable to resolve virtual method 64656: Lorg/cocos2dx/lib/Cocos2dxAccelerometer;.enable ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0005
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.end, referenced from method org.cocos2dx.lib.Cocos2dxHelper.end
W/dalvikvm(17438): VFY: unable to resolve virtual method 64810: Lorg/cocos2dx/lib/Cocos2dxMusic;.end ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.getBackgroundVolume, referenced from method org.cocos2dx.lib.Cocos2dxHelper.getBackgroundMusicVolume
W/dalvikvm(17438): VFY: unable to resolve virtual method 64811: Lorg/cocos2dx/lib/Cocos2dxMusic;.getBackgroundVolume ()F
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.getEffectsVolume, referenced from method org.cocos2dx.lib.Cocos2dxHelper.getEffectsVolume
W/dalvikvm(17438): VFY: unable to resolve virtual method 64854: Lorg/cocos2dx/lib/Cocos2dxSound;.getEffectsVolume ()F
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
E/dalvikvm(17438): Could not find class 'org.cocos2dx.lib.Cocos2dxAccelerometer', referenced from method org.cocos2dx.lib.Cocos2dxHelper.init
W/dalvikvm(17438): VFY: unable to resolve new-instance 9099 (Lorg/cocos2dx/lib/Cocos2dxAccelerometer;) in Lorg/cocos2dx/lib/Cocos2dxHelper;
D/dalvikvm(17438): VFY: replacing opcode 0x22 at 0x0020
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.isBackgroundMusicPlaying, referenced from method org.cocos2dx.lib.Cocos2dxHelper.isBackgroundMusicPlaying
W/dalvikvm(17438): VFY: unable to resolve virtual method 64812: Lorg/cocos2dx/lib/Cocos2dxMusic;.isBackgroundMusicPlaying ()Z
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.onEnterBackground, referenced from method org.cocos2dx.lib.Cocos2dxHelper.onEnterBackground
W/dalvikvm(17438): VFY: unable to resolve virtual method 64855: Lorg/cocos2dx/lib/Cocos2dxSound;.onEnterBackground ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.onEnterForeground, referenced from method org.cocos2dx.lib.Cocos2dxHelper.onEnterForeground
W/dalvikvm(17438): VFY: unable to resolve virtual method 64856: Lorg/cocos2dx/lib/Cocos2dxSound;.onEnterForeground ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxAccelerometer.disable, referenced from method org.cocos2dx.lib.Cocos2dxHelper.onPause
W/dalvikvm(17438): VFY: unable to resolve virtual method 64655: Lorg/cocos2dx/lib/Cocos2dxAccelerometer;.disable ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0009
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxAccelerometer.enable, referenced from method org.cocos2dx.lib.Cocos2dxHelper.onResume
W/dalvikvm(17438): VFY: unable to resolve virtual method 64656: Lorg/cocos2dx/lib/Cocos2dxAccelerometer;.enable ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0009
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.pauseAllEffects, referenced from method org.cocos2dx.lib.Cocos2dxHelper.pauseAllEffects
W/dalvikvm(17438): VFY: unable to resolve virtual method 64857: Lorg/cocos2dx/lib/Cocos2dxSound;.pauseAllEffects ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.pauseBackgroundMusic, referenced from method org.cocos2dx.lib.Cocos2dxHelper.pauseBackgroundMusic
W/dalvikvm(17438): VFY: unable to resolve virtual method 64815: Lorg/cocos2dx/lib/Cocos2dxMusic;.pauseBackgroundMusic ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.pauseEffect, referenced from method org.cocos2dx.lib.Cocos2dxHelper.pauseEffect
W/dalvikvm(17438): VFY: unable to resolve virtual method 64858: Lorg/cocos2dx/lib/Cocos2dxSound;.pauseEffect (I)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.playBackgroundMusic, referenced from method org.cocos2dx.lib.Cocos2dxHelper.playBackgroundMusic
W/dalvikvm(17438): VFY: unable to resolve virtual method 64816: Lorg/cocos2dx/lib/Cocos2dxMusic;.playBackgroundMusic (Ljava/lang/String;Z)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.playEffect, referenced from method org.cocos2dx.lib.Cocos2dxHelper.playEffect
W/dalvikvm(17438): VFY: unable to resolve virtual method 64859: Lorg/cocos2dx/lib/Cocos2dxSound;.playEffect (Ljava/lang/String;ZFFF)I
D/dalvikvm(17438): VFY: replacing opcode 0x74 at 0x0007
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.preloadBackgroundMusic, referenced from method org.cocos2dx.lib.Cocos2dxHelper.preloadBackgroundMusic
W/dalvikvm(17438): VFY: unable to resolve virtual method 64817: Lorg/cocos2dx/lib/Cocos2dxMusic;.preloadBackgroundMusic (Ljava/lang/String;)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.preloadEffect, referenced from method org.cocos2dx.lib.Cocos2dxHelper.preloadEffect
W/dalvikvm(17438): VFY: unable to resolve virtual method 64860: Lorg/cocos2dx/lib/Cocos2dxSound;.preloadEffect (Ljava/lang/String;)I
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.resumeAllEffects, referenced from method org.cocos2dx.lib.Cocos2dxHelper.resumeAllEffects
W/dalvikvm(17438): VFY: unable to resolve virtual method 64861: Lorg/cocos2dx/lib/Cocos2dxSound;.resumeAllEffects ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.resumeBackgroundMusic, referenced from method org.cocos2dx.lib.Cocos2dxHelper.resumeBackgroundMusic
W/dalvikvm(17438): VFY: unable to resolve virtual method 64818: Lorg/cocos2dx/lib/Cocos2dxMusic;.resumeBackgroundMusic ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.resumeEffect, referenced from method org.cocos2dx.lib.Cocos2dxHelper.resumeEffect
W/dalvikvm(17438): VFY: unable to resolve virtual method 64862: Lorg/cocos2dx/lib/Cocos2dxSound;.resumeEffect (I)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.rewindBackgroundMusic, referenced from method org.cocos2dx.lib.Cocos2dxHelper.rewindBackgroundMusic
W/dalvikvm(17438): VFY: unable to resolve virtual method 64819: Lorg/cocos2dx/lib/Cocos2dxMusic;.rewindBackgroundMusic ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxAccelerometer.setInterval, referenced from method org.cocos2dx.lib.Cocos2dxHelper.setAccelerometerInterval
W/dalvikvm(17438): VFY: unable to resolve virtual method 64657: Lorg/cocos2dx/lib/Cocos2dxAccelerometer;.setInterval (F)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.setBackgroundVolume, referenced from method org.cocos2dx.lib.Cocos2dxHelper.setBackgroundMusicVolume
W/dalvikvm(17438): VFY: unable to resolve virtual method 64820: Lorg/cocos2dx/lib/Cocos2dxMusic;.setBackgroundVolume (F)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
E/dalvikvm(17438): Could not find class 'org.cocos2dx.lib.Cocos2dxHelper$1', referenced from method org.cocos2dx.lib.Cocos2dxHelper.setEditTextDialogResult
W/dalvikvm(17438): VFY: unable to resolve new-instance 9123 (Lorg/cocos2dx/lib/Cocos2dxHelper$1;) in Lorg/cocos2dx/lib/Cocos2dxHelper;
D/dalvikvm(17438): VFY: replacing opcode 0x22 at 0x0008
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.setEffectsVolume, referenced from method org.cocos2dx.lib.Cocos2dxHelper.setEffectsVolume
W/dalvikvm(17438): VFY: unable to resolve virtual method 64863: Lorg/cocos2dx/lib/Cocos2dxSound;.setEffectsVolume (F)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.stopAllEffects, referenced from method org.cocos2dx.lib.Cocos2dxHelper.stopAllEffects
W/dalvikvm(17438): VFY: unable to resolve virtual method 64864: Lorg/cocos2dx/lib/Cocos2dxSound;.stopAllEffects ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxMusic.stopBackgroundMusic, referenced from method org.cocos2dx.lib.Cocos2dxHelper.stopBackgroundMusic
W/dalvikvm(17438): VFY: unable to resolve virtual method 64821: Lorg/cocos2dx/lib/Cocos2dxMusic;.stopBackgroundMusic ()V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.stopEffect, referenced from method org.cocos2dx.lib.Cocos2dxHelper.stopEffect
W/dalvikvm(17438): VFY: unable to resolve virtual method 64865: Lorg/cocos2dx/lib/Cocos2dxSound;.stopEffect (I)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm(17438): Could not find method org.cocos2dx.lib.Cocos2dxSound.unloadEffect, referenced from method org.cocos2dx.lib.Cocos2dxHelper.unloadEffect
W/dalvikvm(17438): VFY: unable to resolve virtual method 64866: Lorg/cocos2dx/lib/Cocos2dxSound;.unloadEffect (Ljava/lang/String;)V
D/dalvikvm(17438): VFY: replacing opcode 0x6e at 0x0002
D/dalvikvm(17438): DexOpt: unable to opt direct call 0xfc8e at 0x22 in Lorg/cocos2dx/lib/Cocos2dxHelper;.init
D/dalvikvm(17438): DexOpt: unable to opt direct call 0xfd29 at 0x29 in Lorg/cocos2dx/lib/Cocos2dxHelper;.init
D/dalvikvm(17438): DexOpt: unable to opt direct call 0xfd54 at 0x30 in Lorg/cocos2dx/lib/Cocos2dxHelper;.init
D/dalvikvm(17438): DexOpt: unable to opt direct call 0xfce9 at 0x0a in Lorg/cocos2dx/lib/Cocos2dxHelper;.setEditTextDialogResult
D/AndroidRuntime(17438): Shutting down VM
W/dalvikvm(17438): threadid=1: thread exiting with uncaught exception (group=0x41d7fd40)
E/UncaughtException(17438): 
E/UncaughtException(17438): java.lang.NoClassDefFoundError: org.cocos2dx.lib.Cocos2dxAccelerometer
E/UncaughtException(17438):     at org.cocos2dx.lib.Cocos2dxHelper.init(Cocos2dxHelper.java:87)
E/UncaughtException(17438):     at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:85)
E/UncaughtException(17438):     at com.nidogames.Game.basegameutils.BaseGameActivity.onCreate(BaseGameActivity.java:103)
E/UncaughtException(17438):     at org.cocos2dx.cpp.AppActivity.onCreate(AppActivity.java:156)
E/UncaughtException(17438):     at android.app.Activity.performCreate(Activity.java:5248)
E/UncaughtException(17438):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
E/UncaughtException(17438):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
E/UncaughtException(17438):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
E/UncaughtException(17438):     at android.app.ActivityThread.access$800(ActivityThread.java:139)
E/UncaughtException(17438):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
E/UncaughtException(17438):     at android.os.Handler.dispatchMessage(Handler.java:102)
E/UncaughtException(17438):     at android.os.Looper.loop(Looper.java:136)
E/UncaughtException(17438):     at android.app.ActivityThread.main(ActivityThread.java:5086)
E/UncaughtException(17438):     at java.lang.reflect.Method.invokeNative(Native Method)
E/UncaughtException(17438):     at java.lang.reflect.Method.invoke(Method.java:515)
E/UncaughtException(17438):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/UncaughtException(17438):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/UncaughtException(17438):     at dalvik.system.NativeStart.main(Native Method)
I/FA      (17438): Tag Manager is not found and thus will not be used
D/SBar.MSimNetwCntrl( 1144): updateDataIcon[0]: subscription=0
D/SBar.MSimNetwCntrl( 1144): updateDataIcon[0]: dataSub=0
D/SBar.MSimNetwCntrl( 1144): updateDataIcon[0]: SimState=ABSENT
I/SBar.MSimNetwCntrl( 1144): notifySignalsChangedCallbacks[0]: isEmergencyOnly(0)=true mobileEnabled=false sim=zz_moto_ic_qs_signal_no_sim_wide="(empty)" signal=zz_moto_stat_sys_signal_emergency_only_wide="Emergency calls only." roaming=(none)=""
I/SBar.MSimNetwCntrl( 1144):  type=(none)="No data." activity=(none)="(empty)"
I/SBar.MSimNetwCntrl( 1144):  slot=1="1" network="Emergency calls only"
E/AndroidRuntime(17438): FATAL EXCEPTION: main
E/AndroidRuntime(17438): Process: com.casualgames.magicgem, PID: 17438
E/AndroidRuntime(17438): java.lang.NoClassDefFoundError: org.cocos2dx.lib.Cocos2dxAccelerometer
E/AndroidRuntime(17438):    at org.cocos2dx.lib.Cocos2dxHelper.init(Cocos2dxHelper.java:87)
E/AndroidRuntime(17438):    at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:85)
E/AndroidRuntime(17438):    at com.nidogames.Game.basegameutils.BaseGameActivity.onCreate(BaseGameActivity.java:103)
E/AndroidRuntime(17438):    at org.cocos2dx.cpp.AppActivity.onCreate(AppActivity.java:156)
E/AndroidRuntime(17438):    at android.app.Activity.performCreate(Activity.java:5248)
E/AndroidRuntime(17438):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110)
E/AndroidRuntime(17438):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162)
E/AndroidRuntime(17438):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257)
E/AndroidRuntime(17438):    at android.app.ActivityThread.access$800(ActivityThread.java:139)
E/AndroidRuntime(17438):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210)
E/AndroidRuntime(17438):    at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(17438):    at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(17438):    at android.app.ActivityThread.main(ActivityThread.java:5086)
E/AndroidRuntime(17438):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(17438):    at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(17438):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime(17438):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime(17438):    at dalvik.system.NativeStart.main(Native Method)

1 个答案:

答案 0 :(得分:1)

修正:

在AndroidManifest文件的应用程序标记中添加以下行

android:name="android.support.multidex.MultiDexApplication"