我想做什么和遇到的问题
我将我的 Android Studio 和 Android Gradle 插件更新到 3.0.0,并将我的 Gradle Wrapper 更新到 4.2.1,并希望通过 IDE 在设备上构建和部署我的 Android Gradle 项目。
- 构建成功
当我尝试部署我的 :app 模块到连接的设备时,我收到错误:
Error:A problem occurred configuring project ':integration-test'. Variant 'debug' has no output with type 'INSTANT_RUN_MERGED_MANIFESTS'
项目详情(简体)
该项目包括:
- 一个:library模块
- :app 模块,它构建应用程序的 apk 并使用 :library 模块
- 一个 :integration-test 模块,它:
- 使用“com.android.test”插件
- 通过 targetProjectPath ':app' & targetVariant '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
问题
有没有人使用包含 com.android.test 插件的(集成-)测试模块(带有 AndroidManifest 文件)与 Android Gradle 插件 3.0.0?如果是这样,您能否提供一个示例,我可以使用它来修复我的设置?
最佳答案
转到 Android Studio > 首选项 > 即时运行 > 取消选中“启用即时运行...”
关于android - 变体调试没有类型为 INSTANT_RUN_MERGED_MANIFESTS 的输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46957873/