Jenkins builds failure in Crashlytics tasks

I am new to Jenkins and Build Servers in general. I am working on setting up an Android project on Jenkins, and the application uses Crashlytics. Using Gradle, I set my tasks to a “clean build”, but anytime I get into the Crashlytics task, I get this error:

java.lang.Error: Classloader conflict in your Gradle environment, please verify you are running the latest Android plugin. 

and

 Crashlytics data directory at /Users/Shared/Jenkins/Library/Caches/com.crashlytics could not be created. 

I tried setting my Gradle tasks to "-x crashlyticsGenerateResourecesAlpha" (this task, which does not work) to skip the task, but this also does not work.

I checked that I installed the latest Android tools, emulators, etc. The Android plugins I just downloaded are the Android Emulator plugin and the Gradle plugin (both are the latest versions). I use Git to complete my project. I run the emulator before building the project. I point to the android-sdk folder in the Jenkins directory. I also configured JDK 1.7, and this points to the JDK directory in my local field (I am running Jenkins locally).

Here are the build versions that I got when running gradle -v :

 ------------------------------------------------------------ Gradle 1.11 ------------------------------------------------------------ Groovy: 1.8.6 Ant: Apache Ant(TM) version 1.9.2 compiled on July 8 2013 Ivy: 2.2.0 JVM: 1.7.0_55 (Oracle Corporation 24.55-b03) OS: Mac OS X 10.9.2 x86_64 

Is there anything else that can cause this error? Is there a plugin for Crashlytics that I don't know about? Also, if there are any Jenkins debugging tips that I may not suspect of, let me know and I will clarify the question with what I find.

+2
source share
2 answers

I had the same error because the directory /Users/Shared/Jenkins/Library does not exist. If you create this directory and /Users/Shared/Jenkins/Library/Caches , the crashlytics tasks should complete.

+10
source

These are the final commands you need to execute:

 sudo mkdir -p /Users/Shared/Jenkins/Library/Caches/com.crashlytics sudo chown jenkins:jenkins /Users/Shared/Jenkins/Library -R 

Here is the relational debug log for this case:

 13:33:45.133 [ERROR] [org.gradle.BuildExceptionReporter] at com.crashlytics.tools.gradle.CrashlyticsPlugin.<clinit>(CrashlyticsPlugin.groovy:13) 13:33:45.135 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:48) 13:33:45.136 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.plugins.DefaultPluginRegistry.loadPlugin(DefaultPluginRegistry.java:69) 13:33:45.136 [ERROR] [org.gradle.BuildExceptionReporter] ... 55 more 13:33:45.141 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.RuntimeException: Crashlytics data directory at /Users/Shared/Jenkins/Library/Caches/com.crashlytics could not be created. 13:33:45.142 [ERROR] [org.gradle.BuildExceptionReporter] at com.crashlytics.tools.android.DeveloperTools.<clinit>(DeveloperTools.java:116) 13:33:45.143 [ERROR] [org.gradle.BuildExceptionReporter] ... 60 more 13:33:45.143 [ERROR] [org.gradle.BuildExceptionReporter] 13:33:45.144 [LIFECYCLE] [org.gradle.BuildResultLogger] 13:33:45.145 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED 13:33:45.146 [LIFECYCLE] [org.gradle.BuildResultLogger] 13:33:45.147 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 8.362 secs 
+3
source

Source: https://habr.com/ru/post/980332/


All Articles