Question
Robolectric - Package targetSdkVersion=30 > maxSdkVersion=29
Error:
java.lang.IllegalArgumentException: failed to configure : Package targetSdkVersion=30 > maxSdkVersion=29
at org.robolectric.RobolectricTestRunner.getChildren(RobolectricTestRunner.java:247) at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:534) at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:400) at androidx.test.ext.junit.runners.AndroidJUnit4.getDescription(AndroidJUnit4.java:149) at org.junit.runners.model.RunnerBuilder.configureRunner(RunnerBuilder.java:81) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:72) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:37) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:70) at org.junit.internal.requests.ClassRequest.createRunner(ClassRequest.java:28) at org.junit.internal.requests.MemoizingRequest.getRunner(MemoizingRequest.java:19) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:50) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53) Caused by: java.lang.IllegalArgumentException: Package targetSdkVersion=30 > maxSdkVersion=29 at org.robolectric.plugins.DefaultSdkPicker.configuredSdks(DefaultSdkPicker.java:118) at org.robolectric.plugins.DefaultSdkPicker.selectSdks(DefaultSdkPicker.java:69) at org.robolectric.RobolectricTestRunner.getChildren(RobolectricTestRunner.java:213) ... 13 more
How to fix this issue?