androidhuawei-mobile-servicesappgallery-connecthuawei-drm

Huawei DRM SDK gives RuntimeException


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


Solution

  • 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.