Scanning folders for symlinks in /home/sino/Desktop/we-clone/node_modules (4ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0493Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE …Run Code Online (Sandbox Code Playgroud) 我在 Windows 7 机器上安装了 Jenkins 2.73.1,没有从站。构建 Android 应用程序设置只有一项工作。我将connectedCheckgradle 任务作为作业构建过程的一部分执行。
当我重新启动计算机并运行 Jenkins 作业时,我看到以下输出:
23:15:46 :app:connectedDebugAndroidTest
23:15:46 Starting 166 tests on Nexus_5X_API_26(AVD) - 8.0.0
23:15:48
23:15:48 (packages).(testclass) > testMethod[Nexus_5X_API_26(AVD) - 8.0.0] [31mFAILED [0m
23:15:48 java.lang.AssertionError
23:15:48 at org.junit.Assert.fail(Assert.java:86)
23:15:49 There were failing tests. See the report at: file:(path to app) /app/build/reports/androidTests/connected/index.html
Run Code Online (Sandbox Code Playgroud)
这完全是预料之中的——我有一个失败的测试来“测试”詹金斯!
然而,在“使用”同一台机器进行开发工作后,我经常遇到以下问题(它与 Jenkins 共享 - 我知道,并排开发和 Jenkins 是 100% 错误的,但这对我来说是真正了解 Jenkins) ,如果可能的话,不要让它 100% 安全,我完全理解答案可能是隔离 dev/jenkins,但现在也许还有其他解决方案?)。我运行模拟器、单元测试等,最终 Jenkins 抱怨道:
00:27:19 :app:connectedDebugAndroidTest FAILED
00:27:19
00:27:19 FAILURE: Build failed with an exception.
00:27:19 …Run Code Online (Sandbox Code Playgroud)