Android Project build failed while using NDK over Jenkins - android-ndk

May someone help me to understand the root cause for build failure during Jenkins build of my application. The error seems coming from native C code which is integrated in our project from Android NDK.
Any help is appreciated.

Related

Gradle build error using react native

I get this error when trying to run an app on an android emulator(Android Studio) from a console window:
$ react-native run-android
Scanning folders for symlinks in C:\Users\Brian\desktop\codervets\arrive-alive\aa_app\node_modules (27726ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Starting a Gradle Daemon (subsequent builds will be faster)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
The SDK directory 'c:\Users\eelia001\AppData\local\android\sdk1' does not exist.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 4m 51s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
And yet my sdk directory in android studio has the following directory:
C:\Users\Brian\AppData\Local\Android\Sdk
Has anyone else ran into this issue? If so, how do I fix it?
The error states:
The SDK directory 'c:\Users\eelia001\AppData\local\android\sdk1' does not exist.
And you say your SDK is in:
C:\Users\Brian\AppData\Local\Android\Sdk
Since those aren't the same directory, my guess is that's the problem. Are you perhaps logged in as the wrong user? You're going to want to check that ANDROID_HOME is set correctly.
So I'm not sure why it was setup the way it was, but the way to fix it is to go to Advanced System Settings → Environment variables. Thank you to #Rich Churcher for the link to a proper tutorial (it's outdated but the steps worked).

Visual Studio Doesn't Create Xamarin Bin Folder

I'm trying to build an iPad project from Visual Studio 2017 for windows, However whenever I try to debug the app I get this error
Launch failed. The app 'B2C.iPad' could not be launched on 'iPad Air
iOS 11.0'. Error: error MT0069: The app directory
'/Users/user/Library/Caches/Xamarin/mtbs/builds/B2C.iPad/acb039527d504c900b2e6c86d8d84d09/bin/iPhoneSimulator/Debug/MobiBusiness.app'
does not exist. . Please check the logs for more details.
I noticed that visual studio doesn't create bin folder on the Mac machine although it indicates the build is succeeded.
I tried building the solution without debugging and looked at the log file nothing looked suspicious and there was no error.
does anyone know what might cause this error?
Okay this is embarrassing apparently the iPad project wasn't not selected in the build configuration, so needed to select the projects from build --> Configuration Manager

Error:This project does not use the Gradle build system, even though it was build in gradle system before

My project was build initally with bradle build system in android studio after I switching branches in git I got the following error.
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
When i try exetuting gradle task I get error :
Error:Android Source Generator: [project-name] AndroidManifest.xml file not found , Even though I have the file in proper place.
I have been trying to fix this from several days. I have tried re-importing the project, clone the project again. Any help is gladly welcome.
Thanks,

Error when deploying to build host from Visual Studio

I get the following error when trying to deploy my Xamarin iOS application from Visual Studio to the build host on my mac. It builds fine when i do a Build>Build Solution...
1>Remote build step failed.
1>Done building target "_BuildNativeApplication" in project MyProject.Touch.csproj" -- FAILED.
1>Done building project "MyProject.Touch.csproj" -- FAILED.
1>Build FAILED.
Any ideas on how to fix this? I have tried completely reinstalling Xamarin on the Mac to no avail.
Eventually got this solved.
An incorrectly named screen in my iPhone storyboard was causing the error.

Android Studio include maven artifact in APK (gradle)

I have an Android project that requires the Jsoup library. I've tried everything I can think of to get the jar shaded into the APK.. I just can't get it working. Logcat tells me:
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: org.jsoup.Jsoup
Does anyone know how to include/shade a maven artifact into an APK with Android Studio?
I have found the answer. The trick is to append ":sources". See an example here: http://www.alonsoruibal.com/my-gradle-tips-and-tricks/
I have seen the same type of error every time someone else adds a library with Gradle. Build is usually successful but app crashes when it tries to use the new library. Running task clean with Gradle helps.

Resources