我想做的事和问题
我将 Android Studio 和 Android Gradle 插件更新为 3.0.0,将 Gradle Wrapper 更新为 4.2.1,并希望通过 IDE 在设备上构建和部署我的 Android Gradle 项目。
项目详情(简体)
该项目包括:
- a :库模块
- an :应用程序模块它构建应用程序的 apk 并使用 :library 模块
- an :integration-test module which:
- 使用“com.android.test”插件
- 通过 targetProjectPath ':app' 和目标变体 'debug' 依赖于 :app 模块
- 并包含对 :app 函数的仪器测试
- 仅包含一个“main”文件夹(测试插件不支持其他)
设置.gradle
include :library
include :app
include :integration-test
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.domain.integration_test">
<!-- from https://stackoverflow.com/questions/45631959/how-to-place-android-instrumentation-test-files-outside-of-project-directory -->
<!-- Specify runner and target application package -->
<instrumentation
android:name="android.support.test.runner.AndroidJUnitRunner"
android:functionalTest="false"
android:handleProfiling="false"
android:label="Tests for com.domain.pro.client"
android:targetPackage="com.domain.pro.client"/>
<application>
<uses-library android:name="android.test.runner" />
</application>
上次它工作的是:
- 构建工具 2.2.3、Gradle 3.4.1 和 Android Studio 2.3.3
Question
有没有人得到一个(集成-)测试模块使用 com.android.test 插件包含(使用 AndroidManifest 文件)运行Android Gradle 插件 3.0.0?如果是这样,您能否提供一个示例以供我用来修复我的设置?
转到 Android Studio > 首选项 > 即时运行 > 取消选中“启用即时运行...”
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)