Huawei DRM SDK gives RuntimeException - android

I have and app published on Huawei AppGallery. The application is paid and is protected by the huawei DRM SDK, and everything was working fine even the huawei DRM SDK.
But I now wanted to launch a new version of the application, but I get this error:
2020-06-19 15:11:16.797 17128-17128/com.aquainfo.huawei E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.aquainfo.huawei, PID: 17128
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.aquainfo.huawei/com.huawei.android.sdk.drm.DrmDialogActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3430)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86)
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:2199)
at android.os.Handler.dispatchMessage(Handler.java:112)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
at android.content.res.Resources.getText(Resources.java:430)
at android.content.res.HwResources.getText(HwResources.java:463)
at android.content.res.Resources.getString(Resources.java:523)
at android.content.Context.getString(Context.java:582)
at com.huawei.android.sdk.drm.j.a(Unknown Source:124)
at com.huawei.android.sdk.drm.DrmDialogActivity.onCreate(Unknown Source:143)
at android.app.Activity.performCreate(Activity.java:7458)
at android.app.Activity.performCreate(Activity.java:7448)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1286)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3409)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3614) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:86) 
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:2199) 
at android.os.Handler.dispatchMessage(Handler.java:112) 
at android.os.Looper.loop(Looper.java:216) 
at android.app.ActivityThread.main(ActivityThread.java:7625) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987) 
Based on this line com.huawei.android.sdk.drm.DrmDialogActivity} I think that the problem is with the huawei SDK, but so far it was working well with the DRM SDK.
My DRM sdk version is the 2.5.2.300. Is there somthing happening with that SDK? Ore hase the version chaged?
Thanks

The problem is caused by your resource files not found.
Verify that the resource files in .res file in DRM SDK folder are correctly imported, and not mistakenly deleted. Import them again if necessary.
For details, visit the official document DRM Service.

Related

Unable to share to Tiktok using Tiktok Video kit sdk Android

I am currently having an issue where I am unable to share to Tiktok using their video kit sdk, I am using the FileProvider implementation (I have tried the other implementation but I get the same error) https://developers.tiktok.com/doc/video-kit-android-android-fileprovider
Currently, when press to share to Tiktok I get this error:
Instrumentation: Uninitialized ActivityThread, likely app-created Instrumentation, disabling AppComponentFactory
java.lang.Throwable
at android.app.Instrumentation.getFactory(Instrumentation.java:1228)
at android.app.Instrumentation.newActivity(Instrumentation.java:1219)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3015)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3264)
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:1955)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7078)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
The app Intents to Tiktok and shows the Tiktok app opening but this just crashes with the above error?

java.lang.RuntimeException: Unable to start activity ComponentInfo(tensorflow.lite.examples)

I am working on this project: TensorFlow Lite image classification Android example application
GitHub link: https://github.com/tensorflow/examples/tree/master/lite/examples/image_classification/android
I run this project on my own phone (xiaomi redmi note 8) on Android Studio (not emulator)
When I run this project on Android Studio, TFL Classify applications gives the following error: application keep stopping.
Then Android Studio gives this error:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.tensorflow.lite.examples.classification, PID: 20798
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.tensorflow.lite.examples.classification/org.tensorflow.lite.examples.classification.ClassifierActivity}: java.lang.IllegalArgumentException: No enum constant org.tensorflow.lite.examples.classification.tflite.Classifier.Model.QUANTİZED_EFFİCİENTNET
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3119)
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:1839)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6864)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: java.lang.IllegalArgumentException: No enum constant org.tensorflow.lite.examples.classification.tflite.Classifier.Model.QUANTİZED_EFFİCİENTNET
at java.lang.Enum.valueOf(Enum.java:258)
at org.tensorflow.lite.examples.classification.tflite.Classifier$Model.valueOf(Classifier.java:47)
at org.tensorflow.lite.examples.classification.CameraActivity.onCreate(CameraActivity.java:195)
at android.app.Activity.performCreate(Activity.java:7232)
at android.app.Activity.performCreate(Activity.java:7221)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2964)
I updated SDK version 28 to 29.0.2 but it didn't work
Remove the accents from the string QUANTİZED_EFFİCİENTNET - it should be QUANTIZED_EFFICIENTNET so it matches the corresponding enum label.

DeepSpeechDemo App works with Gradle cli but crashes when built with Android Studio

