gpt4 book ai didi

java.lang.UnsupportedOperationException : Robolectric does not support API level 1 异常

转载 作者:行者123 更新时间:2023-11-30 10:07:48 24 4
gpt4 key购买 nike

<分区>

我的gradle文件=

android {
compileSdkVersion 28
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

添加以下行会出错 -

@RunWith(RobolectricTestRunner.class)
@Config(manifest="src/main/AndroidManifest.xml")

Error =
java.lang.UnsupportedOperationException: Robolectric does not support API level 1, sorry!

at org.robolectric.SdkConfig.<init>(SdkConfig.java:23)
at org.robolectric.RobolectricTestRunner.pickSdkVersion(RobolectricTestRunner.java:306)
at org.robolectric.RobolectricTestRunner.getEnvironment(RobolectricTestRunner.java:282)
at org.robolectric.RobolectricTestRunner.access$300(RobolectricTestRunner.java:37)
at org.robolectric.RobolectricTestRunner$2.evaluate(RobolectricTestRunner.java:183)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.robolectric.RobolectricTestRunner$1.evaluate(RobolectricTestRunner.java:158)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com