草庐IT

test_utility

全部标签

android - 没有找到类 "android.support.test.runner.AndroidJUnitRunner"

我正在尝试使用插桩测试,并将我的项目更新为AndroidX。但是在尝试运行时出现以下错误:2018-10-0914:22:29.46813263-13263/xxx.yyyE/AndroidRuntime:FATALEXCEPTION:mainProcess:xxx.yyy,PID:13263java.lang.RuntimeException:UnabletoinstantiateinstrumentationComponentInfo{xxx.yyy.test/android.support.test.runner.AndroidJUnitRunner}:java.lang.Cla

Android 错误 - 由 : java. lang.NoClassDefFoundError : android. support.v4.util.SparseArrayCompat 引起

启动我的应用程序时出现以下日志错误:>05-2001:48:35.312:E/AndroidRuntime(23032):FATALEXCEPTION:main05-2001:48:35.312:E/AndroidRuntime(23032):java.lang.RuntimeException:UnabletostartactivityComponentInfo{com.tomsyweb.suna/com.tomsyweb.suna.MainActivity}:android.view.InflateException:BinaryXMLfileline#9:Errorinflati

android - 错误 : java. util.concurrent.ExecutionException : com. android.ide.common.process.ProcessException:

这是我的gradle控制台的输出请帮我解决这个错误,我无法构建我的项目Information:Gradletasks[:facebook:generateDebugSources,:facebook:mockableAndroidJar,:facebook:prepareDebugUnitTestDependencies,:facebook:generateDebugAndroidTestSources,:lagaiKhai:generateDebugSources,:lagaiKhai:mockableAndroidJar,:lagaiKhai:prepareDebugUnitTes

android - java.lang.NoClassDefFoundError : Failed resolution of: Landroid/support/v4/util/ArrayMap; 错误

今天我在尝试运行我的应用程序时发现了这个错误。我做了以下尝试来解决它。-首先我删除了multidex支持,但我仍然可以在那里看到apk的切片。-我还尝试重建整个项目,并根据java.lang.NoClassDefFoundError:Failedresolutionof:Landroid/support/v4/util/ArrayMap的建议将android支持和播放服务库更新到最新版本AndroidStudio-NoClassDefFoundError:FailedresolutionofLandroid/support/v4/print/PrintHelperjava.lang.N

android - "No tests found"用于 Lollipop 及更高版本的仪器测试

我基于仪器的(espresso)测试无法在Lollipop+设备和模拟器上运行。它们可以在任何其他平台上正确运行。我和这个线程中的人有相同的症状-https://groups.google.com/forum/?fromgroups#!topic/adt-dev/QW5SuzQizNk我的测试在src/androidTest/java/我已经设置了testInstrumentationRunner'android.support.test.runner.AndroidJUnitRunner'测试类是@RunWith(AndroidJUnit4.class)个别测试用@Test注解我可以

android - com.android.dx.util.DexException : Multiple dex files define

我使用antrelease并得到这个错误:[dx]UNEXPECTEDTOP-LEVELEXCEPTION:[dx]com.android.dx.util.DexException:MultipledexfilesdefineLcom/android/vending/billing/IMarketBillingService;[dx]atcom.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:580)[dx]atcom.android.dx.merge.DexMerger.getSortedTypes(DexMer

android - java.lang.SecurityException : Permission Denial: getIntentSender() when using UiAutomation in a test 错误

每当我尝试使用UiAutomation在通过getInstrumentation().getUiAutomation()进行的任何测试中,进程崩溃并出现以下异常:java.lang.SecurityException:PermissionDenial:getIntentSender()frompid=30334,uid=2000,(needuid=1000)isnotallowedtosendaspackageandroidatandroid.os.Parcel.readException(Parcel.java:1540)atandroid.os.Parcel.readExcepti

android - 测试运行失败 : Test run failed to complete. 预期 1 次测试,收到 0

我尝试为我的应用启动JUnit测试(robotium):publicclassMainTestextendsActivityInstrumentationTestCase2{privateSolosolo;publicMainTest(){super("nix.android.contact",MainActivity.class);//TODOAuto-generatedconstructorstub}protectedvoidsetUp()throwsException{super.setUp();solo=newSolo(getInstrumentation(),getActiv

android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info)

我刚刚将build.gradle编译SDK更新为27API。compileSdkVersion27buildToolsVersion'27.0.3'targetSdkVersion27但是一旦我点击同步按钮它就​​会抛出error:resourcestyle/TextAppearance.Compat.Notification.Info(aka{packageId}.test:style/TextAppearance.Compat.Notification.Info)notfound.error:resourcestyle/TextAppearance.Compat.Notificat

android - 在 Android Studio 项目上找不到参数的方法 test()

在我的Android应用程序中,我想在包中排除一些测试用例,以便我在build.gradle文件中使用test任务。例如:applyplugin:'com.android.library'test{exclude'**/calltest/Summary.class'}如果同步项目我得到以下异常:*Whatwentwrong:Aproblemoccurredevaluatingproject':SdkModule'.>Couldnotfindmethodtest()forarguments[build_4g3vf7b615x3x1p7i9ty0pt1l$_run_closure1@73d