【发布时间】:2019-08-26 20:12:39
【问题描述】:
在 Android Studio (3.5) 中创建一个新的空活动项目并运行生成的检测测试时,我收到以下警告:
W/zygote: Found duplicate classes, falling back to extracting from APK : /data/app/com.example.myapplication.test-888XseHjUJwZJ8YXwEvomw==/base.apk
W/zygote: NOTE: This wastes RAM and hurts startup performance.
W/zygote: Found duplicated class when checking oat files: 'Ljunit/runner/BaseTestRunner;' in /data/app/com.example.myapplication.test-888XseHjUJwZJ8YXwEvomw==/base.apk and /system/framework/android.test.runner.jar
是什么原因造成的?可以避免吗?
【问题讨论】:
-
无论这些警告如何,您都能运行测试吗?我有同样的警告并且无法运行我的测试:
TestRunner: run started: 1 tests ... TestRunner: run finished: 0 tests, 0 failed, 0 ignored但是如果我克隆 github.com/wix/Detox/tree/master/examples/demo-react-native 我可以运行测试并且看不到这些警告。 -
要回答我自己的澄清问题,您确实可以运行测试而不管这些警告。我的问题是由于 DetoxTest.java 在 main 而不是它自己的“androidTest”文件夹中。
标签: android android-studio android-espresso android-testing