在我将android更新为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)时,我会得到以下错误:
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 :发布于 2019-07-14 19:30:01
显然,这可以通过将play-publisher插件的版本从1.1.5升级到2.1.1来解决,就像这里的GitHub问题: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
发布于 2020-05-10 17:22:41
首先,在repositories on build.gradle (Project)上添加一个新的回购
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}现在升级你的类路径。
classpath 'com.github.triplet.gradle:play-publisher:2.1.1'
https://stackoverflow.com/questions/57029252
复制相似问题