
buildscript { repositorIEs { jcenter() mavenCentral() } dependencIEs { classpath 'com.androID.tools.build:gradle:1.1.0' }}allprojects { repositorIEs { jcenter() }}apply plugin: 'com.androID.application'androID { compileSdkVersion 21 buildToolsversion "21.1.2" compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { applicationID "com.xxx" minSdkVersion 10 targetSdkVersion 21 versionCode 200 versionname "2.0" testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner" } signingConfigs { deBUG { ... } release { ... } } buildTypes { release { ... } deBUG { ... } }}dependencIEs { compile filetree(dir: 'libs',include: ['*.jar']) compile 'com.androID.support:appcompat-v7:21.0.3' // ---- Tests with robolectric testCompile 'com.Google.guava:guava:14.0.1' testCompile 'junit:junit:4.+' testCompile 'org.robolectric:robolectric:2.4' testCompile 'org.mockito:mockito-all:2.0.2-beta' // ---- Tests with Espresso androIDTestCompile ('com.androID.support.test.espresso:espresso-core:2.0') { exclude module: 'hamcrest-core' } androIDTestCompile 'org.hamcrest:hamcrest-core:1.1' androIDTestCompile 'org.hamcrest:hamcrest-integration:1.1' androIDTestCompile 'org.hamcrest:hamcrest-library:1.1' androIDTestCompile ('com.androID.support.test:testing-support-lib:0.1') { exclude module: 'hamcrest-core' } androIDTestCompile 'com.androID.support.test.espresso:espresso-contrib:2.0' androIDTestCompile('junit:junit-dep:4.10') { exclude module: 'hamcrest-core' }} 在那之前,我曾经使用com.github.jcandksolutions.gradle:androID-unit-test:2.1.1在jvm中运行我的robolectric测试.
谷歌说他们的新构建工具:“新的源文件夹被识别为单元测试:src / test / java,src / testDeBUG / java,src / testMyFlavor / java等”.
但是如下所示,我的测试文件夹无法识别为源文件夹.它与com.github.jcandksolutions.gradle:androID-unit-test:2.1.1一起使用,但不再使用新的构建工具:
我在这里缺少什么?谢谢
解决方法 我找到了解决方案,即在IDE左下角的Test Artifacts之间切换.在这个屏幕上只有“AndroID Instrumentation Tests”可用,因为我降级了我的androID工具,但是使用工具1.1.0你应该看到不同类型的测试让IDE将它们识别为源文件夹. 总结以上是内存溢出为你收集整理的Android构建工具1.1.0,单元测试文件夹?全部内容,希望文章能够帮你解决Android构建工具1.1.0,单元测试文件夹?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)