1

I have configured Firebase Admob in cocos2dx 3.17 version. I will be able to see test ads when debug build. I have set the following dependancies.

implementation 'com.google.firebase:firebase-ads:17.2.0'
implementation 'com.google.android.gms:play-services-ads:12.0.1'
implementation 'com.google.android.gms:play-services-base:16.1.0'

I have created an Android release build using android studio. When I launch a release build on the device, the application crashes. The crash log is as follows:

    04-11 19:01:50.358 1793-2283/? I/InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.7622 ] when=275481693441000
04-11 19:01:50.358 1793-2283/? D/InputReader: lastThreadEndTime = 275480391974048, currentThreadStartTime = 275480391978684, diff = 0
04-11 19:01:50.418 1793-2283/? I/InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=275481752767000
04-11 19:01:50.448 1793-2619/? V/WindowManager: addAppToken: AppWindowToken{f7c7bdd token=Token{6fd63b4 ActivityRecord{e0a3887 u0 com.test.testAddApp/org.cocos2dx.cpp.AppActivity t7747}}} to stack=1 task=7747 at 0
04-11 19:01:50.448 1793-2056/? D/SecWifiDisplayUtil: Metadata value : none
04-11 19:01:50.458 1793-1962/? V/BroadcastQueue: [background] Process cur broadcast BroadcastRecord{cd84995 u0 com.sec.android.intent.action.HOME_PAUSE qIdx=4}, state= (APP_RECEIVE) DELIVERED for app ProcessRecord{2576782 25439:com.sec.android.widgetapp.activeapplicationwidget/u0a151}
04-11 19:01:50.528 25562-25562/? D/ActivityThread: Added TimaKeyStore provider
04-11 19:01:50.578 1793-2283/? I/InputReader: Reconfiguring input devices.  changes=0x00000004
    Device reconfigured: id=7, name='sec_touchscreen', size 720x1280, orientation 1, mode 1, display id 0
04-11 19:01:50.618 20509-20509/? D/StatusBar.MSimNetworkController: refreshViews connected={ wifi } phoneId = 0 level=2 mMSimcombinedSignalIconId=0x7f020655/com.android.systemui:drawable/stat_sys_wifi_signal_4 mMSimcombinedActivityIconId=0x7f020601 mAirplaneMode=false mMSimDataActivity=0 mMSimPhoneSignalIconId=0x7f0205ec/com.android.systemui:drawable/stat_sys_signal_dark_2_auto_rotate mMSimDataDirectionIconId=0x0 mMSimDataSignalIconId=0x7f0205ec mMSimDataTypeIconId=0x0/(null) mNoMSimIconId=0x0/(null) mMSimMobileActivityIconId=0x0/(null) mWifiIconId=0x7f020655 mBluetoothTetherIconId=0x7f02062c mRoamingIconId=0x 0/(null)
    refreshSignalCluster : called
04-11 19:01:50.668 2733-2733/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8916_32_LA.BR.1.2.6_RB1__release_AU (Ia10634f51b)
    OpenGL ES Shader Compiler Version: XE031.06.00.05
    Build Date: 01/04/16 Mon
    Local Branch: 
    Remote Branch: quic/LA.BR.1.2.6_rb1.7
    Local Patches: NONE
    Reconstruct Branch: NOTHING
04-11 19:01:50.668 1793-1969/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:843 com.android.server.policy.PhoneWindowManager.notifyToSSRM:9078 com.android.server.policy.PhoneWindowManager.access$2100:324 com.android.server.policy.PhoneWindowManager$PolicyHandler.handleMessage:1263 android.os.Handler.dispatchMessage:102 
04-11 19:01:50.708 25562-25562/? I/ActivityThread: Switching default density from 320 to 240
04-11 19:01:50.848 20509-20509/? D/StatusBar-QSPanel: onConfigurationChanged()
    newConfig diff : 480
    handleDelayedOnConfigurationChanged()
    adjustCellWidth mButtonWidth : 134, displayWidth : 1248
