Fixed
Status Update
Comments
ch...@google.com <ch...@google.com>
ch...@google.com <ch...@google.com> #2
Thank you for reporting this issue. We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
ap...@google.com <ap...@google.com> #3
- Build Number: google/coral/coral:11/RPB1.200504.020/6557529:user/release-keys
Filed by Android Beta Feedback. Version (Bundled): 2.10-betterbug.external_20200514_RC01
To learn more about our feedback process, please visithttps://developer.android.com/preview/feedback#feedback-app .
Filed by Android Beta Feedback. Version (Bundled): 2.10-betterbug.external_20200514_RC01
To learn more about our feedback process, please visit
ap...@google.com <ap...@google.com> #4
Information redacted by Android Beta Feedback.
ap...@google.com <ap...@google.com> #5
not reboot issues
RPB1.200504.020
issues reboot crashed
RPB1.200504.020
issues reboot crashed
ch...@google.com <ch...@google.com> #6
The issue has been fixed and it will become available in a future Android release. Please keep an eye on the release notes(https://developer.android.com/preview/release-notes.html ).
Description
The example app speaks for itself. But basically, if you try to call Bundle.putParcelableArray(key, new Bundle[0]) and Bundle.putParcelableArray(key, new Intent[0]) from within a switch statement that is inside of a loop, you'll get the following error if your app is minified:
Caused by: java.lang.VerifyError: Verifier rejected class com.example.verify.a: void com.example.verify.a.a(org.json.JSONObject) failed to verify: void com.example.verify.a.a(org.json.JSONObject): [0x14] register v1 has type Reference: java.lang.Object[] but expected Reference: android.os.Parcelable[] (declaration of 'com.example.verify.a' appears in /data/app/com.example.verify-2/base.apk:classes4.dex)
To workaround this, you either need to set minifyEnabled to false or perform an unnecessary cast:
b.putParcelableArray("bundles", (Parcelable[])new Bundle[0]);
or
b.putParcelableArray("intents", (Parcelable[])new Intent[0]);
Either line works and the error is avoided. But you'll now get a lint error about the cast being redundant.
There are also some other strange ways to avoid the error like not calling any methods on the passed in JSONObject. You can also put the two putParcelableArray statements under the same case statement and the error goes away.
I know the example code doesn't make a lot of sense. But I discovered this in a much more complex app and the switch inside a loop seems to be the trigger.
Android Studio Version: 3.3.2
Android Gradle Plugin: 3.3.2