MichaelStott / KivMob

AdMob support for Kivy
MIT License
143 stars 38 forks source link

PythonActivity$AdCmd javaclass not found #8

Closed mouEsam closed 6 years ago

mouEsam commented 6 years ago

When I try to run the apk on my phone it crashes saying that PythonActivity$AdCmd isnt found

Date : 12/10/16\n05-07 17:37:25.548 1904 1940 I Adreno : OpenGL ES Shader Compiler Version: XE031.09.00.03\n05-07 17:37:25.548 1904 1940 I Adreno : Local Branch : \n05-07 17:37:25.548 1904 1940 I Adreno : Remote Branch : \n05-07 17:37:25.548 1904 1940 I Adreno : Remote Branch : \n05-07 17:37:25.548 1904 1940 I Adreno : Reconstruct Branch : \n'b'05-07 17:37:25.554 1904 1940 I OpenGLRenderer: Initialized EGL, version 1.4\n05-07 17:37:25.554 1904 1940 D OpenGLRenderer: Swap behavior 1\n'b'05-07 17:37:25.556 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.559 1904 1904 V SDL : surfaceCreated()\n05-07 17:37:25.559 1904 1904 V SDL : surfaceChanged()\n05-07 17:37:25.559 1904 1904 V SDL : pixel format RGB_565\n'b'05-07 17:37:25.560 1904 1904 V SDL : Window size:1080x1860\n'b'05-07 17:37:25.564 1904 1941 I SDL : SDL_Android_Init()\n05-07 17:37:25.564 1904 1941 I SDL : SDL_Android_Init() finished!\n05-07 17:37:25.564 1904 1941 I python : Initialize Python for Android\n05-07 17:37:25.564 1904 1941 I python : Changing directory to the one provided by ANDROID_ARGUMENT\n05-07 17:37:25.564 1904 1941 I python : /data/user/0/com.flowapp.statcalc/files/app\n05-07 17:37:25.564 1904 1941 I python : Preparing to initialize python\n'b'05-07 17:37:25.564 1904 1941 I python : crystax_python does not exist\n05-07 17:37:25.564 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.567 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.569 1904 1941 I python : Initialized python\n05-07 17:37:25.569 1904 1941 I python : AND: Init threads\n'b'05-07 17:37:25.570 1904 1941 I python : testing python print redirection\n'b'05-07 17:37:25.571 1904 1941 I python : Setting up python from ANDROID_PRIVATE\n05-07 17:37:25.571 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b"05-07 17:37:25.573 1904 1941 I python : ('Android path', ['/data/user/0/com.flowapp.statcalc/files/app/lib/python27.zip', '/data/user/0/com.flowapp.statcalc/files/app/lib/python2.7/', '/data/user/0/com.flowapp.statcalc/files/app/lib/python2.7/lib-dynload/', '/data/user/0/com.flowapp.statcalc/files/app/lib/python2.7/site-packages/', '/data/user/0/com.flowapp.statcalc/files/app'])\n"b"05-07 17:37:25.591 1904 1941 I python : ('os.environ is', {'ANDROID_APP_PATH': '/data/user/0/com.flowapp.statcalc/files/app', 'EXTERNAL_STORAGE': '/sdcard', 'ANDROID_ENTRYPOINT': 'main.pyo', 'ANDROID_ASSETS': '/system/app', 'PYTHONPATH': '/data/user/0/com.flowapp.statcalc/files/app:/data/user/0/com.flowapp.statcalc/files/app/lib', 'PYTHONOPTIMIZE': '2', 'ANDROID_ROOT': '/system', 'SYSTEMSERVERCLASSPATH': '/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar', 'ANDROID_DATA': '/data', 'PYTHONHOME': '/data/user/0/com.flowapp.statcalc/files/app', 'ANDROID_ARGUMENT': '/data/user/0/com.flowapp.statcalc/files/app', 'BOOTCLASSPATH': '/system/framework/core-oj.jar:/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/apache-xml.jar:/system/framework/org.apache.http.legacy.boot.jar:/system/framework/tcmiface.jar:/system/framework/WfdCommon.jar:/system/framework/oem-services.jar:/system/framework/qcom.fmradio.jar:/system/framework/qcmediaplayer.jar:/system/framework/telephony-ext.jar:/system/app/miui/miui.apk:/system/app/miuisystem/miuisystem.apk', 'ANDROID_SOCKET_zygote_secondary': '8', 'ASEC_MOUNTPOINT': '/mnt/asec', 'PATH': '/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin', 'ANDROID_STORAGE': '/storage', 'ANDROID_BOOTLOGO': '1', 'ANDROID_PRIVATE': '/data/user/0/com.flowapp.statcalc/files', 'PYTHON_NAME': 'python'})\n05-07 17:37:25.591 1904 1941 I python : ('Android kivy bootstrap done. __name__ is', '__main__')\n"b'05-07 17:37:25.609 1904 1940 E HAL : PATH3 /odm/lib/hw/gralloc.qcom.so\n05-07 17:37:25.609 1904 1940 E HAL : PATH2 /vendor/lib/hw/gralloc.qcom.so\n05-07 17:37:25.609 1904 1940 E HAL : PATH1 /system/lib/hw/gralloc.qcom.so\n05-07 17:37:25.609 1904 1940 E HAL : PATH3 /odm/lib/hw/gralloc.msm8953.so\n05-07 17:37:25.609 1904 1940 E HAL : PATH2 /vendor/lib/hw/gralloc.msm8953.so\n05-07 17:37:25.609 1904 1940 E HAL : PATH1 /system/lib/hw/gralloc.msm8953.so\n'b'05-07 17:37:25.621 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.622 1513 1621 I Timeline: Timeline: App_transition_stopped time:400875174\n'b"05-07 17:37:25.623 1904 1941 I python : ['/data/user/0/com.flowapp.statcalc/files/app/lib/python2.7/site-packages', '/data/user/0/com.flowapp.statcalc/files/app/lib/site-python']\n"b'05-07 17:37:25.623 1904 1941 I python : AND: Ran string\n05-07 17:37:25.623 1904 1941 I python : Run user program, change dir and execute entrypoint\n'b'05-07 17:37:25.624 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.625 1901 1901 D EventBus: [1901, u0] send(AppTransitionFinishedEvent)\n05-07 17:37:25.625 1901 1901 D EventBus: [1901, u0] -> ForcedResizableInfoActivityController [0xaa49754, P1] onBusEvent(AppTransitionFinishedEvent)\n'b'05-07 17:37:25.625 1901 1901 D EventBus: [1901, u0] onBusEvent(AppTransitionFinishedEvent) duration: 17 microseconds, avg: 471\n05-07 17:37:25.625 1901 1901 D EventBus: [1901, u0] send(AppTransitionFinishedEvent)\n05-07 17:37:25.625 1901 1901 D EventBus: [1901, u0] -> ForcedResizableInfoActivityController [0xaa49754, P1] onBusEvent(AppTransitionFinishedEvent)\n05-07 17:37:25.625 1901 1901 D EventBus: [1901, u0] onBusEvent(AppTransitionFinishedEvent) duration: 5 microseconds, avg: 471\n'b'05-07 17:37:25.657 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.659 1901 1901 V PhoneStatusBar: setLightsOn(true)\n05-07 17:37:25.659 1904 1904 V SDL : onWindowFocusChanged(): true\n'b'05-07 17:37:25.662 1513 1621 I ActivityManager: Displayed com.flowapp.statcalc/org.kivy.android.PythonActivity: +458ms\n'b'05-07 17:37:25.662 1513 1621 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{9424525 u0 com.flowapp.statcalc/org.kivy.android.PythonActivity t3067} time:400875214\n'b'05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 840704\n05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 239299583\n05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 25174048\n'b'05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 8224\n05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 4096\n05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 10848\n05-07 17:37:25.662 2744 2890 I WtEventController: AM_Launch: 30009 TAG: 1048576\n05-07 17:37:25.663 18936 18936 I GoogleInputMethod: onFinishInput() : Dummy InputConnection bound\n'b'05-07 17:37:25.664 18936 18936 I GoogleInputMethod: onStartInput() : Dummy InputConnection bound\n'b'05-07 17:37:25.664 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.671 1901 1901 V PhoneStatusBar: setLightsOn(true)\n'b'05-07 17:37:25.677 1513 1920 D ActivityTrigger: ActivityTrigger activityStopTrigger \n'b'05-07 17:37:25.687 1513 1920 I WindowManager: Destroying surface Surface(name=com.miui.home/com.miui.home.launcher.Launcher) called by com.android.server.wm.WindowStateAnimator.destroySurface:2043 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:895 com.android.server.wm.WindowState.destroyOrSaveSurface:2116 com.android.server.wm.AppWindowToken.destroySurfaces:366 com.android.server.wm.AppWindowToken.notifyAppStopped:394 com.android.server.wm.WindowManagerService.notifyAppStopped:4660 com.android.server.am.ActivityStack.activityStoppedLocked:1307 com.android.server.am.ActivityManagerService.activityStopped:7317 \n'b'05-07 17:37:25.727 1904 1941 I python : [INFO ] [Logger ] Record log in /data/user/0/com.flowapp.statcalc/files/app/.kivy/logs/kivy_18-05-07_8.txt\n05-07 17:37:25.727 1904 1941 I python : [INFO ] [Kivy ] v1.10.0\n'b'05-07 17:37:25.728 1904 1941 I python : [INFO ] [Python ] v2.7.2 (default, May 3 2018, 01:36:03) \n05-07 17:37:25.728 1904 1941 I python : [GCC 4.8]\n'b'05-07 17:37:25.729 1904 1941 W linker : /data/data/com.flowapp.statcalc/files/app/lib/python2.7/site-packages/jnius/jnius.so: is missing DT_SONAME will use basename as a replacement: "jnius.so"\n'b'05-07 17:37:25.742 1904 1941 W linker : /data/data/com.flowapp.statcalc/files/app/lib/python2.7/site-packages/android/_android.so: is missing DT_SONAME will use basename as a replacement: "_android.so"\n'b'05-07 17:37:25.853 1513 1621 I WindowManager: Destroying surface Surface(name=Starting com.flowapp.statcalc) called by com.android.server.wm.WindowStateAnimator.destroySurface:2043 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:895 com.android.server.wm.WindowState.destroyOrSaveSurface:2116 com.android.server.wm.AppWindowToken.destroySurfaces:366 com.android.server.wm.WindowStateAnimator.finishExit:565 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:491 com.android.server.wm.WindowAnimator.updateWindowsLocked:312

mouEsam commented 6 years ago

Never mind I solved it by buildozer android clean Then building with a fresh .spec file with the requirements then changing the p4a.source_directory then building again

mouEsam commented 6 years ago

The issue was that normal p4a doesn't implement AdCmd in PythonActivity.java While python-for-android-admob does And in my case it used p4a instead of it