Skip to main content

Setting up Jenkins job for an Android build

This post is a side note for anyone trying to setup a Jenkins job to build an Android application.

Error because google-services.json is not found

google-services.json is used to access Google services, APIs etc. and is probably the most used file in almost all applications. However this is automatically ignored if you use gitignore and it won't be available in the build machine where Jenkins is run. The solution is obviously to un-ignore this file, push and try again.

Cannot run nohup.exe error

This was solved by adding git command to Windows env path.

Merge debug resources failed error

The full error is as follows:
java.util.concurrent.ExecutionException:com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details :app:mergeDebugResources FAILED

This can be solved by setting the GRADLE_USER_HOME Global properties in Jenkins > Manage jenkins > Configure System

JDK error

Kotlin could not find the required JDK tools in the Java installation
This can be solved by setting the JAVA_HOME global variable.
And there you have it, some errors I encountered when setting up Jenkins for an Android app build. Hope it can help others facing the same problems too.

Comments

Popular posts from this blog

Installing a custom ROM on Android (on the GT-N8013)

It's been a while since my last entry and since it is a new start in 2019, I thought I'd write something about "gone with the old and in with the new". I've had my Samsung Galaxy Note 10.1 (pnotewifi) since 2014, and it's one of the early Galaxy Note tablet series. It has served me well all this years but now it just sits there collecting dust. My old Samsung GT-N8013 I've known a long time about custom Android ROMs like CyanogenMod but has never had the motivation to try them out, until now ! Overview of the process For beginners like me, I didn't have an understanding of the installation process and so it looked complicated and it was one of the reasons I was put off in trying the custom ROM. I just want to say, it's not complicated at all!   Basically you will need to Prepare an SD card and install Android SDK (you need adb ). Install a custom boot loader ( TWRP is the de facto tool at the moment). Use adb to copy custom...

Building a native plugin for the Asus Xtion2 for Unity

During one of the projects in my company I needed to build a native plugin to let Unity communicate with the Asus Xtion2, specifically to get its depth data. We used to be able to do this pretty easily with the Kinect but since Microsoft discontinued it, we need to start looking for alternatives. Test Environment Windows 10 64 bit. Unity 2017.2.0f3 x64. Important! Choose x64 or x86 to match your Unity installation. OpenNI For Xtion2 SDK. The official SDK is somewhat different from the OpenNI SDK provided by Asus but it should behave the same. The one provided by Asus can be downloaded here . Make sure you choose the latest one. CMake 3.0 or higher Who is it for Someone who has been using Unity for some time and is comfortable with the concept of classes and objects. It will be very helpful if you know C++ and pointers too. Steps Since the code is provided, I will only go over the major steps. Let me know in the comments if I miss anything. Build and install OpenNI...

Pitfalls during Training and Object Detection with TensorFlow for Absolute Beginners

This article is based on the great tutorial here on how to train and detect custom objects with Tensorflow. I also referred to the official documentations here and  here  for running Tensorflow model building locally. It was my first custom detection project and I faced some hiccups along the way and this article is to log and share my finding so it can help other beginners like me. In the end, I managed to train a tensorflow model to detect Batsumaru , a character from Sanrio. This is how the detection will look like. The tools Windows 10 Pro 64 Tensorflow originally 1.7.1 and upgraded to 1.12.0. I will share the reason later. Python 3.5.4 LabelImg for image labeling PyCharm IDE Steps and Pitfalls Some of the mistakes I made and other discoveries when following the guide. I will not repeat the steps mentioned in the original guide, but only the parts where I had to deviate from the walkthrough and found out things by myself. The training and...