dexmaker icon indicating copy to clipboard operation
dexmaker copied to clipboard

java.lang.SecurityException: Writable dex file error when executing on Android 14

Open vyvanhungbg opened this issue 2 years ago • 1 comments

Hi everybody. I recently encountered an error on android 14. Specifically from change Change list android 14. I am using reflection for an application function but it seems that the change from Android 14 is not allowing recording from DCL so the feature is affected. Is there any way to handle this case?. Thanks everyone

java.lang.RuntimeException: java.lajava.lang.RuntimeException java.lang.SecurityException: Writable dex file '/data/user/0/com.android.example/code_cache/v1/Generated_1202068130.jar' is not allowed.
2024-01-05 09:47:47.354 14625-14625 System.err              com.android.example  W  	at com.android.dx.DexMaker.generateClassLoader(DexMaker.java:464)
2024-01-05 09:47:47.355 14625-14625 System.err              com.android.example  W  	at com.android.dx.DexMaker.generateAndLoad(DexMaker.java:538)
2024-01-05 09:47:47.355 14625-14625 System.err              com.android.example  W  	at com.android.dx.stock.ProxyBuilder.buildProxyClass(ProxyBuilder.java:337)
2024-01-05 09:47:47.355 14625-14625 System.err              com.android.example  W  	at com.android.dx.stock.ProxyBuilder.build(ProxyBuilder.java:236)

vyvanhungbg avatar Jan 05 '24 03:01 vyvanhungbg

Hi @vyvanhungbg , can you share the version of dexmaker you're using? The most recent release contains some fixes for Android 14, see #181 which is in version 2.28.3 (the latest)

kkoser avatar Jan 16 '24 23:01 kkoser

I can confirm I had the same problem with the 2.25.1, and the 2.28.4 fixed it.

Thanks @kkoser

nicolas71640 avatar Apr 07 '25 20:04 nicolas71640

Thanks for your support, I upgraded like you and the issue was resolved. @kkoser

vyvanhungbg avatar Jun 20 '25 17:06 vyvanhungbg