04-11 19:01:50.848 20509-20509/? D/StatusBar-QSPanel: adjustCellWidth mButtonWidth : 134, displayWidth : 1248
04-11 19:01:50.878 20509-20509/? D/StatusBar.MSimNetworkController: refreshViews connected={ wifi } phoneId = 0 level=2 mMSimcombinedSignalIconId=0x7f020655/com.android.systemui:drawable/stat_sys_wifi_signal_4 mMSimcombinedActivityIconId=0x7f020601 mAirplaneMode=false mMSimDataActivity=0 mMSimPhoneSignalIconId=0x7f0205ec/com.android.systemui:drawable/stat_sys_signal_dark_2_auto_rotate mMSimDataDirectionIconId=0x0 mMSimDataSignalIconId=0x7f0205ec mMSimDataTypeIconId=0x0/(null) mNoMSimIconId=0x0/(null) mMSimMobileActivityIconId=0x0/(null) mWifiIconId=0x7f020655 mBluetoothTetherIconId=0x7f02062c mRoamingIconId=0x 0/(null)
    refreshSignalCluster : called
04-11 19:01:50.898 20509-20509/? D/SViewCoverView: BroadcastReceiver onReceive() : action : android.intent.action.CONFIGURATION_CHANGED
04-11 19:01:50.978 25562-25577/? I/DynamiteModule: Considering local module com.google.android.gms.ads.dynamite:0 and remote module com.google.android.gms.ads.dynamite:11210
    Selected remote version of com.google.android.gms.ads.dynamite, version >= 11210
04-11 19:01:50.978 25562-25577/? V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
04-11 19:01:51.008 24535-24569/? I/Finsky: [100091] hzb.run(3): Stats for Executor: BlockingExecutor [email protected][Running, pool size = 2, active threads = 0, queued tasks = 0, completed tasks = 9]
04-11 19:01:51.008 24535-24569/? I/Finsky: [100091] hzb.run(3): Stats for Executor: LightweightExecutor [email protected][Running, pool size = 3, active threads = 0, queued tasks = 0, completed tasks = 61]
04-11 19:01:51.028 25562-25577/? W/System: ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000009e/n/armeabi-v7a
    ClassLoader referenced unknown path: /data/data/com.google.android.gms/app_chimera/m/0000009e/n/armeabi
04-11 19:01:51.038 25562-25583/? I/FA: App measurement is starting up, version: 14711
    To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
    To enable faster debug mode event logging run:
      adb shell setprop debug.firebase.analytics.app com.test.testAddApp
04-11 19:01:51.108 20509-20509/? D/StatusBar.MSimNetworkController: refreshViews connected={ wifi } phoneId = 0 level=2 mMSimcombinedSignalIconId=0x7f020655/com.android.systemui:drawable/stat_sys_wifi_signal_4 mMSimcombinedActivityIconId=0x7f020603 mAirplaneMode=false mMSimDataActivity=0 mMSimPhoneSignalIconId=0x7f0205ec/com.android.systemui:drawable/stat_sys_signal_dark_2_auto_rotate mMSimDataDirectionIconId=0x0 mMSimDataSignalIconId=0x7f0205ec mMSimDataTypeIconId=0x0/(null) mNoMSimIconId=0x0/(null) mMSimMobileActivityIconId=0x0/(null) mWifiIconId=0x7f020655 mBluetoothTetherIconId=0x7f02062c mRoamingIconId=0x 0/(null)
    refreshSignalCluster : called
04-11 19:01:51.318 25562-25562/? D/SecWifiDisplayUtil: Metadata value : none
04-11 19:01:51.398 25562-25562/? E/SRIB_DSS_ThreadedRenderer: initialize, mIsDcsEnabledApp=true , with format= -1 scaleFactor=0.75
04-11 19:01:51.398 25562-25562/? D/ThreadedRenderer: SRIB_DCS & DSS android_view_ThreadedRenderer_dcs_initialize Rendering in format=-1, factor=0.750000
04-11 19:01:51.398 25562-25590/? I/Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: EGL 1.4 QUALCOMM build: Nondeterministic_AU_msm8916_32_LA.BR.1.2.6_RB1__release_AU (Ia10634f51b)
    OpenGL ES Shader Compiler Version: XE031.06.00.05
    Build Date: 01/04/16 Mon
    Local Branch: 
    Remote Branch: quic/LA.BR.1.2.6_rb1.7
    Local Patches: NONE
    Reconstruct Branch: NOTHING
