Closed Jaguaribe21 closed 4 years ago
The error Unable to instantiate appComponentFactory java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory"
seems to indicate an issue with using JetPack APIs. Are you able to run other Android examples such as handtrackinggpu ?
Hand Tracking has stopped, did not work, but any procedure? thank you.
logcat:
2019-12-18 20:19:23.604 8689-8689/com.google.mediapipe.apps.handtrackinggpu E/LoadedApk: Unable to instantiate appComponentFactory
java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.google.mediapipe.apps.handtrackinggpu-Nf279SyjugpeM5CaznemAg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.mediapipe.apps.handtrackinggpu-Nf279SyjugpeM5CaznemAg==/lib/x86_64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.LoadedApk.createAppFactory(LoadedApk.java:226)
at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:731)
at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
at android.app.LoadedApk.getResources(LoadedApk.java:1032)
at android.app.ContextImpl.createAppContext(ContextImpl.java:2345)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5749)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
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)
2019-12-18 20:19:24.211 8689-8689/com.google.mediapipe.apps.handtrackinggpu E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.mediapipe.apps.handtrackinggpu, PID: 8689
java.lang.UnsatisfiedLinkError: com.google.devtools.build.android.incrementaldeployment.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/local/tmp/incrementaldeployment/com.google.mediapipe.apps.handtrackinggpu/dex/incremental_classes1.dex"],nativeLibraryDirectories=[/data/user/0/com.google.mediapipe.apps.handtrackinggpu/lib, /system/lib64]]] couldn't find "libmediapipe_jni.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1012)
at java.lang.System.loadLibrary(System.java:1669)
at com.google.mediapipe.apps.handtrackinggpu.MainActivity.
Seems like another issue is that "libmediapipe_jni.so" is not found. What's your testing device? Is it armv8_64 or armv7?
Android 9 x86_64.
Parece que outro problema é que "libmediapipe_jni.so" não foi encontrado. Qual é o seu dispositivo de teste? É armv8_64 ou armv7?
We focus on Android ARM devices and probably don't have a good coverage of Android x86_64 yet.
I used api 25 arm64, gave this error Emulator: Process finished with exit code 139 (interrupted by signal 11: SIGSEGV), nor installed the application, then used api 24 and gave the same error multi hand tracking has keep stopped, which API would you recommend for me to use in android studio. Thanks!
We usually use API 28/29. For example, API 29 is used in the hand tracking aar example: https://github.com/jiuqiant/mediapipe_multi_hands_tracking_aar_example/blob/master/app/build.gradle. I also tried api 21 before and it worked ok with those cpu demos: https://github.com/google/mediapipe/issues/178#issuecomment-547619564
I did every procedure to change the api level, used api 21 nexus 5 gave the same error multihand tracking has stopped when trying to execute.
log: ` 12/23 21:05:19: Launching 'multihandtrackinggpu:multihandtrackinggpu'. $ adb shell am start -n "com.google.mediapipe.apps.multihandtrackinggpu/com.google.mediapipe.apps.multihandtrackinggpu.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Connected to process 2595 on device 'unknown-google_nexus_5-192.168.57.101:5555'. Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page. E/libprocessgroup: failed to make and chown /acct/uid_10051: Read-only file system W/Zygote: createProcessGroup failed, kernel missing CONFIG_CGROUPCPUACCT? V/StubApplication: StubApplication created. Android package is com.google.mediapipe.apps.multihandtrackinggpu, real application class is android.app.Application. Found external resources at /data/local/tmp/incrementaldeployment/com.google.mediapipe.apps.multihandtrackinggpu/resources.ap V/IncrementalClassLoader: Incremental dex path is /data/local/tmp/incrementaldeployment/com.google.mediapipe.apps.multihandtrackinggpu/dex/incremental_classes1.dex Native lib dir is /data/data/com.google.mediapipe.apps.multihandtrackinggpu/lib V/INCREMENTAL: disableContentProviders V/INCREMENTAL: enableContentProviders D/Camera2Initializer: CameraX initializing with Camera2 ... D/CameraRepository: Added camera: 0 D/UseCaseAttachState: Active and online use case: [] for camera: 0 D/CameraRepository: Added camera: 1 D/UseCaseAttachState: Active and online use case: [] for camera: 1 D/AndroidRuntime: Shutting down VM
--------- beginning of crash
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.google.mediapipe.apps.multihandtrackinggpu, PID: 2595
java.lang.UnsatisfiedLinkError: com.google.devtools.build.android.incrementaldeployment.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/local/tmp/incrementaldeployment/com.google.mediapipe.apps.multihandtrackinggpu/dex/incremental_classes1.dex"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libmediapipe_jni.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:989)
at com.google.mediapipe.apps.multihandtrackinggpu.MainActivity.
I changed the API to 21 (see how to do it here) and tested the object detection cpu demo app on a Nexus 5, it works OK.
$ bazel build -c opt --config=android_arm mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectioncpu
$ adb install bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectioncpu/objectdetectioncpu.apk
Performing Push Install
bazel-bin/mediapipe/examples/android/src/java/co...ile pushed. 4.5 MB/s (61458107 bytes in 12.994s)
pkg: /data/local/tmp/objectdetectioncpu.apk
Success
I tested the multi hand detection demo. Although I didn't see a crash, I got a black screen instead. I guess it's a TFLite GPU/OpenGl issue rather than a MediaPipe issue.The error message is the following:
01-02 10:23:41.192 29331 29360 I tflite : Initialized TensorFlow Lite runtime.
01-02 10:23:41.194 29331 29360 I tflite : Created TensorFlow Lite delegate for GPU.
01-02 10:23:41.194 29331 29360 W Adreno-ES20: <core_glBindBuffer:809>: GL_INVALID_ENUM
01-02 10:23:41.194 29331 29360 W Adreno-ES20: <core_glBufferData:1009>: GL_INVALID_ENUM
01-02 10:23:41.194 29331 29360 W Adreno-ES20: <core_glBindBuffer:809>: GL_INVALID_ENUM
Got the same bug, any procedure to fix it? Being able to open the app in api 23, only it is on the black screen.
Thanks so much for the return!
when opening the app gave this error App Has Stopped, I will make logcat available:
2019-12-18 13:14:04.862 1842-1855/? E/memtrack: Couldn't load memtrack module 2019-12-18 13:14:04.988 7226-7226/? E/handtrackinggp: Not starting debugger since process cannot load the jdwp agent. 2019-12-18 13:14:05.060 7226-7226/? E/LoadedApk: Unable to instantiate appComponentFactory java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.google.mediapipe.apps.multihandtrackinggpu-WomerYZLrD99yxTwK9OmXg==/base.apk"],nativeLibraryDirectories=[/data/app/com.google.mediapipe.apps.multihandtrackinggpu-WomerYZLrD99yxTwK9OmXg==/lib/x86, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) at android.app.LoadedApk.createAppFactory(LoadedApk.java:226) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:731) at android.app.LoadedApk.getClassLoader(LoadedApk.java:810) at android.app.LoadedApk.getResources(LoadedApk.java:1032) at android.app.ContextImpl.createAppContext(ContextImpl.java:2345) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5749) at android.app.ActivityThread.access$1100(ActivityThread.java:199) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) 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) 2019-12-18 13:14:05.917 7226-7226/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.mediapipe.apps.multihandtrackinggpu, PID: 7226 java.lang.UnsatisfiedLinkError: com.google.devtools.build.android.incrementaldeployment.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/local/tmp/incrementaldeployment/com.google.mediapipe.apps.multihandtrackinggpu/dex/incremental_classes1.dex"],nativeLibraryDirectories=[/data/user/0/com.google.mediapipe.apps.multihandtrackinggpu/lib, /system/lib]]] couldn't find "libmediapipe_jni.so" at java.lang.Runtime.loadLibrary0(Runtime.java:1012) at java.lang.System.loadLibrary(System.java:1669) at com.google.mediapipe.apps.multihandtrackinggpu.MainActivity.(MainActivity.java:56)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69)
at android.app.Instrumentation.newActivity(Instrumentation.java:1215)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2831)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
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)
2019-12-18 13:14:06.024 7138-7217/? E/s.nexuslaunche: No package ID ff found for ID 0xffffffff.
2019-12-18 13:14:06.025 7138-7217/? 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(SourceFile:118)
at com.android.systemui.shared.recents.model.IconLoader.getAndInvalidateIfModified(SourceFile:94)
at com.android.systemui.shared.recents.model.RecentsTaskLoader.getAndUpdateActivityIcon(SourceFile:325)
at com.android.systemui.shared.recents.model.RecentsTaskLoadPlan.executePlan(SourceFile:188)
at com.android.systemui.shared.recents.model.RecentsTaskLoader.loadTasks(SourceFile:173)
at com.android.quickstep.RecentsModel.onTaskStackChangedBackground(SourceFile:214)
at com.android.systemui.shared.system.TaskStackChangeListeners.onTaskStackChanged(SourceFile:80)
at android.app.ITaskStackListener$Stub.onTransact(ITaskStackListener.java:50)
at android.os.Binder.execTransact(Binder.java:731)
2019-12-18 13:14:06.312 7138-7174/? E/AndroidRuntime: FATAL EXCEPTION: reflection-thread
Process: com.google.android.apps.nexuslauncher, PID: 7138
java.lang.IllegalArgumentException
at java.util.concurrent.ThreadPoolExecutor.(ThreadPoolExecutor.java:1332)
at java.util.concurrent.ThreadPoolExecutor.(ThreadPoolExecutor.java:1220)
at java.util.concurrent.Executors.newFixedThreadPool(Executors.java:96)
at com.google.research.reflection.layers.v.(SourceFile:27)
at com.google.research.reflection.layers.v.lW(SourceFile:38)
at com.google.research.reflection.layers.f.a(SourceFile:264)
at com.google.research.reflection.layers.r.a(SourceFile:74)
at com.google.research.reflection.predictor.d.i(SourceFile:171)
at com.google.research.reflection.predictor.AbstractEventEstimator.h(SourceFile:105)
at com.google.android.apps.nexuslauncher.reflection.l.c(SourceFile:320)
at com.google.android.apps.nexuslauncher.reflection.l.b(SourceFile:285)
at com.google.android.apps.nexuslauncher.reflection.n.a(SourceFile:164)
at com.google.android.apps.nexuslauncher.reflection.j.handleMessage(SourceFile:146)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2019-12-18 13:14:06.658 7138-7138/? E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted
2019-12-18 13:14:06.753 6227-6227/? E/OverlaySController: Calling with an invalid UID, the interface will not work
2019-12-18 13:14:06.658 7138-7138/? E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted
2019-12-18 13:14:06.887 7138-7138/? E/SchedPolicy: set_timerslack_ns write failed: Operation not permitted
2019-12-18 13:14:07.107 6227-6257/? E/EntrySyncManager: Cannot determine account name: drop request
2019-12-18 13:14:07.108 6227-6257/? E/NowController: Failed to access data from EntryProvider. ExecutionException.
java.util.concurrent.ExecutionException: com.google.android.apps.gsa.sidekick.main.h.n: Could not complete scheduled request to refresh entries. ClientErrorCode: 3
at com.google.common.util.concurrent.d.eA(SourceFile:85)
at com.google.common.util.concurrent.d.get(SourceFile:23)
at com.google.common.util.concurrent.l.get(SourceFile:2)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.cbB(SourceFile:49)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.cbA(SourceFile:181)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.bh.run(Unknown Source:2)
at com.google.android.apps.gsa.shared.util.concurrent.at.run(SourceFile:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4)
at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)
at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
at com.google.android.apps.gsa.shared.util.concurrent.b.i.run(SourceFile:6)
Caused by: com.google.android.apps.gsa.sidekick.main.h.n: Could not complete scheduled request to refresh entries. ClientErrorCode: 3
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.ar.az(Unknown Source:4)
at com.google.common.util.concurrent.q.ap(SourceFile:7)
at com.google.common.util.concurrent.p.run(SourceFile:32)
at com.google.common.util.concurrent.bt.execute(SourceFile:3)
at com.google.common.util.concurrent.d.b(SourceFile:275)
at com.google.common.util.concurrent.d.addListener(SourceFile:135)
at com.google.common.util.concurrent.p.b(SourceFile:3)
at com.google.android.apps.gsa.shared.util.concurrent.h.a(SourceFile:16)
at com.google.android.apps.gsa.shared.util.concurrent.h.a(SourceFile:13)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.cbB(SourceFile:47)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.be.cbA(SourceFile:181)
at com.google.android.apps.gsa.staticplugins.nowstream.b.a.bh.run(Unknown Source:2)
at com.google.android.apps.gsa.shared.util.concurrent.at.run(SourceFile:4)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at com.google.android.apps.gsa.shared.util.concurrent.b.g.run(Unknown Source:4)
at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)
at com.google.android.apps.gsa.shared.util.concurrent.b.aw.run(SourceFile:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)
at com.google.android.apps.gsa.shared.util.concurrent.b.i.run(SourceFile:6)
2019-12-18 13:14:15.045 1842-1861/? E/BatteryExternalStatsWorker: no controller energy info supplied for wifi