'com.github.triplet.play'在配置任务':app:generateAppNameReleasePlayResources'时发现了一些问题

时间:2019-07-14 16:36:10

标签: android android-studio gradle android-gradle google-play-services

在我将android studio更新为3.4.2和gradle之后, 当我运行这条线

gradlew publishApkappNameRelease 

我收到此错误:

* What went wrong: Some problems were found with the configuration of task ':app:generateappNameReleasePlayResources'.
> File 'E:\Projects\packagename\app\src\main\play' specified for property '$1' does not exist.
> File 'E:\Projects\packagename\app\src\appName\play' specified for property '$2' does not exist.
> File 'E:\Projects\packagename\app\src\release\play' specified for property '$3' does not exist.
> File 'E:\Projects\packagename\app\src\appNameRelease\play' specified for property '$4' does not exist.

* Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2m 47s 56 actionable tasks: 55 executed, 1 from cache

注意:此行用于使用

自动发布apk
apply plugin: 'com.github.triplet.play'
classpath 'com.github.triplet.gradle:play-publisher:1.1.5'

我在运行此命令行gradlew --recompile-scripts时遇到错误

Unknown command-line option '--recompile-scripts'

这些命令在更新之前运行良好。

更新:

当我尝试将Triplet.play更新为任何T软管版本(2.2.1-2.2.0-2.1.1-2.1.0-2.0.0-2.0.0-rc2)时,出现此错误< / p>

Could not find com.github.triplet.gradle:play-publisher:2.2.1.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.pom
  - https://dl.google.com/dl/android/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.jar
  - https://jcenter.bintray.com/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.pom
  - https://jcenter.bintray.com/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.jar
  - https://repo.maven.apache.org/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.pom
  - https://repo.maven.apache.org/maven2/com/github/triplet/gradle/play-publisher/2.2.1/play-publisher-2.2.1.jar
Required by:
    project :

2 个答案:

答案 0 :(得分:0)

显然,这可以通过按照以下GitHub问题将播放发布者插件的版本从1.1.5升级到2.1.1来解决:https://github.com/Triple-T/gradle-play-publisher/issues/532

但是,似乎并非所有工件仓库都提供较新版本的插件。我在这里找到了执行该操作的明确步骤:https://plugins.gradle.org/plugin/com.github.triplet.play

最后,建议您再次检查其GitHub页面,以确保您当前拥有的配置仍然兼容:https://github.com/Triple-T/gradle-play-publisher

关于gradlew --recompile-scripts,自从大多数时候gradle守护程序运行并且忽略此选项以来,它已在新版本中弃用并删除。此处更多信息:https://github.com/gradle/gradle/issues/1425

答案 1 :(得分:0)

首先,在repositories的{​​{1}}上添加一个新的仓库

build.gradle (Project)

现在,升级您的类路径。
repositories { maven { url 'https://plugins.gradle.org/m2/' } }