04-11 19:01:51.478 1793-2672/? V/WindowStateAnimator: Finishing drawing window Window{6e0d7b9 u0 d0 p25562 SurfaceView}: mDrawState=READY_TO_SHOW
04-11 19:01:51.498 25562-25589/? D/cocos2d-x debug info: {
        cocos2d.x.version: cocos2d-x-3.17.1
        cocos2d.x.compiled_with_gl_state_cache: true
        gl.supports_S3TC: false
        cocos2d.x.build_type: DEBUG
        gl.supports_vertex_array_object: true
        cocos2d.x.compiled_with_profiler: false
        gl.renderer: Adreno (TM) 306
        gl.vendor: Qualcomm
        gl.version: OpenGL ES 3.0 [email protected] [email protected] ([email protected])
        gl.supports_ATITC: true
        gl.supports_ETC1: true
        gl.supports_OES_packed_depth_stencil: true
        gl.max_texture_units: 32
        gl.supports_PVRTC: false
        gl.max_texture_size: 4096
        gl.supports_NPOT: true
        gl.supports_OES_map_buffer: false
        gl.supports_OES_depth24: true
        gl.supports_discard_framebuffer: true
        gl.supports_BGRA8888: false
    }
04-11 19:01:51.528 25562-25589/? A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 25589 (GLThread 100260)
04-11 19:01:51.618 1793-2893/? D/InputMethodManagerService: windowGainedFocus mCurrentFocusedUserId - 0 and mSecureKeypadEnabled-false
04-11 19:01:51.628 24535-24569/? I/Finsky: [100091] hzb.run(3): Stats for Executor: bgExecutor [email protected][Running, pool size = 4, active threads = 0, queued tasks = 0, completed tasks = 23]
04-11 19:01:51.638 390-390/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    Build fingerprint: 'samsung/a5ltedd/a5lte:6.0.1/MMB29M/A500GXXU1CQB2:user/release-keys'
    Revision: '10'
    ABI: 'arm'
    **pid: 25562, tid: 25589, name: GLThread 100260  >>> com.test.testAddApp <<<
    signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
04-11 19:01:51.698 390-390/? A/DEBUG: backtrace:
        #00 pc 00044310  /system/lib/libc.so (tgkill+12)
        #01 pc 00041f11  /system/lib/libc.so (pthread_kill+32)
        #02 pc 0001ba13  /system/lib/libc.so (raise+10)
        #03 pc 00018c81  /system/lib/libc.so (__libc_android_abort+34)
        #04 pc 00016840  /system/lib/libc.so (abort+4)
        #05 pc 0020552d  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so
        #06 pc 00205667  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so
        #07 pc 002057e1  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (_ZN8firebase9LogAssertEPKcz+36)
        #08 pc 00205f3d  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (_ZN8firebase4util15LookupMethodIdsEP7_JNIEnvP7_jclassPKNS0_19MethodNameSignatureEjPP10_jmethodIDPKc+364)
        #09 pc 00218419  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (_ZN8firebase3app14CacheMethodIdsEP7_JNIEnvP8_jobject+68)
        #10 pc 00218e01  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (_ZN8firebase3App6CreateERKNS_10AppOptionsEPKcP7_JNIEnvP8_jobject+512)
        #11 pc 001fb903  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (_ZN11AppDelegate29applicationDidFinishLaunchingEv+274)
        #12 pc 002458df  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (_ZN7cocos2d11Application3runEv+8)
        #13 pc 001fd38b  /data/app/com.test.testAddApp-1/lib/arm/libMyGame.so (Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit+198)
        #14 pc 007498d5  /data/app/com.test.testAddApp-1/oat/arm/base.odex (offset 0x57f000)**
04-11 19:01:52.118 20509-20509/? D/StatusBar.MSimNetworkController: refreshViews connected={ wifi } phoneId = 0 level=2 mMSimcombinedSignalIconId=0x7f020655/com.android.systemui:drawable/stat_sys_wifi_signal_4 mMSimcombinedActivityIconId=0x7f020601 mAirplaneMode=false mMSimDataActivity=0 mMSimPhoneSignalIconId=0x7f0205ec/com.android.systemui:drawable/stat_sys_signal_dark_2_auto_rotate mMSimDataDirectionIconId=0x0 mMSimDataSignalIconId=0x7f0205ec mMSimDataTypeIconId=0x0/(null) mNoMSimIconId=0x0/(null) mMSimMobileActivityIconId=0x0/(null) mWifiIconId=0x7f020655 mBluetoothTetherIconId=0x7f02062c mRoamingIconId=0x 0/(null)
    refreshSignalCluster : called
    refreshNwBoosterIndicator - setNWBoosterIndicators(false)
