Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 14 emulator: App crashes with java.lang.SecurityException: "Writable dex file is not allowed. " #277

Open
dangrima90 opened this issue Sep 25, 2023 · 5 comments

Comments

@dangrima90
Copy link

Describe the bug
Currently trying to run an application in an Android 14 emulator is resulting in a crash on launch with the following error:

System.err: Error: java.lang.SecurityException: Writable dex file '/data/user/0/com.test.MobileApp/code_cache/secondary-dexes/com.caverock.androidsvg.SVGExternalFileResolver_vendor_184168_42_SVGExternalFileResolver.jar' is not allowed.

Looking at the links below, the error points to an update that is needed here in relation to Android 14+ security updates:

To Reproduce
Steps to reproduce the behavior:

  1. Run application using Android 14

Expected behavior
App not to crash

Stack traces

System.err: Error: java.lang.SecurityException: Writable dex file '/data/user/0/com.test.MobileApp/code_cache/secondary-dexes/com.caverock.androidsvg.SVGExternalFileResolver_vendor_184168_42_SVGExternalFileResolver.jar' is not allowed.

Device
If the problem only occurs on some devices, please include the following info.

  • Device(s): On our production logs we've seen plenty of Pixel devices and a few Samsung Devices
  • Android version or API level: Android 14 (API Level 34)

Additional context

This is in a NativeScript Vue application which is using ui-svg library. Issue doesn't seem to be related with NativeScript or the library itself.

@dangrima90
Copy link
Author

In case it helps I also found this documentation in relation to Android 14. It seems to point to the exception being shown in my case: https://developer.android.com/about/versions/14/behavior-changes-14

@lewebsimple
Copy link

Any update on this issue ?

@Mahalakshmi274
Copy link

Mahalakshmi274 commented Jul 21, 2024

Facing the same issue, any update on this issue? @BigBadaboom @dangrima90

@dangrima90
Copy link
Author

dangrima90 commented Jul 24, 2024

@lewebsimple and @Mahalakshmi274 In my case the issue was resolved via a NativeScript Android Runtime update. (NativeScript/android#1790). Which was released with NativeScript 8.6.0 (https://github.com/NativeScript/android/releases/tag/v8.6.0).

I don't know if you are using NativeScript but it could be a similar issue. If you are using NativeScript make sure that you use 8.6.0+ that should solve the issue.

@Mahalakshmi274
Copy link

@dangrima90 Thank you
App crash issue was resolved after updating Nativescript to the latest version and updating runtimes, core, and webpack to the latest versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants