Tango Unity examples crashing when built with Unity 2017.1 - android

I just installed Unity 2017.1.0f3 and tried to compile the examples but all of them crash at start on my Lenovo Phab 2 Pro (Tango version 1.55).
I loaded the project tango-examples-unity\UnityExamples in Unity without modifying it and Unity converts it to the Unity 2017.1.0f3 version. The building seems to run fine but on the phone the resulting app crashes at start.
Everything worked fine for me on Unity 5.6. Maybe the Tango SDK is simply not supported yet by Unity 2017.1 but I could not find any information on that.
Here are the console output on Unity after building the app and the logs of the Tango when I launch the app and it crashes.
Unity console output
Tango Logs :
07-13 18:26:07.867 1261-1409/? W/BroadcastQueue: Permission Denial: broadcasting Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } from com.android.launcher3 (pid=4828, uid=10025) requires com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS due to receiver com.google.android.gms/.icing.proxy.ApplicationLauncherReceiver
07-13 18:26:07.868 1261-1409/? W/BroadcastQueue: Permission Denial: receiving Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$GmsExternalReceiver requires com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS due to sender com.android.launcher3 (uid 10025)
07-13 18:26:07.882 544-3682/? E/audio_route: audio_route_apply_and_update_path:name(speaker-protected)
07-13 18:26:07.882 544-3682/? E/audio_route: audio_route_apply_and_update_path:name(vi-feedback)
07-13 18:26:07.882 544-3682/? E/voice: voice_is_in_call_rec_stream: input stream is NULL
07-13 18:26:07.883 544-3682/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
07-13 18:26:07.883 544-3682/? E/audio_route: audio_route_apply_and_update_path:name(spkr-vi-record)
07-13 18:26:07.894 544-3682/? E/voice: voice_is_in_call_rec_stream: input stream is NULL
07-13 18:26:07.894 544-3682/? E/ACDB-LOADER: Error: ACDB_CMD_GET_AUDPROC_COMMON_TABLE_SIZE Returned = -19
07-13 18:26:07.894 544-3682/? E/ACDB-LOADER: Error: ACDB audproc returned = -19
07-13 18:26:07.894 544-3682/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
07-13 18:26:07.894 544-3682/? E/ACDB-LOADER: Error: ACDB AFE returned = -19
07-13 18:26:07.895 544-3682/? E/audio_route: audio_route_apply_and_update_path:name(low-latency-playback speaker-protected)
07-13 18:26:07.936 8061-8061/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.projecttango.unityexamples, PID: 8061
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2017.1.0f3
Device model : LENOVO Lenovo PB2-690M
Device fingerprint: Lenovo/phinny_row/PB2PRO:6.0.1/MMB29M/PB2-690M_S200100_170228:user/release-keys
Caused by: java.lang.NoSuchMethodError: No direct method <init>(Landroid/content/ContextWrapper;)V in class Lcom/unity3d/player/UnityPlayer; or its super classes (declaration of 'com.unity3d.player.UnityPlayer' appears in /data/app/com.projecttango.unityexamples-2/base.apk)
at com.google.unity.GoogleUnityActivity.onCreate(GoogleUnityActivity.java:106)
at android.app.Activity.performCreate(Activity.java:6285)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2370)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2477)
at android.app.ActivityThread.access$900(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5418)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-13 18:26:07.938 1261-4787/? W/ActivityManager: Force finishing activity com.projecttango.unityexamples/com.google.unity.GoogleUnityActivity
07-13 18:26:08.290 1261-1453/? E/WallpaperManagerService: onEvent:settings_system.xml.bak,changedFile:/data/system/users/0/settings_system.xml.bak
07-13 18:26:08.294 1261-1453/? E/WallpaperManagerService: onEvent:settings_system.xml,changedFile:/data/system/users/0/settings_system.xml
07-13 18:26:08.294 1261-1453/? E/WallpaperManagerService: onEvent:settings_system.xml.bak,changedFile:/data/system/users/0/settings_system.xml.bak
07-13 18:26:08.545 1261-1409/? W/ActivityManager: Activity pause timeout for ActivityRecord{e8388eb u0 com.projecttango.unityexamples/com.google.unity.GoogleUnityActivity t822 f}

