How to make OLLVM work with Android NDK r21? - android-ndk

I downloaded and compiled ollvm from https://github.com/obfuscator-llvm/obfuscator
however tutorials about config ollvm works in android NDK are base on early version of NDK which does not work in android NDK r21
How to config

I found an article which is using ndk-r20 .According to the article , (any NDK version is available).So it must work for r21 too .I didn't test it myself yet and also Its language is Chinese , you can translate it with google chrome .

Related

Android Studio native library build - NDK clang permission problem on Mac

Trying to build a native C library in Android Studio 4.0 on a Mac. But getting this pop-up when I do:
"clang" cannot be opened because the developer cannot be verified. macOS cannot verify that this app is free from malware.
Of note: I downloaded NDK r21 and point to it in Android Studio. Also, in the Android SDK setup, I have NDK (side-by-side) installed. I have to admit I am not clear what NDK is pointed to when one checks NDK (side-by-side)? That is why I downloaded NDK r21 and pointed to it in Android Studio. But now, this NDK clang permission problem...
thanks for any advice.
Best,
Steve
OK - I went to, in Android Studio, File -> Project Structure, and removed the PATH I had for the Android NDK Location box. And kept the NDK (side-by-side) box checked in the SDK Manager, SDK Tools tab section. Now not seeing the clang issue.

Android Studio C++ Support Missing

I just installed Android Studio 3.6.3 on Windows 10 and I created a new Native C++ project. I can build and run the native project and I can debug Java code in the project.
The problems I'm having are:
I can't step into the C++ code when debugging
I can't set breakpoints in *.cpp files.
When I right click folders in the project view to add a new file, I only see options to add Java, Kotlin, and Android platform files. There aren't any options to add C++ source or header files.
When I open a C++ file Android Studio recommends installing plugins supporting *.cpp. The plugin it's recommending is for Arma 3 plugin development.
The "Attach Debugger To Process" menu only has Java as a debugger option. That list should also contain Native, Dual, and Auto.
I've made sure to install CMake and NDK (Side By Side) in the SDK Manager and I've configured the NDK in the project settings. I've tried reinstalling Android Studio 3.6.3 and I've also downloaded Android Studio 4.0 RC 1, but I have the same problems.
What steps am I missing to get C++ support in Android Studio?
Managed to get it working. Turns out just running the uninstaller wasn't enough, I had to follow the steps in this answer to completely uninstall Android Studio. I then reinstalled and everything seems to be good.

Could not compile service support class

I have been having this error since for Android compilation .
My sdk url is oky, emulators are being detected but i cant generate any apk or run any android based app. Could
Your question is quite incomplete. Which LC version are you using, which Java JDK are you using, do you use Android Studio (just for the sdk) or do you have it installed via cdm? You need the Android sdk and Java Jdk.

Unsuccessful ndk build of my 2.6.7 Vuforia project in new Vuforia 3.0 SDK

I tried to run my ImageTargets 2.6.7 version in a new computer which runs new Vuforia SDK 3.0, android ndk 10 and all updated software according to Vuforia's Development Guide that I installed now, but I can't build successfully my C++ libraries, having the following error in Cygwin:
Android NDK: ERROR:jni/Android.mk:QCAR-prebuilt: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that jni/../../../build/lib/armeabi/libVuforia.so exists or that its path is correct
/cygdrive/c/Development/Android/android-ndk-r10c/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
I updated all system paths in Environment variables, I made all alterations according to this link (https://developer.vuforia.com/resources/dev-guide/migrating-your-android-sdk-project) in my project, but the problem still remains.
What can I do please?
Your response is really important for me
Looks like the path of the libVuforia.so file is not correct. To eliminate the doubt - use a full path to the file (not ../../../). That can be configured in your jni/Android.mk file.

Cannot remove NDK support from Android project

I am unable to remove NDK support from my Android project. I have gone through all the workspace and project settings, including CDT builder, C/C++ build paths, etc. I have cleaned my workspace and relaunched Eclipse. However, my project will not build as Eclipse complains about this error:
Program "/home/eazyigz/adt-bundle-linux-x86/android-ndk-r8c/ndk-build" not found in PATH
I really don't know what to do, as I don't even have ndk-r8c downloaded, and it's an outdated version of ndk anyway! I am on Ubuntu Linux.
Anybody knows?
Well, I reinstalled Eclipse. Then I deleted my project and re-imported it into the workspace. Now I don't get that error anymore. Problem solved.
If you have a C/C++ aspect to your code which references the Android NDK plugin for Eclipse, you need to have the NDK location set in the NDK plugin preferences:

Resources