[Android 14] App crash on Android 14 caused by SecurityException: Writable dex file is not allowed.

8,054 views
Skip to first unread message

Choudhury Md Imran

unread,
Jun 30, 2023, 3:17:20 AM6/30/23
to Interactive Media Ads SDK
Hello IMA SDK community,
After updating the target SDK to 34 apps crashed with the below exception happening for Android 14 devices. 

Without updating the IMA SDK version is there any way to fix the issue on this version?  
"version 'com.google.ads.interactivemedia.v3:interactivemedia:3.11.3'"

Logs:
2023-06-30_15-58.png

Environment:
Android 14 with build number: UPB3.230519.014
Kotlin version: 1.8.10
Build Gradle version: 7.4.2 (7.5)
min SDK version: 23
Target SDK version: 34
IMA SDK version: 3.11.3
ExoPlayer version: 2.10.6

N.B: On attached you will find the error log text. 
Thanks in advance.
SecurityException.txt

IMA SDK

unread,
Jun 30, 2023, 5:57:16 AM6/30/23
to imran....@gmail.com, ima...@googlegroups.com

Hi,

Thank you for raising your concern to the IMA SDK forum.

Upon checking, it appears that you are using a deprecated version of the IMA SDK for Android (v3.11.3) which was deprecated on September 3, 2020, more information here: https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/deprecation#:~:text=September%2011%2C%202020-,3.11.3,-September%203%2C%202020

Please note the differences between supported and deprecated versions here: https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/deprecation. Moving forward, I recommend using IMA SDK version 3.29.0 (https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/history)

Let me know if you have any questions.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2mq9XU:ref"

Thanks,
 
Google Logo IMA SDK Team


Choudhury Md Imran

unread,
Jul 2, 2023, 10:49:43 PM7/2/23
to Interactive Media Ads SDK
Hello, 
Thank you for replying quickly. As per the suggestion, we did update the version. But still getting the same issue with SDK 34 on Android 14. Please suggest if you have any other solution. 
SecurityException log.txt

IMA SDK

unread,
Jul 3, 2023, 11:46:48 AM7/3/23
to imran....@gmail.com, ima...@googlegroups.com
Hello,

Thank you for responding back to us.

For us to be able to investigate further on your concern, kindly provide the below information:
  • sample project implementation where the issue is reproducible
  • full stack trace
  • screen recording of the issue

If the file(s) you are looking to share are less than 25mb in total you can attach them to this case on your next reply. If you are having trouble attaching your file to this case or if your file(s) are larger than 25mb, you can share your files with me by performing the following steps:


1. Navigate to

https://docs.google.com/forms/d/e/1FAIpQLSfkAiXMeYP-fw1W3Z-tT9uwmATEKO5X6S-th0gR2ezdKaaqfg/viewform?usp=pp_url&entry.400550049=IMA+SDK&entry.460850823=5004Q00002mq9XUQAY&entry.80707362=00186620

2. Fill out all fields, and attach your file(s).

3. Please reply back on this thread when you have uploaded your file(s). Please do not share this link.

 

Choudhury Md Imran