After testing it has been confirmed that Unity 2017.1 is currently not supported by the Tango SDK, we only support Unity 5.6 at this time.

Related

Problem with flutter build apk file on real phone

I'm new in Flutter and Android Studio. My problem - when i run my app in android studio - all works good. But, when i upload build apk file to firebase "app distribution", install on real phone and try to launch - it has crashed on start - without any error message. I see the first load screen, and that's all, app closed. I don't understand - how to debug such error, because all works, when i use Android studio. Any ideas - how can i catch this error ?
[√] Flutter (Channel stable, v1.17.4, on Microsoft Windows [Version 10.0.18363.900], locale ru-RU)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.46.1)
[√] Connected device (2 available)
Logcat logs
2020-06-27 19:34:17.653 587-644/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2020-06-27 19:34:17.655 2859-6628/? E/ANDR-PERF-JNI: com_qualcomm_qtiperformance_native_perf_io_prefetch_start
2020-06-27 19:34:17.665 2859-6628/? E/ActivityTrigger: activityStartTrigger: not whiteListedru.rakhimyan.pozhlikbez.pozhlikbez/ru.rakhimyan.pozhlikbez.pozhlikbez.MainActivity/1
2020-06-27 19:34:17.666 2859-6628/? E/ActivityTrigger: activityResumeTrigger: not whiteListedru.rakhimyan.pozhlikbez.pozhlikbez/ru.rakhimyan.pozhlikbez.pozhlikbez.MainActivity/1
2020-06-27 19:34:17.674 2859-6360/? E/ActivityTrigger: activityResumeTrigger: not whiteListedru.rakhimyan.pozhlikbez.pozhlikbez/ru.rakhimyan.pozhlikbez.pozhlikbez.MainActivity/1
2020-06-27 19:34:17.761 24805-24812/? E/kbez.pozhlikbe: Failed to send DDMS packet REAQ to debugger (-1 of 20): Broken pipe
2020-06-27 19:34:17.777 10947-23478/? E/DeviceStateChecker: DeviceStateChecker cancelled
2020-06-27 19:34:18.659 24805-24805/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: ru.rakhimyan.pozhlikbez.pozhlikbez, PID: 24805
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/ru.rakhimyan.pozhlikbez.pozhlikbez-leCXnGCESBlgFvEwD87Sfg==/base.apk"],nativeLibraryDirectories=[/data/app/ru.rakhimyan.pozhlikbez.pozhlikbez-leCXnGCESBlgFvEwD87Sfg==/lib/arm64, /data/app/ru.rakhimyan.pozhlikbez.pozhlikbez-leCXnGCESBlgFvEwD87Sfg==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libflutter.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
at java.lang.System.loadLibrary(System.java:1669)
at io.flutter.embedding.engine.loader.FlutterLoader.startInitialization(FlutterLoader.java:120)
at io.flutter.embedding.engine.loader.FlutterLoader.startInitialization(FlutterLoader.java:88)
at io.flutter.view.FlutterMain.startInitialization(FlutterMain.java:48)
at io.flutter.app.FlutterApplication.onCreate(FlutterApplication.java:24)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1155)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5906)
at android.app.ActivityThread.access$1100(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1660)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6762)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2020-06-27 19:34:18.770 4311-4326/? E/droid.launcher: No package ID ff found for ID 0xffffffff.
2020-06-27 19:34:18.772 4311-4326/? E/IconLoader: Could not find icon drawable from resource
android.content.res.Resources$NotFoundException: Resource ID #0xffffffff
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:225)
at android.content.res.Resources.getDrawableForDensity(Resources.java:887)
at android.content.res.Resources.getDrawable(Resources.java:827)
at com.android.systemui.shared.recents.model.IconLoader.createNewIconForTask(IconLoader.java:118)
at com.android.systemui.shared.recents.model.IconLoader.getAndInvalidateIfModified(IconLoader.java:94)
at com.android.systemui.shared.recents.model.RecentsTaskLoader.getAndUpdateActivityIcon(RecentsTaskLoader.java:325)
at com.android.systemui.shared.recents.model.RecentsTaskLoadPlan.executePlan(RecentsTaskLoadPlan.java:188)
at com.android.systemui.shared.recents.model.RecentsTaskLoader.loadTasks(RecentsTaskLoader.java:173)
at com.android.quickstep.RecentsModel.onTaskStackChangedBackground(RecentsModel.java:214)
at com.android.systemui.shared.system.TaskStackChangeListeners.onTaskStackChanged(TaskStackChangeListeners.java:80)
at android.app.ITaskStackListener$Stub.onTransact(ITaskStackListener.java:50)
at android.os.Binder.execTransact(Binder.java:731)
2020-06-27 19:34:18.773 4311-4326/? E/droid.launcher: Failed to open APK '/data/app/ru.rakhimyan.pozhlikbez.pozhlikbez-IGs77SWnk7PWEecGA2tGBQ==/base.apk' I/O error
2020-06-27 19:34:18.773 4311-4326/? E/ResourcesManager: failed to add asset path /data/app/ru.rakhimyan.pozhlikbez.pozhlikbez-IGs77SWnk7PWEecGA2tGBQ==/base.apk
2020-06-27 19:34:19.170 2859-2939/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.android.launcher3/com.android.a1launcher.AndroidOneLauncher/28
2020-06-27 19:34:19.180 587-644/? E/ANDR-PERF-OPTSHANDLER: Perflock resource /sys/class/devfreq/soc:qcom,llccbw/min_freq not supported
2020-06-27 19:34:19.180 587-644/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [12, 0]
2020-06-27 19:34:19.181 587-644/? E/ANDR-PERF-OPTSHANDLER: Failed to read /sys/class/kgsl/kgsl-3d0/force_no_nap
2020-06-27 19:34:19.181 587-644/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [10, 7]
2020-06-27 19:34:19.272 563-24849/? E/msm8916_platform: platform_get_snd_device_backend_index: BE DAI Name Table is not present
2020-06-27 19:34:19.272 563-24849/? E/audio_hw_utils: send_app_type_cfg_for_device: Couldn't get the backend index for snd device voice-rec-mic ret=-14
2020-06-27 19:34:19.273 563-24849/? E/ACDB-LOADER: Error: ACDB AudProc vol returned = -19
2020-06-27 19:34:19.273 563-24849/? E/ACDB-LOADER: Error: ACDB_CMD_GET_AFE_COMMON_TABLE_SIZE Returned = -19
2020-06-27 19:34:19.273 563-24849/? E/ACDB-LOADER: Error: ACDB AFE returned = -19

