android-ndk | Installed android-ndk for speedy cloning | Android library
kandi X-RAY | android-ndk Summary
kandi X-RAY | android-ndk Summary
[Deprecated] Installed android-ndk for speedy cloning into Travis CI worker VM.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of android-ndk
android-ndk Key Features
android-ndk Examples and Code Snippets
Community Discussions
Trending Discussions on android-ndk
QUESTION
I tried to compile a .so library using Visual Studio 2019 along with OpenCV Android in order to use this library in Unity. There are some answers on how to configure Visual Studio to use OpenCV Android (here or here) but none of these work for me. Below you can see my configurations.
Visual Studio 2019 (running on Windows 10)
android-ndk-r21e // also tried with android-ndk-r15c android-ndk-r16b and android-ndk-r17c
OpenCV Android 4.5.2 // also tried with OpenCV Android 4.0.0, 4.0.1 and 4.1.0
My settings in Visual Studio 2019 look as follows:
Configuration Properties
- General
Platform Toolset Clang 5.0 (also tried Clang 3.8 or GCC 4.9)
Configuration Type Dynamic Library (.so)
Target API Level Nougat 7.0 (android-24) (also tried different versions)
Use STL LLVM libc++ static library (c++_static) (also tried "GNU STL static library (gnustl_static)")
C/C++
- General
Additional Include Directories "Path to OpenCV_4_5_2_Android\sdk\native\jni\include"
Code Generation Enable C++ Exceptions "Yes(-fexceptions)"
Language C++17(-std=c++1z)
Precompiled Headers Not using Precompiled Headers
Linker
- General
- Additional Library Directories Path to OpenCV_4_5_2_Android\sdk\native\libs\armeabi-v7a
- Input
- Additional Dependencies Path to OpenCV_4_5_2_Android\sdk\native\libs\armeabi-v7a\libopencv_java4.so
My Source.cpp I try to compile is just a single function for testing purposes
...ANSWER
Answered 2021-Jun-10 at 16:27I had the exact same issue as you (though I used c++ 11) with the exact same setup, and struggled for days. I believe the errors you're seeing (like me) are from arm_neon.h. Very oddly, I was able to just build (not run) the .so successfully, even with those errors (I say "errors" because if you look at arm_neon.h, others pop up), so try it. Maybe it's some kind of IntelliJ/Intellisense mistake more than anything else where it's catching false negatives from some other toolchain setup.
At the same time, I'm not 100% sure I was always able to build with that issue, so try these steps as well if you can't:
- use OpenCV 4.0.1 with Android NDK 16rb. The NDK matters when it comes to OpenCV builds, and this is the only supposed match that I know of.
- follow this tutorial from scratch: https://amin-ahmadi.com/2019/06/03/how-to-use-opencv-in-unity-for-android/
- if the downloaded OpenCV android SDK is still giving trouble, build OpenCV from the source using his other tutorial here: https://amin-ahmadi.com/2019/02/03/how-to-build-opencv-4-x-for-native-android-development/ and then repeat step 2.
MAJOR EDIT: OpenCV 4.5.2 needs to be treated differently because it no longer uses toolchains with gnu c++. -When you build OpenCV from CMake, build with Android NDK 21e, and do not use the toolchain in OpenCV 4.5.2. Use the one inside the Android NDK's build folder (android-ndk-r21e\build\cmake). -When you build your .so from Visual Studio 2019, do not use the GNU STL, use the LLVM. GNU c++ is no longer part of Android NDKs, and you need to cut it out of the process entirely. -In the Linker Input, put the names of your library files (or file, if it's just the world one) in the Library Dependencies field, not the Additional Dependencies field. -Everything else is the same as in those common tutorials.
QUESTION
Note: Although question is duplicate, but current answers lacks details, so I wanted to post another one.
I'm using C++Builder developed by Embarcadero.
For Windows, it compiles fine.
For Android, it shows the following error:
...ANSWER
Answered 2021-May-17 at 14:10my bet is that you need to use "Preprocessor directives" in your code and indicate platforms
QUESTION
I formatted my computer and have been trying to install Android Studio but have got many errors. When I tried to install SDKs', I got this error:
...ANSWER
Answered 2021-May-10 at 17:14Follow this tutorial to install Android Studio properly:
QUESTION
Performing ./gradlew assembleRelease
and hit the issue of this. Below shows the entire error log...
ANSWER
Answered 2021-Apr-17 at 07:08UNBELIEVABLE FIXED, seems to be a 63.x
issue? As there's another person having this issue after upgrading from 62.2
to 63.3
The fixed was done as suggested here
Solved this issue by deleting the .gradle folder from /android and again run npm run android, and it solved this error.
QUESTION
How can I cross compile from my MacOS to Android native binary.
I read this, that I've to do:
...ANSWER
Answered 2021-Apr-01 at 21:28Not sure if this is correct or no, I tried the below and it worked with me the way I want. In my mac:
QUESTION
I try to build the OpenCV 4.5.1 SDK for Android because I need the SDK with contrib modules and the official release [1] only has the standard modules. But the libraries I build are almost 10x larger, for example: libopencv_core.a ==> 47.6 MB self compiled, 5.3 MB from the official repository (both for arm64-v8a)
Here is my cmake command, followed by ninja for compilation.
...ANSWER
Answered 2021-Mar-23 at 12:28I found the culprit:
QUESTION
After hours of debugging, I have the following minimalist .proto file:
...ANSWER
Answered 2021-Mar-12 at 11:15After days on the issue, the problem was related to the include files.
Because I am doing a cross compilation for Android, I haven't done the "make install" step. That makes no sens to install the package on my dev machine. Thus, I just grab the .a files from the compilation folder and the include files from the sources.
Here was my mistake !
The include files that I have to put with the compiled libraries are only a subset of all the files found on the src/include folder... sounds obvious afterwards...
Thus I had to specify a temporary CMAKE_INSTALL_PREFIX and run make install. Then grab the include folder from that location.
Then everything works as expected.
QUESTION
I have a bazel-based c++ project that has uses protos with the proto_library
rule.
My .bazelrc has an android config that specifies an android config (following the example here) with
...ANSWER
Answered 2021-Mar-05 at 22:11I've resolved this problem. The issue here was not about host linkopts with protoc/protobuf, but with another library (gflags) that used -lpthread
unconditionally. Adding the same android config and select statement used by protobuf fixed this issue (PR). The red herring about using a non-existent -lnotareallibrary
was a linker error for protoc, not my target executable.
In case it's helpful to describe the debugging process, I searched the autogenerated bazel-myreponame/external
directory's BUILD
files and .bzl
files for -lpthread
. (At first, I only thought to search BUILD files, which missed this library)
QUESTION
i have create an application in kivy with python and i would like it to run it to my phone.i use virtual box because i have window and is need Linux to run buildozer every time i run buildozer android debug i am facing an error. please if you can help me to solve that issue it will be very helpful thank here is the error i am facing:
...ANSWER
Answered 2021-Feb-15 at 14:33Looks like you are missing libssl-dev
. Just open your terminal and run the command sudo apt install libssl-dev
. You might have missed the buildozer dependencies. So even after installing libssl-dev
you get error then try running the following command:
QUESTION
I'm trying to build an apk out of a simple kivy python file however I get this error when using the command "buildozer -v android debug" to build the apk.
I'm running on a Ubuntu virtual machine, java jdk is version 8 something, I was using version 14 earlier, but saw some post talking about needing version 8. Not entirely sure though if it was for the same problem that I'm facing.
...ANSWER
Answered 2021-Feb-13 at 11:05You were missing libffi-dev
earlier and now you are missing libssl-dev
. Looks like you might be missing other requirements for buildozer too. Follow the steps given in buildozer documentation
Open your terminal and run following commands:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install android-ndk
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page