gpt4 book ai didi

android - CircleCI 2.0 : Error unmarshaling return header; nested exception is:

转载 作者:行者123 更新时间:2023-11-29 23:05:53 24 4
gpt4 key购买 nike

我已经创建了一些 Espresso UI 测试。测试在本地(模拟器和真实设备)运行良好。但是当我试图在 CircleCI 上运行 UI 测试时。我收到此错误日志

Task :app:compileFossDebugAndroidTestKotlin Compilation with Kotlin compile daemon was not successful java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:

编译后无法清除 jar 缓存,可能守护进程已经关闭:java.rmi.ConnectException: Connection refused to host: 127.0.0.1;嵌套异常是: java.net.ConnectException: 连接被拒绝 (Connection refused)无法连接到 kotlin 守护程序。使用回退策略。

选择 JAVA_TOOL_OPTIONS:-Xms512m

Task :app:compileFossDebugAndroidTestKotlin FAILED

失败:构建失败,出现异常。

  • 出了什么问题:任务“:app:compileFossDebugAndroidTestKotlin”执行失败。

有关错误日志的更多详细信息可用 here

这是我的带有 run-ui-tests 作业的 circleci 的 config.yml 文件

run-ui-tests:
docker:
- image: circleci/android@sha256:5cdc8626cc6f13efe5ed982cdcdb432b0472f8740fed8743a6461e025ad6cdfc
environment:
JVM_OPTS: -Xmx2048m
GRADLE_OPTS: -Xmx1536m -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.caching=true -Dorg.gradle.configureondemand=true -Dkotlin.compiler.execution.strategy=in-process -Dkotlin.incremental=false
steps:
- checkout
- run:
name: ANDROID_HOME
command: echo "sdk.dir="$ANDROID_HOME > local.properties
- run:
name: restore files from ENV
command: |
echo $ROCKET_JKS_BASE64 | base64 --decode > Rocket.jks
echo $ROCKET_PLAY_JSON | base64 --decode > app/rocket-chat.json
- run:
name: checkout Rocket.Chat.Kotlin.SDK
command: git clone https://github.com/RocketChat/Rocket.Chat.Kotlin.SDK.git ../Rocket.Chat.Kotlin.SDK
- restore_cache:
key: kotlin-sdk-{{ .Revision }}
- restore_cache:
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Accept licenses
command: yes | sdkmanager --licenses || true
- run:
name: Download Dependencies
command: ./gradlew androidDependencies
- save_cache:
paths:
- ~/.gradle
key: jars-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
- run:
name: Setup emulator
command: sdkmanager "system-images;android-22;default;armeabi-v7a" && echo "no" | avdmanager create avd -n test -k "system-images;android-22;default;armeabi-v7a"
- run:
name: Launch emulator
command: export LD_LIBRARY_PATH=${ANDROID_HOME}/emulator/lib64:${ANDROID_HOME}/emulator/lib64/qt/lib && emulator64-arm -avd test -noaudio -no-boot-anim -no-window -accel auto -verbose
background: true
- run:
name: Wait emulator
command: |
# wait for it to have booted
circle-android wait-for-boot
# unlock the emulator screen
sleep 30
adb shell input keyevent 82
- run:
name: Run EspressoTests
command: ./gradlew connectedAndroidTest
- store_artifacts:
path: app/build/reports
destination: reports
- store_test_results:
path: app/build/test-results

gradle.properties

android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

其他配置

compileSdk version           : 28
targetSdk version : 28
kotlin version : '1.3.31'

该项目有两种风格:foss 和 play和 2 种构建类型:调试和发布

我已经尝试了所有可能的解决方案,但没有一个有效。任何帮助将不胜感激。谢谢

最佳答案

更新 config.yml 中的这一行帮助我避免了这个错误

GRADLE_OPTS: -Xmx1536m -XX:+HeapDumpOnOutOfMemoryError -Dorg.gradle.caching=true -Dorg.gradle.configureondemand=true -Dkotlin.compiler.execution.strategy=in-process -Dkotlin.incremental=false

更多信息在这里:https://github.com/circleci/circleci-docs/issues/2945#issuecomment-471637158

关于android - CircleCI 2.0 : Error unmarshaling return header; nested exception is:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56568702/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com