ANDROID App crash when installed in device: JSException: Can't find variable: Promise (RN 0.57.1)

Android app installs but crashes on open in devices, but in debug mode works perfectly.
You can see the crash report below
2019-03-15 15:02:50.685 4431-4515/? E/WindowManager: win=Window{8cd349a u0 Splash Screen com.sample EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0, caller=com.android.server.wm.AppWindowToken.destroySurfaces:748 com.android.server.wm.AppWindowToken.destroySurfaces:732 com.android.server.wm.WindowState.onExitAnimationDone:5646 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:553 com.android.server.wm.DisplayContent.lambda$-com_android_server_wm_DisplayContent_21578:476
2019-03-15 15:02:51.555 970-1030/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
Process: com.sample, PID: 970
com.facebook.react.common.JavascriptException: Can't find variable: props, stack:
value#285:1369
at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:160)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:192)
at java.lang.Thread.run(Thread.java:764)
2019-03-15 15:02:51.989 4431-4515/? E/WindowManager: win=Window{bb689b5 u0 com.sample/com.sample.MainActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=false win.mRemoveOnExit=false win.mViewVisibility=8, caller=com.android.server.wm.AppWindowToken.destroySurfaces:748 com.android.server.wm.AppWindowToken.destroySurfaces:732 com.android.server.wm.WindowState.onExitAnimationDone:5646 com.android.server.wm.WindowStateAnimator.stepAnimationLocked:553 com.android.server.wm.DisplayContent.lambda$-com_android_server_wm_DisplayContent_21578:476
Try to follow this issue: https://github.com/facebook/metro/issues/197:
When using react-native bundle (the command that runs when you build a
release), InitializeCore.js is not the first file that get required,
but instead it is required later, sometime during the generation of
the bridge method, randomly (which is why if you are lucky or not
using Promise // setTimeout early you'll be fine) iOS does not need
all those polyfills which is why the issue is only detected on android
in release mode.

Android O HIDL not available

I have problem with Android O HIDL. The failure log shows it can't find out the service.
However I can see it by adb shell ps -A | grep fingerprint
system 18758 1 17408 3276 pipe_wait 7c79e93e08 R android.hardware.biometrics.fingerprint#2.1-service`
Could anyone give me a hint how to solve the problem? I checked https://source.android.com/devices/architecture/hidl/ but could not get the solution.
Error log:
08-21 06:00:35.864 1890 2264 V FingerprintService: mDeamon was null, reconnect to fingerprint
08-21 06:00:35.864 1890 2264 I system_server: Looking for service android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint/default
08-21 06:00:35.864 2240 2240 D wpa_supplicant: nl80211: Set mode ifindex 24 iftype 2 (STATION)
08-21 06:00:35.866 566 566 W /system/bin/hwservicemanager: getTransportFromManifest: Cannot find entry android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint in either framework or device manifest, using default transport.
08-21 06:00:35.866 1890 2264 E system_server: service android.hardware.biometrics.fingerprint#2.1::IBiometricsFingerprint declares transport method EMPTY but framework expects hwbinder.
08-21 06:00:35.867 1890 2264 E FingerprintService: Failed to get biometric interface
08-21 06:00:35.867 1890 2264 E FingerprintService: android.os.RemoteException: HwBinder Error: (-2147483648)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.HwBinder.getService(Native Method)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.biometrics.fingerprint.V2_1.IBiometricsFingerprint.getService(IBiometricsFingerprint.java:44)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService.getFingerprintDaemon(FingerprintService.java:239)
08-21 06:00:35.867 1890 2264 E FingerprintService: at com.android.server.fingerprint.FingerprintService$FingerprintServiceWrapper.isHardwareDetected(FingerprintService.java:1198)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.hardware.fingerprint.IFingerprintService$Stub.onTransact(IFingerprintService.java:156)
08-21 06:00:35.867 1890 2264 E FingerprintService: at android.os.Binder.execTransact(Binder.java:674)
08-21 06:00:35.867 1890 2264 W FingerprintService: fingerprint HIDL not available
I've succeeded in running my fingerprint HAL on Android 8.1 executing on HiKey
96 board after modified files as below.
Firstly, it's necessary that adding HIDL configures to declare a device as a vendor or you would get VTS failed.
About HIDL configures
device/linaro/hikey/manifest.xml
+<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<version>2.1</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>
Secondly, finger service will be started after you define it in the file below.
device/linaro/hikey/device-common.mk
+#init finger service and copy
android.hardware.biometrics.fingerprint#2.1-service.rc to
system/vendor/etc/init
+PRODUCT_PACKAGES += \
+android.hardware.biometrics.fingerprint#2.1-service
+# copy permission file of finger service
+PRODUCT_COPY_FILES += \
+frameworks/native/data/etc/android.hardware.fingerprint.xml:system/etc
/permissions/android.hardware.fingerprint.xml
Finally, check finger service has been started and running in Android system by using terminal commands such as "adb shell" and "ps | grep finger".
Any suggestion is welcome.
I found out that I need to add the code to the manifest.xml
(Ref. https://source.android.com/devices/architecture/vintf/objects )
<hal format="hidl">
<name>android.hardware.biometrics.fingerprint</name>
<transport>hwbinder</transport>
<impl level="generic"></impl>
<version>2.1</version>
<interface>
<name>IBiometricsFingerprint</name>
<instance>default</instance>
</interface>
</hal>

android.content.ActivityNotFoundException: No Activity found to handle Intent

I m a newbie to Android. I am trying to use google location API and when run in the emulator it shows Unfortunately your app stopped working.
I did a adb logcat and here is my stacktrace
10-31 23:43:02.010 2370 2370 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:02.011 2370 2370 D AndroidRuntime: CheckJNI is ON
10-31 23:43:02.026 2370 2370 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:02.030 2370 2370 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:02.044 2370 2370 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:02.044 2370 2370 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:02.045 2370 2370 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:02.062 2370 2370 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
10-31 23:43:02.073 2228 2240 I art : CollectorTransition marksweep + semispace GC freed 125(-7KB) AllocSpace objects, 0(0B) LOS objects, 57% free, 379KB/891KB, paused 5.591ms total 5.591ms
10-31 23:43:02.080 2228 2242 D DefContainer: Copying /data/local/tmp/HighwayMechanic.apk to base.apk
10-31 23:43:02.181 1138 1177 I PackageManager.DexOptimizer: Running dexopt (dex2oat) on: /data/app/vmdl931695514.tmp/base.apk pkg=com.highway.highwaymechanic isa=x86 vmSafeMode=false debuggable=true oatDir = /data/app/vmdl931695514.tmp/oat
10-31 23:43:02.190 2382 2382 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
10-31 23:43:02.190 2382 2382 W dex2oat : Mismatch between dex2oat instruction set features (ISA: X86 Feature string: smp,-ssse3,-sse4.1,-sse4.2,-avx,-avx2) and those of dex2oat executable (ISA: X86 Feature string: smp,ssse3,-sse4.1,-sse4.2,-avx,-avx2) for the command line:
10-31 23:43:02.190 2382 2382 W dex2oat : /system/bin/dex2oat --zip-fd=6 --zip-location=base.apk --oat-fd=7 --oat-location=/data/app/vmdl931695514.tmp/oat/x86/base.odex --instruction-set=x86 --instruction-set-variant=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=8 --debuggable
10-31 23:43:02.190 2382 2382 I dex2oat : /system/bin/dex2oat --debuggable
10-31 23:43:08.200 2382 2382 I dex2oat : dex2oat took 6.009s (threads: 1) arena alloc=2MB java alloc=6MB native alloc=32MB free=2MB
10-31 23:43:08.276 1138 1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: uninstall pkg
10-31 23:43:08.294 1138 1177 I PackageManager: Package com.highway.highwaymechanic codePath changed from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1; Retaining data and using new
10-31 23:43:08.295 1138 1162 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=-1: replace pkg
10-31 23:43:08.296 1138 1177 W PackageManager: Code path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.296 1138 1177 W PackageManager: Resource path for com.highway.highwaymechanic changing from /data/app/com.highway.highwaymechanic-2 to /data/app/com.highway.highwaymechanic-1
10-31 23:43:08.333 1138 1177 W Settings: Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
10-31 23:43:08.333 1138 1177 I art : Starting a blocking GC Explicit
10-31 23:43:08.353 1138 1177 I art : Explicit concurrent mark sweep GC freed 10787(756KB) AllocSpace objects, 11(220KB) LOS objects, 19% free, 5MB/6MB, paused 517us total 13.651ms
10-31 23:43:08.357 1138 1177 W PackageManager: Couldn't remove dex file for package: at location /data/app/com.highway.highwaymechanic-2/base.apk, retcode=-1
10-31 23:43:08.359 1138 1177 I ActivityManager: Force stopping com.highway.highwaymechanic appid=10053 user=0: pkg removed
10-31 23:43:08.360 2370 2370 I art : System.exit called, status: 0
10-31 23:43:08.360 2370 2370 I AndroidRuntime: VM exiting with result code 0.
10-31 23:43:08.400 1138 1138 D JobSchedulerService: Receieved: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.403 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REMOVED
10-31 23:43:08.404 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.404 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.414 1925 1925 W ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1221 android.content.ContextWrapper.startService:581 android.content.ContextWrapper.startService:581 com.android.keychain.KeyChainBroadcastReceiver.onReceive:12 android.app.ActivityThread.handleReceiver:2725
10-31 23:43:08.418 1138 1641 I BroadcastQueue: Delay finish: com.android.keychain/.KeyChainBroadcastReceiver
10-31 23:43:08.514 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.515 1138 2212 I BroadcastQueue: Resuming delayed broadcast
10-31 23:43:08.516 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_ADDED
10-31 23:43:08.516 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602 1138 1255 I InputReader: Reconfiguring input devices. changes=0x00000010
10-31 23:43:08.602 1566 1566 D CarrierServiceBindHelper: Receive action: android.intent.action.PACKAGE_REPLACED
10-31 23:43:08.602 1566 1566 D CarrierServiceBindHelper: mHandler: 3
10-31 23:43:08.602 1566 1566 D CarrierConfigLoader: mHandler: 9 phoneId: 0
10-31 23:43:08.617 2390 2390 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
10-31 23:43:08.619 2390 2390 D AndroidRuntime: CheckJNI is ON
10-31 23:43:08.635 2390 2390 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.640 2390 2390 D ICU : No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
10-31 23:43:08.654 2390 2390 E memtrack: Couldn't load memtrack module (No such file or directory)
10-31 23:43:08.654 2390 2390 E android.os.Debug: failed to load memtrack module: -2
10-31 23:43:08.655 2390 2390 I Radio-JNI: register_android_hardware_Radio DONE
10-31 23:43:08.667 2390 2390 D AndroidRuntime: Calling main entry com.android.commands.am.Am
10-31 23:43:08.669 1138 2212 I ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.highway.highwaymechanic/.MainActivity} from uid 0 on display 0
10-31 23:43:08.691 2390 2390 D AndroidRuntime: Shutting down VM
10-31 23:43:08.695 2390 2395 I art : Debugger is no longer active
10-31 23:43:08.695 2390 2401 E art : Thread attaching while runtime is shutting down: Binder_2
10-31 23:43:08.695 2390 2401 I AndroidRuntime: NOTE: attach of thread 'Binder_2' failed
10-31 23:43:08.697 2402 2402 I art : Not late-enabling -Xcheck:jni (already on)
10-31 23:43:08.697 2402 2402 I art : Late-enabling JIT
10-31 23:43:08.702 2402 2402 I art : JIT created with code_cache_capacity=2MB compile_threshold=1000
10-31 23:43:08.708 1138 1712 I ActivityManager: Start proc 2402:com.highway.highwaymechanic/u0a53 for activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:08.717 2402 2409 E art : Failed sending reply to debugger: Broken pipe
10-31 23:43:08.717 2402 2409 I art : Debugger is no longer active
10-31 23:43:08.728 2402 2402 W System : ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.747 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.748 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.755 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.764 2402 2402 W GooglePlayServicesUtil: Google Play services is missing.
10-31 23:43:08.797 2402 2402 D gralloc_goldfish: Emulator without GPU emulation detected.
10-31 23:43:08.818 1138 1170 I ActivityManager: Displayed com.highway.highwaymechanic/.MainActivity: +129ms
10-31 23:43:10.932 1138 1429 I ActivityManager: START u0 {act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending} from uid 10053 on display 0
10-31 23:43:10.933 2402 2402 D AndroidRuntime: Shutting down VM
10-31 23:43:10.933 2402 2402 E AndroidRuntime: FATAL EXCEPTION: main
10-31 23:43:10.933 2402 2402 E AndroidRuntime: Process: com.highway.highwaymechanic, PID: 2402
10-31 23:43:10.933 2402 2402 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://details?id=com.google.android.gms&pcampaignid=gcore_8115000--- flg=0x80000 pkg=com.android.vending }
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:3917)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivityForResult(Activity.java:3877)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:748)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivity(Activity.java:4200)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.Activity.startActivity(Activity.java:4168)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.google.android.gms.dynamic.zza$5.onClick(Unknown Source)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.view.View.performClick(View.java:5198)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21147)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:739)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-31 23:43:10.933 2402 2402 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-31 23:43:10.934 1138 1712 W ActivityManager: Force finishing activity com.highway.highwaymechanic/.MainActivity
10-31 23:43:10.935 943 943 D gralloc : Registering a buffer in the process that created it. This may cause memory ordering problems.
10-31 23:43:10.935 943 943 E libEGL : called unimplemented OpenGL ES API
10-31 23:43:10.935 943 943 E SurfaceFlinger: glCheckFramebufferStatusOES error 1711643839
10-31 23:43:10.935 943 943 E SurfaceFlinger: got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
10-31 23:43:11.448 1138 1162 W ActivityManager: Activity pause timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
10-31 23:43:21.478 1138 1162 W ActivityManager: Activity destroy timeout for ActivityRecord{40e8f1c u0 com.highway.highwaymechanic/.MainActivity t11 f}
Here is my Android_manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.highway.highwaymechanic"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="23" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.highway.highwaymechanic.Map"
android:label="#string/title_activity_map" >
</activity>
</application>
</manifest>
Here is my MainActivity.java file
package com.highway.highwaymechanic;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends FragmentActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
#Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
Here is my MapsActivity.java file
package com.highway.highwaymechanic;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
#Override
public void onMapReady(GoogleMap map) {
LatLng sydney = new LatLng(-34, 151);
map.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
map.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}
When run in the emulator it crashes with Unfortunately the app stopped working.
Please help me with it.
Thanks in Advance
I believe this should have been fixed with the latest release of the Google Play services client library. Note that this is a fix in the client library and so you will have to update the library to the latest revision using your SDK manager and recompile your application.
for more details you can check this link
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4862
Do you have an another Activity named Map? As I see in your manifest,
<activity
android:name="com.highway.highwaymechanic.Map"
android:label="#string/title_activity_map" >
</activity>
Likewise, there should be a similar tag for the MapsActivity in your manifest. I think this is the error.
it bugs out much sooner, missing some native assembly for x86 architecture:
W System: ClassLoader referenced unknown path: /data/app/com.highway.highwaymechanic-1/lib/x86
followed by:
W GooglePlayServicesUtil: Google Play services is missing.
To add the missing Google Play (incl. Maps) Services, wrote a how-to once (it's almost the same).
While that FragmentActivity requires an IntentFilter, else it cannot be launched, for example:
<activity
android:name=".MapsActivity"
android:label="#string/title_activity_map">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>

Ionic app crashes on Android emulator and device

I'm building an app using the Ionic framework and AngularJS. It used to run fine, now it crashes as soon as it starts in both the emulator and an Android device. What is weird is that it runs fine in the Ionic View app (http://view.ionic.io/). The logcat says that the error is a NullPointerException.
What really worries me is that I didn't do any big changes, and another app started to fail as well. How can Ionic Cordova fail like that?
The complete logcat for the part of the crash says:
--------- beginning of crash
E/AndroidRuntime( 2227): FATAL EXCEPTION: main
E/AndroidRuntime( 2227): Process: com.ionicframework.notpush921844, PID: 2227
E/AndroidRuntime( 2227): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ionicframework.notpush921844/com.ionicframework.notpush921844.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
E/AndroidRuntime( 2227): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
E/AndroidRuntime( 2227): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
E/AndroidRuntime( 2227): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime( 2227): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
E/AndroidRuntime( 2227): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2227): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 2227): at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime( 2227): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 2227): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 2227): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/AndroidRuntime( 2227): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/AndroidRuntime( 2227): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String, org.apache.cordova.CordovaInterface, org.apache.cordova.CordovaWebView, org.apache.cordova.CordovaPreferences)' on a null object reference
E/AndroidRuntime( 2227): at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:169)
E/AndroidRuntime( 2227): at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:95)
E/AndroidRuntime( 2227): at org.apache.cordova.PluginManager.init(PluginManager.java:84)
E/AndroidRuntime( 2227): at org.apache.cordova.CordovaWebViewImpl.init(CordovaWebViewImpl.java:116)
E/AndroidRuntime( 2227): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:138)
E/AndroidRuntime( 2227): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209)
E/AndroidRuntime( 2227): at com.ionicframework.notpush921844.MainActivity.onCreate(MainActivity.java:32)
E/AndroidRuntime( 2227): at android.app.Activity.performCreate(Activity.java:5937)
E/AndroidRuntime( 2227): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
E/AndroidRuntime( 2227): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
E/AndroidRuntime( 2227): ... 10 more
W/ActivityManager( 1219): Force finishing activity com.ionicframework.notpush921844/.MainActivity
I/WindowManager( 1219): Screenshot max retries 4 of Token{f511ccd ActivityRecord{230d3264 u0 com.ionicframework.notpush921844/.MainActivity t61 f}} appWin=Window{1adfb8c9 u0 Starting com.ionicframework.notpush921844} drawState=4
E/ActivityManager( 1219): Invalid thumbnail dimensions: 576x576
D/OpenGLRenderer( 1219): Render dirty regions requested: true
D/Atlas ( 1219): Validating map...
D/ ( 1219): HostConnection::get() New Host Connection established 0x9de19530, tid 2264
I/OpenGLRenderer( 1219): Initialized EGL, version 1.4
D/OpenGLRenderer( 1219): Enabling debug mode 0
W/EGL_emulation( 1219): eglSurfaceAttrib not implemented
W/OpenGLRenderer( 1219): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9de3eb40, error=EGL_SUCCESS
W/ActivityManager( 1219): Activity pause timeout for ActivityRecord{230d3264 u0 com.ionicframework.notpush921844/.MainActivity t61 f}
W/EGL_emulation( 1475): eglSurfaceAttrib not implemented
W/OpenGLRenderer( 1475): Failed to set EGL_SWAP_BEHAVIOR on surface 0xb0a93b40, error=EGL_SUCCESS
W/OpenGLRenderer( 1475): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
W/OpenGLRenderer( 1475): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
W/OpenGLRenderer( 1475): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...
I/iu.UploadsManager( 1746): End new media; added: 0, uploading: 0, time: 28 ms
V/ConfigFetchTask( 1746): ConfigFetchTask getDeviceDataVersionInfo(): ABFEt1ViXdAKZc6rqCAOLFv7YJuwVLSY9_n4gaUyYMJPnZLeFSYFobS5FdRKHo-hnBvGnh1pycqXDTZLbzD-k5JtupkV7UW73Ugga_ju-VhYkvWRtl_Jn90jZhoDq_QYlbboOgPzzxDKH54r4FIa2bH3M1p-U8uzShc-PuRzDfha4UOokdUFujGIG2kLo5vTf6UKiU8mrJ_i-n_s1sm2CNkFb7o3Q7f_N1keqlCKSvXmpOQwTd0C7WGOOCYVnk7105hhiah5iLKl_0ZmwnXt9YnD2hVSUAQyDJPeLsFPksOqBpS6WQgtxBQ
I/GoogleURLConnFactory( 1746): Using platform SSLCertificateSocketFactory
W/ActivityThread( 1746): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
I/ActivityManager( 1219): Waited long enough for: ServiceRecord{39917cb u0 com.android.calendar/.alerts.InitAlarmsService}
I/ConfigFetchService( 1746): fetch service done; releasing wakelock
I/ConfigFetchService( 1746): stopping self
W/ActivityManager( 1219): Activity destroy timeout for ActivityRecord{230d3264 u0 com.ionicframework.notpush921844/.MainActivity t61 f}
I/CheckinService( 1746): Done disabling old GoogleServicesFramework version
I/ConfigService( 1598): onDestroy
D/TaskPersister( 1219): removeObsoleteFile: deleting file=61_task.xml
D/InitAlarmsService( 2008): Clearing and rescheduling alarms.
I/ActivityManager( 1219): Killing 1538:com.android.printspooler/u0a42 (adj 15): empty #17
W/libprocessgroup( 1219): failed to open /acct/uid_10042/pid_1538/cgroup.procs: No such file or directory
W/AudioTrack( 1219): AUDIO_OUTPUT_FLAG_FAST denied by client
I/Process ( 2227): Sending signal. PID: 2227 SIG: 9
I/ActivityManager( 1219): Process com.ionicframework.notpush921844 (pid 2227) has died
D/OpenGLRenderer( 1219): endAllStagingAnimators on 0xa2fe5880 (RippleDrawable) with handle 0x9deaf750
W/InputMethodManagerService( 1219): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#2a47c778 attribute=null, token = android.os.BinderProxy#344958d4
It turns out the problem was caused by adding Phonegap's PushPlugin. I just had to remove android platform with ionic platform rm android and then add it again with ionic platform add android. Works fine now in both emulator and device.

Categories

Resources