android - 在如下所示的 gradle 中,我可以在发布应用程序之前从代码 testImplementation 'junit:junit:4.12' 中删除吗?

标签 android gradle publishing

在android studio中,我可以从代码中删除:

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-
core:3.0.1'

发布应用程序之前?

dependencies {
 testImplementation 'junit:junit:4.12'
 androidTestImplementation 'com.android.support.test:runner:1.0.1'
 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

}

最佳答案

是的,你可以移动它们 并且不要忘记删除

 defaultConfig {
    applicationId "com.example.networksecurity"
    minSdkVersion 24
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    //testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

和测试文件夹(..\app\src\test)(..\app\src\androidTest)

关于android - 在如下所示的 gradle 中,我可以在发布应用程序之前从代码 testImplementation 'junit:junit:4.12' 中删除吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48703113/

相关文章:

Android ListView setOnItemClickListener 不工作

Android Studio 使用JDBC 访问MYSQL

gradle - 同名类别字段的Gradle(Groovy?)语法

security - 限制站点核心发布

Winforms ClickOnce 发布因 app.config 转换而失败

android - 使用 ViewPager + 放大 ImageViews 的图片库

java.lang.IllegalStateException : Fragment

gradle - 在 Jetty 中使用 Websocket

android - 如何在使用不同风格的相同命名类时防止重复类错误?

c# - 窗口应用程序崩溃