1

我想将我的应用上传到 testfairy。这总是很好,但由于我已将我的 gradle 更新为 5.1.1 发行版,我收到以下错误:

org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-5.1.1-all.zip'.
    at org.gradle.tooling.internal.consumer.ResultHandlerAdapter.onFailure(ResultHandlerAdapter.java:59)
    at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:57)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    at org.gradle.tooling.internal.consumer.BlockingResultHandler.getResult(BlockingResultHandler.java:46)
    at org.gradle.tooling.internal.consumer.DefaultBuildLauncher.run(DefaultBuildLauncher.java:71)
    at com.testfairy.plugin.intellij.BuildAndSendToTestFairy.getTestFairyTasks(BuildAndSendToTestFairy.java:171)
    at com.testfairy.plugin.intellij.BuildAndSendToTestFairy.access$300(BuildAndSendToTestFairy.java:30)
    at com.testfairy.plugin.intellij.BuildAndSendToTestFairy$2.run(BuildAndSendToTestFairy.java:96)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.tooling.UnsupportedVersionException: Support for clients using a tooling API version older than 3.0 was removed in Gradle 5.0. You are currently using tooling API version 2.2. You should upgrade your tooling API client to version 3.0 or later.
    at org.gradle.tooling.internal.provider.DefaultConnection.unsupportedConnectionException(DefaultConnection.java:261)
    at org.gradle.tooling.internal.provider.DefaultConnection.checkUnsupportedTapiVersion(DefaultConnection.java:275)
    at org.gradle.tooling.internal.provider.DefaultConnection.validateAndConvert(DefaultConnection.java:253)
    at org.gradle.tooling.internal.provider.DefaultConnection.getModel(DefaultConnection.java:191)
    at org.gradle.tooling.internal.consumer.connection.CancellableModelBuilderBackedModelProducer.produceModel(CancellableModelBuilderBackedModelProducer.java:58)
    at org.gradle.tooling.internal.consumer.connection.AbstractConsumerConnection.run(AbstractConsumerConnection.java:56)
    at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:82)
    at org.gradle.tooling.internal.consumer.DefaultBuildLauncher$1.run(DefaultBuildLauncher.java:76)
    at org.gradle.tooling.internal.consumer.connection.LazyConsumerActionExecutor.run(LazyConsumerActionExecutor.java:83)
    at org.gradle.tooling.internal.consumer.connection.ProgressLoggingConsumerActionExecutor.run(ProgressLoggingConsumerActionExecutor.java:58)
    at org.gradle.tooling.internal.consumer.async.DefaultAsyncConsumerActionExecutor$1$1.run(DefaultAsyncConsumerActionExecutor.java:55)
    at org.gradle.internal.concurrent.DefaultExecutorFactory$StoppableExecutorImpl$1.run(DefaultExecutorFactory.java:64)
    ... 3 more

当我只启动 gradle 进程时,它可以正常工作,并且在我所有的测试手机上它也可以正常工作,那么问题是什么?

gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

app build.gradle testfairy 实现

buildscript {
   repositories {
       mavenCentral()
       maven { url 'https://www.testfairy.com/maven' }
   }
   dependencies {
       classpath 'com.testfairy.plugins.gradle:testfairy:2.+'
   }
}
apply plugin: 'testfairy'
android {
   testfairyConfig {
       apiKey 'xxxxxx'
   }
}
4

2 回答 2

2

UnsupportedVersionException:在 Gradle 5.0 中删除了对使用低于 3.0 的工具 API 版本的客户端的支持。您当前使用的是工具 API 版本 2.2。您应该将您的工具 API 客户端升级到 3.0 或更高版本。

Test-fairy 显然仍然使用工具 API 2.2 版......你可以提出问题

于 2019-04-23T18:13:49.640 回答
1

感谢@Sabina。我们正在努力尽快发布一个带有工具 API 版本 3.0 的新版本。

作为旁注——我注意到你把你的 API 密钥放在这里。它不是要共享的,我们已经撤销了这个密钥。请转到帐户设置 -> API 密钥 -> 并单击“重新生成”按钮。

一旦我们测试并发布了带有更新工具 API 的 Gradle,我将发表评论。

于 2019-04-24T07:49:43.823 回答