unread,
Jul 3, 2023, 10:48:20 PM7/3/23
to Interactive Media Ads SDK
Hello again, 
I appreciate your support. You can reproduce the issue from the Media3 library (https://github.com/androidx/media). When you update TargetSdk to 34 this exception will occur. I attached the screen recording of the issue. 

2023-07-04_11-38.png

Maybe the issue is happening for Behavior changes of Android 14, please check it out: https://developer.android.com/about/versions/14/behavior-changes-14#safer-dynamic-code-loading
device-2023-07-04-114345.mp4

IMA SDK

unread,
Jul 4, 2023, 7:47:27 AM7/4/23
to imran....@gmail.com, ima...@googlegroups.com

Hi,

Thank you for providing more information.

I was able to reproduce the issue with the steps you provided. With this, allow me to raise your concern to the rest of the team for further insights. Rest assured that we will get back to you for more information.

IMA SDK

unread,
Jul 5, 2023, 5:27:04 PM7/5/23
to ima...@googlegroups.com, imran....@gmail.com
Hello,

Thank you for patiently waiting. Our team responded back to us and would like to know if you can share detailed instructions on how to reproduce this issue in the sample apps (https://github.com/googleads/googleads-ima-android/releases)? Asking this as we have tested using the basic example app from the provided link and we were not able to reproduce the behavior on our end.

Choudhury Md Imran

unread,
Jul 5, 2023, 8:41:25 PM7/5/23
to Interactive Media Ads SDK
Hello again, 
Thank you for checking the issue. If you try "ExoPlayerExample3.30.1-0" and update the targetSdkVersion as 34 then you will find the issue.  The base example app is working fine. 

IMA SDK

unread,
Jul 6, 2023, 4:12:25 AM7/6/23
to imran....@gmail.com, ima...@googlegroups.com

Hi,

Thank you for your response. We'll update you once we have new information to share.
 

Choudhury Md Imran

unread,
Jul 24, 2023, 9:50:31 PM7/24/23
to Interactive Media Ads SDK
Hello again, 
I appreciate your valuable time. Please lets us know if you have any update regarding this issue. 

IMA SDK

unread,
Jul 25, 2023, 1:06:28 AM7/25/23
to imran....@gmail.com, ima...@googlegroups.com

Hi,

The team is still working on your issue. We'll let you know once we have more information to share. Thank you for your patience.
 

Andy Larochelle

unread,
Sep 6, 2023, 11:43:09 AM9/6/23
to Interactive Media Ads SDK
Hi,

With Android 14 coming soon, do you have any update on this?

Thanks,

IMA SDK

unread,
Sep 6, 2023, 12:57:56 PM9/6/23
to alaro...@mirego.com, ima...@googlegroups.com
Hello,

Thank you for patiently waiting. The issue is expected to be fixed now on the latest version of the SDK. Kindly try the latest version v3.31.0 (https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/download) and see if you still encounter the same issue.

Sahil Garg

unread,
Jan 9, 2024, 12:44:46 AM1/9/24
to Interactive Media Ads SDK
Hello,

I'm facing the similar issue on Android 14 and I'm currently using v3.29.0, 
but I can't update to the latest v3.31.0 because of the following issue in latest version with media3

Screenshot 2024-01-09 at 10.34.28 AM.png

So, I'm kind of stuck in the loop for version upgrade. Please help me out and let me know what could be the possible solution for this use case and when can we expect the fix for this NullPointerException.

Thanks

IMA SDK

unread,
Jan 9, 2024, 3:15:13 AM1/9/24
to ima...@googlegroups.com

Hi Sahil Garg,

Thank you for contacting the IMA SDK support team.

By reviewing your concern, I understand that the Android application is facing a crash issue caused by security exceptions: Writable dex file is not allowed.

I will check with our team regarding your query and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated. 

This message is in relation to case "ref:!00D1U01174p.!5004Q02mq9XU:ref"


Thanks,
 
Google Logo IMA SDK Team


IMA SDK

unread,
Jan 10, 2024, 4:44:53 PM1/10/24
to ima...@googlegroups.com
Hello Sahil,

Thanks for reaching out, this is Jackson from the IMA SDK team to help with your issue.

I was able to see the crash you reported on Android 14 with IMA SDK v3.29.0.

I would recommend updating to the latest IMA SDK (v3.31.0). I tested here and did not experience the crash. Please note that the fix for the NullPointerException issue was introduced in v3.30.2, so v3.31.0 also includes this fix.

Thank you,
Jackson
IMA SDK team

ref:!00D1U01174p.!5004Q02mq9XU:ref

Sahil Garg

unread,
Jan 16, 2024, 2:02:50 AM1/16/24
to Interactive Media Ads SDK
Greetings,

Thanks for your quick help. I tried with the latest IMA SDK v3.31.0 and both the ima issues are fixed in that. I would like to recommend that you should mention in ima release notes about the fix of NullPointerException issue inside its released version changelog. This might help lot of developers like me.

Thanks,
Sahil Garg

IMA SDK

unread,
Jan 16, 2024, 12:04:14 PM1/16/24
to ima...@googlegroups.com
Hello Sahil,

Thanks for confirmation of the fix in v3.31.0. I have updated the Android release notes for this fix.
Reply all
Reply to author
Forward
0 new messages