The android-mic-streaming demo works off-the-shelf using ./gradlew installDebug, but when the play button in Android Studio is used to compile and install the exact same project it crashes with the following after tapping record:
2020-08-19 00:44:24.862 12872-12872/org.deepspeechdemo E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.deepspeechdemo, PID: 12872
java.lang.IllegalStateException: Could not execute method for android:onClick
at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:390)
at android.view.View.performClick(View.java:7448)
at android.view.View.performClickInternal(View.java:7425)
at android.view.View.access$3600(View.java:810)
at android.view.View$PerformClick.run(View.java:28296)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385)
at android.view.View.performClick(View.java:7448) 
at android.view.View.performClickInternal(View.java:7425) 
at android.view.View.access$3600(View.java:810) 
at android.view.View$PerformClick.run(View.java:28296) 
at android.os.Handler.handleCallback(Handler.java:938) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: library "libdeepspeech-jni.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1087)
at java.lang.Runtime.loadLibrary0(Runtime.java:1008)
at java.lang.System.loadLibrary(System.java:1664)
at org.mozilla.deepspeech.libdeepspeech.DeepSpeechModel.<clinit>(DeepSpeechModel.java:9)
at org.deepspeechdemo.MainActivity.createModel(MainActivity.kt:90)
at org.deepspeechdemo.MainActivity.onRecordClick(MainActivity.kt:120)
at java.lang.reflect.Method.invoke(Native Method) 
at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:385) 
at android.view.View.performClick(View.java:7448) 
at android.view.View.performClickInternal(View.java:7425) 
at android.view.View.access$3600(View.java:810) 
at android.view.View$PerformClick.run(View.java:28296) 
at android.os.Handler.handleCallback(Handler.java:938) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
The issue seems to be related to libdeepspeech-jni.so not being included when Android Studio is used. I am completely new to Android development (I'm building a Mozilla-STT React Native module and only supporting iOS is useless) so this is especially confusing.
Thanks!
EDIT:
Hours of random trial and error later: Changing this option from "Default APK" to "APK from app bundle" in Android Studio made the demo start working
However, doing the same on my example app for the React Native module (which has a dependency android project which finally depends on the actual libdeepspeech) didn't work. It started working when using x86_64, so there must be no libdeepspeech x86 binary.
Hours of random trial and error later: Changing this option from "Default APK" to "APK from app bundle" in Android Studio made the demo start working
However, doing the same on my example app for the React Native module (which has a dependency android project which finally depends on the actual libdeepspeech) didn't work. It started working when using x86_64, so there must be no libdeepspeech x86 (32 bit) binary.

Crash on pre-launch of goolgle play store

Crash status google play pre-launch report on
Android Version
Android 8.1
Native Platform
armeabi-v7a
fine with other devices
is see the video and check the crash logs its not related to my app. whan app start the chrome app was crashed
here is the crash log and video
Issue: android.content.res.Resources$NotFoundException: Array resource ID #0x7f03000e
FATAL EXCEPTION: main
Process: com.android.chrome:sandboxed_process0, PID: 10331
android.content.res.Resources$NotFoundException: Array resource ID #0x7f03000e
at android.content.res.Resources.obtainTypedArray(Resources.java:618)
at android.content.res.Resources.preloadFonts(Resources.java:380)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5769)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1656)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.WebViewZygoteInit.main(WebViewZygoteInit.java:146)
I just remove the downloadable font meta tag from manifest
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
my problem solved.

Cannot connect to android.support.test.orchestrator.OrchestratorService

Not able to run instrumentation test with android orchestrator,
I have followed developer doc and made same changes but it's not working.
Screen shot and logs are attached.
Any help would be appreciated thanks in advance
Logcat:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.ctpl.myinstrumentationtest, PID: 6608
java.lang.RuntimeException: Exception thrown in onCreate() of ComponentInfo{com.example.ctpl.myinstrumentationtest.test/android.support.test.runner.AndroidJUnitRunner}: java.lang.RuntimeException: Cannot connect to android.support.test.orchestrator.OrchestratorService
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5868)
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)
Caused by: java.lang.RuntimeException: Cannot connect to android.support.test.orchestrator.OrchestratorService
at android.support.test.orchestrator.instrumentationlistener.OrchestratedInstrumentationListener.connect(OrchestratedInstrumentationListener.java:87)
at android.support.test.runner.AndroidJUnitRunner.onCreate(AndroidJUnitRunner.java:303)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5863)
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) 
List item
I had the same problem but with androidx orchestrator. I was getting the same exception but the package was different:
Caused by: java.lang.RuntimeException: Cannot connect to androidx.test.orchestrator.OrchestratorService.
I have found the description of possbile root cause in this github thread. There's an iteresting discussion, but it seems that there's no general solution for this yet.
For me the problem was caused by setting the target sdk to 30 and launching the app on an android 30 emulator. So launching tests on emulator with api < 30 resolved this.

Categories

Resources