Android Studio 3.0 最新版本运行报错: Task 'package' is ambiguous in root project 'MyRobot'. Candidates are: 'packageDebug', 'packageDebugAndroidTest', 'packag

简介: 09:52:22.876 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]09:52:22.

09:52:22.876 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:52:22.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
09:52:22.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:52:22.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
09:52:22.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Task 'package' is ambiguous in root project 'MyRobot'. Candidates are: 'packageDebug', 'packageDebugAndroidTest', 'packageRelease'.
09:52:22.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:52:22.877 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
09:52:22.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace.
09:52:22.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
09:52:22.878 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
09:52:22.879 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
09:52:22.879 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 1m 2s
09:52:22.914 [DEBUG] [org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices] [KOTLIN] Skipping kotlin cleanup since compiler wasn't called
09:52:22.944 [DEBUG] [org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices] [KOTLIN] Disposed KotlinGradleBuildServices
09:52:22.945 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)

$ gradle tasks

Task :tasks


All tasks runnable from root project

Android tasks

androidDependencies - Displays the Android dependencies of the project.
signingReport - Displays the signing info for each variant.
sourceSets - Prints out all the source sets defined in this project.

Build tasks

assemble - Assembles all variants of all applications and secondary packages.
assembleAndroidTest - Assembles all the Test applications.
assembleDebug - Assembles all Debug builds.
assembleRelease - Assembles all Release builds.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
clean - Deletes the build directory.
cleanBuildCache - Deletes the build cache directory.
compileDebugAndroidTestSources
compileDebugSources
compileDebugUnitTestSources
compileReleaseSources
compileReleaseUnitTestSources
mockableAndroidJar - Creates a version of android.jar that's suitable for unit tests.

Build Setup tasks

init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.

Help tasks

buildEnvironment - Displays all buildscript dependencies declared in root project 'MyRobot'.
components - Displays the components produced by root project 'MyRobot'. [incubating]
dependencies - Displays all dependencies declared in root project 'MyRobot'.
dependencyInsight - Displays the insight into a specific dependency in root project 'MyRobot'.
dependentComponents - Displays the dependent components of components in root project 'MyRobot'. [incubating]
help - Displays a help message.
model - Displays the configuration model of root project 'MyRobot'. [incubating]
projects - Displays the sub-projects of root project 'MyRobot'.
properties - Displays the properties of root project 'MyRobot'.
tasks - Displays the tasks runnable from root project 'MyRobot' (some of the displayed tasks may belong to subprojects).

Install tasks

installDebug - Installs the Debug build.
installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
uninstallAll - Uninstall all applications.
uninstallDebug - Uninstalls the Debug build.
uninstallDebugAndroidTest - Uninstalls the android (on device) tests for the Debug build.
uninstallRelease - Uninstalls the Release build.

Verification tasks

check - Runs all checks.
connectedAndroidTest - Installs and runs instrumentation tests for all flavors on connected devices.
connectedCheck - Runs all device checks on currently connected devices.
connectedDebugAndroidTest - Installs and runs the tests for debug on connected devices.
deviceAndroidTest - Installs and runs instrumentation tests using all Device Providers.
deviceCheck - Runs all device checks using Device Providers and Test Servers.
lint - Runs lint on all variants.
lintDebug - Runs lint on the Debug build.
lintRelease - Runs lint on the Release build.
lintVitalRelease - Runs lint on just the fatal issues in the release build.
test - Run unit tests for all variants.
testDebugUnitTest - Run unit tests for the debug build.
testReleaseUnitTest - Run unit tests for the release build.

To see all tasks and more detail, run gradle tasks --all

To see more detail about a task, run gradle help --task <task>

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed

相关文章
|
3月前
|
存储 算法 Android开发
AVB校验微观版本:android avb(Android Verified Boot)验证
AVB校验微观版本:android avb(Android Verified Boot)验证
213 0
|
10天前
|
Android开发 开发者
安卓投屏神器 Scrcpy安 报错ERROR: Could not find any ADB device
使用Scrcpy安卓投屏工具时遇到报错,问题根源是未开启开发者模式。解决步骤:进入设置,点击【关于手机】→连续点击版本号激活开发者模式,然后在【系统设置】→【开发者选项】中开启USB调试。参照此方法后可正常执行。Scrcpy软件下载链接和GitHub页面也已提供。
21 1
|
21天前
|
Java Android开发
Android Studio的使用导入第三方Jar包
Android Studio的使用导入第三方Jar包
10 1
|
29天前
|
运维 监控 Java
应用研发平台EMAS产品常见问题之安卓构建版本失败如何解决
应用研发平台EMAS(Enterprise Mobile Application Service)是阿里云提供的一个全栈移动应用开发平台,集成了应用开发、测试、部署、监控和运营服务;本合集旨在总结EMAS产品在应用开发和运维过程中的常见问题及解决方案,助力开发者和企业高效解决技术难题,加速移动应用的上线和稳定运行。
|
1月前
|
监控 安全 Android开发
安卓发展历程和主要版本的简要介绍
安卓发展历程和主要版本的简要介绍
31 1
|
2月前
|
数据库 Android开发 数据库管理
【Android】使用android studio查看内置数据库信息
【Android】使用android studio查看内置数据库信息
64 0
|
2月前
|
编译器 开发工具 Android开发
|
2月前
|
Android开发
【Android Studio】小游戏 | 实现两个小动物随手指移动
【Android Studio】小游戏 | 实现两个小动物随手指移动
|
2月前
|
Android开发 数据安全/隐私保护
【Android Studio】简单的QQ登录界面
【Android Studio】简单的QQ登录界面
|
3月前
|
IDE 开发工具 Android开发
Android Studio 下发布项目成APK文件
Android Studio 下发布项目成APK文件
117 1