diff options
author | Tsung-Mao Fang <tmfang@google.com> | 2022-03-02 15:01:35 +0800 |
---|---|---|
committer | Tsung-Mao Fang <tmfang@google.com> | 2022-03-02 07:57:11 +0000 |
commit | 613bd9d6462b763bd4973e848c1fd2c36f016fd0 (patch) | |
tree | edd56a6bcc07ef9b3d8f61432958a47f0e186284 | |
parent | c3fb93b64f8fa2936a46a2c99a4f9b1366f1561d (diff) | |
download | robolectric-shadows-613bd9d6462b763bd4973e848c1fd2c36f016fd0.tar.gz |
Do not instrument for androidx.lifecycle.viewmodel
Test: Run robo tests for settings project
Fix: 221885823
Change-Id: I05bb745e616d69c0afd54d3cfe244fd53bf7b8d8
-rw-r--r-- | robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java b/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java index c7b986e46..7c54f4760 100644 --- a/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java +++ b/robolectric/src/main/java/org/robolectric/internal/AndroidConfigurer.java @@ -104,6 +104,9 @@ public class AndroidConfigurer { // This results in an error where two __robo_data__ fields get added to the same object. builder.doNotInstrumentPackage("androidx.room.migration"); builder.doNotInstrumentPackage("androidx.test"); + // Robolectric instrumentation causes issues with the + // androidx.lifecycle.viewmodel.MutableCreationExtras constructor. + builder.doNotInstrumentPackage("androidx.lifecycle.viewmodel"); builder.doNotInstrumentPackage("android.arch.persistence.room.migration"); builder.doNotInstrumentPackage("android.support.test"); |