[Android] Abstract classes can't be instantiated when using full R8 mode after AGP 8.0 upgrade

1,402 views
Skip to first unread message

David Trpchevski

unread,
Apr 25, 2023, 3:36:51 PM4/25/23
to Interactive Media Ads SDK

Hello everyone,

I am working on a project that supports VAST ADs on the Video Player via Google IMA. Recently we’ve upgraded to AGP 8.0 which enforces full R8 mode (android.enableR8.fullMode flag is set to true by default). When building a release version of the app with obfuscation, the following errors pop up:

  com.google.ads.interactivemedia.v3.internal.zzse: Abstract classes can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Class name: com.google.ads.interactivemedia.v3.impl.data.JavaScriptMsgDataWebViewCompat

Full error log is in the attachments. 

If I keep classes and interfaces from R8 and add this to proguard-rules it works fine:

-keep interface com.google.ads.interactivemedia.v3.** { *; }
-keep class com.google.ads.interactivemedia.v3.** { *; }


IMAError.txt

IMA SDK

unread,
Apr 26, 2023, 4:03:27 AM4/26/23
to trpcevs...@gmail.com, ima...@googlegroups.com

Hi David,

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

For us to have a better understanding of your issue, kindly provide the following information below:

  1. Is the issue reproducible using our sample app? [https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/download] Please specify
  2. Kindly provide a sample project implementation where the issue is reproducible
  3. Steps to reproduce the issue
  4. Screen recording of issue

Make sure to send these information using the "Reply to Author" option. 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=5004Q00002kqJOQQA2&entry.80707362=00176364
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.

Looking forward to your response.

Regards,

Google Logo IMA SDK Team


ref:_00D1U1174p._5004Q2kqJOQ:ref

David Trpchevski

unread,
Apr 26, 2023, 6:39:59 AM4/26/23
to Interactive Media Ads SDK
This can be closed. In the sample app, the same proguard rules are applied so I guess this is intended. 

IMA SDK

unread,
Apr 26, 2023, 7:12:18 AM4/26/23
to trpcevs...@gmail.com, ima...@googlegroups.com

Hi David,

Let us know if you still have any IMA SDK concerns for us to address. We're happy to assist.

Regards,

Reply all
Reply to author
Forward
0 new messages