04-11 19:01:52.248 390-390/? E/DEBUG: AM write failed: Broken pipe
    ro.debug_level = 0x4f4c
    sys.mobilecare.preload = false
04-11 19:01:52.288 1793-25598/? W/ActivityManager: Exception thrown during pause
    android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:503)
        at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:981)
        at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:1390)
        at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:4906)
        at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:4583)
        at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:5190)
        at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:18052)
        at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:17924)
        at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:18701)
        at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:18201)
        at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
04-11 19:01:52.298 338-338/? E/lowmemorykiller: Error writing /proc/25562/oom_score_adj; errno=22
04-11 19:01:52.358 1793-2056/? W/DisplayManagerService: Failed to notify process 25562 that displays changed, assuming it died.
    android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
        at android.os.BinderProxy.transactNative(Native Method)
        at android.os.BinderProxy.transact(Binder.java:503)
        at android.hardware.display.IDisplayManagerCallback$Stub$Proxy.onDisplayEvent(IDisplayManagerCallback.java:81)
        at com.android.server.display.DisplayManagerService$CallbackRecord.notifyDisplayEventAsync(DisplayManagerService.java:1848)
        at com.android.server.display.DisplayManagerService.deliverDisplayEvent(DisplayManagerService.java:1632)
        at com.android.server.display.DisplayManagerService.access$500(DisplayManagerService.java:190)
        at com.android.server.display.DisplayManagerService$DisplayManagerHandler.handleMessage(DisplayManagerService.java:1776)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.os.HandlerThread.run(HandlerThread.java:61)
        at com.android.server.ServiceThread.run(ServiceThread.java:46)
04-11 19:01:52.358 1793-2283/? I/InputReader: Reconfiguring input devices.  changes=0x00000004
    Device reconfigured: id=7, name='sec_touchscreen', size 720x1280, orientation 0, mode 1, display id 0
04-11 19:01:52.378 1793-25598/? E/WindowState: The process of this window already died: Window{6e0d7b9 u0 d0 p25562 SurfaceView} : android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died
04-11 19:01:52.388 1793-25598/? E/WindowState: The process of this window already died: Window{c632203 u0 d0 p25562 com.test.testAddApp/org.cocos2dx.cpp.AppActivity} : android.os.DeadObjectException
04-11 19:01:52.388 1793-1969/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:843 com.android.server.policy.PhoneWindowManager.notifyToSSRM:9078 com.android.server.policy.PhoneWindowManager.access$2100:324 com.android.server.policy.PhoneWindowManager$PolicyHandler.handleMessage:1263 android.os.Handler.dispatchMessage:102 
04-11 19:01:52.388 1793-25598/? W/InputDispatcher: Attempted to unregister already unregistered input channel
04-11 19:01:52.398 1793-2619/? D/InputMethodManagerService: windowGainedFocus mCurrentFocusedUserId - 0 and mSecureKeypadEnabled-false
04-11 19:01:52.418 1793-1818/? I/ActivityManager: Process com.test.testAddApp (pid 25562)(adj 1) has died(48,217)

Has anyone come across this issue for release build with Firebase admob?

0

I am able to resolve the issue by setting false to "minifyEnabled" and "shrinkResources" in module level build.gradle file :

buildTypes {
        release {
            debuggable false
            jniDebuggable false
            renderscriptDebuggable false
            minifyEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            if (project.hasProperty("RELEASE_STORE_FILE")) {
                signingConfig signingConfigs.release
            }

            externalNativeBuild {
                ndkBuild {
                    arguments 'NDK_DEBUG=0'
                }
            }
        }

        debug {
            debuggable true
            jniDebuggable true
            renderscriptDebuggable true
            externalNativeBuild {
                ndkBuild {
                    arguments 'NDK_DEBUG=1'
                }
            }
        }
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.