Jenkins Android builds failure with crashlytics

Every time I try to build using Jenkins, I get the following error

Failed to apply plugin [id 'io.fabric'] Failed to create a plugin like "CrashlyticsPlugin".

Removing Crashlytics from Gradle fixes this issue

+6
source share
4 answers

So I think I fixed it using a combination of this fooobar.com/questions/980332 / ... answer with @TarahWheelerVanVlack answer. I had to create two new folders

/ Users / Shared / Jenkins / Library / Users / Shared / Jenkins / Library / caches

And then make sure they have the appropriate permissions

+4
source

These are the final commands you need to execute:

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

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 
+5
source

I had this problem before and it was a permissions error. Try checking permissions and the user who owns the plugin directory. If this is not a Jenkins user (if you created one), then the problem.

+1
source

Create directory /Users/Shared/Jenkins/Home/Library/Caches

If you run ./gradlew clean --stacktrace from the /Users/Shared/Jenkins/Home/jobs/<job-name>/workspace , you will get the following stacktrace command

Called: java.lang.RuntimeException: Crashlytics data directory under> /Users/Shared/Jenkins/Home/Library/Caches/com.crashlytics could not be created. at com.crashlytics.tools.android.DeveloperTools. (DeveloperTools.java:116) ... 53 more

+1
source

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


All Articles