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

'com.github.triplet.play' Some problems were found with the configuration of task ':app:generateAppNameReleasePlayResources'

在我将 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 '' does not exist.
> File 'E:\Projects\packagename\app\src\appName\play' specified for property '' does not exist.
> File 'E:\Projects\packagename\app\src\release\play' specified for property '' does not exist.
> File 'E:\Projects\packagename\app\src\appNameRelease\play' specified for property '' 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) 我收到此错误

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 :

显然,根据此处的 GitHub 问题,可以通过将 play-publisher 插件的版本从 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

首先,在 build.gradle (Project)

上向您的 repositories 添加一个新的存储库
repositories {
            maven { url 'https://plugins.gradle.org/m2/' }
        }

现在,升级您的类路径。
classpath 'com.github.triplet.gradle:play-publisher:2.1.1'