Questions tagged [android.mk]

An Android.mk file is written to describe your sources to the build system.

Android.mk build file is written to describe your C and C++ source files to the Android NDK. You can read full file specification here.

211 questions
3
votes
1 answer

Android.mk - Include OpenCV directory for native C++ compliation with NDK

I'm importing a C++/OpenCV code to an Android app with NDK. First of all, I have to say that I don't have studies in programming, I'm just an amateur developer, so there're many things that I don't manage (specially, things out of coding). I use…
user3368457
3
votes
0 answers

Project dependencies in Android.mk

I want to build my app while flashing custom ROM on the device. I'm trying to find proper way to include project dependencies in the Android.mk. My dependencies look like this: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) …
mwo
  • 31
  • 2
3
votes
2 answers

Add .so library as part of packages/apps in AOSP Lollipop

I have been trying to include .so library as part of my app in AOSP. It can be done with Android.mk. Below is Android.mk of my application in pacakges/app directory : LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS :=…
user1885618
  • 91
  • 1
  • 2
  • 4
3
votes
2 answers

Android NDK - Android studio gradle undefined reference to __android_log_write

I am trying to debug a JNI C function by inserting log messages, but I can't get it to work. To start with I am just trying to modify the hello-jni example that comes with Android Studio. This is the modified code: #include #include…
ChrisA
  • 136
  • 1
  • 1
  • 7
3
votes
1 answer

Android.mk No rule to make target '*.c', needed by '*.o'. Stop

I have some problem. I use ndk-build but I can't make library *.so. --------------------------------- Error --------------------------------- nathaniel@Nathaniel-MSI /work/workspace/HealthCare $ ndk-build make: *** No rule to make target…
Nathaniel Jobs
  • 162
  • 1
  • 4
  • 16
3
votes
1 answer

Android NDK module that is dependant on another module

I have an android project written using the Android NDK. Within the project, I am using two prebuilt shared libraries(GpkgSDK and spatialite) and building two more shared libraries(WFSHelpers and com_example_gpkgviewer_jni_WKTConverter). The only…
3
votes
1 answer

Android.mk Unable to link with libcrypto

Case: I am building an app which uses libcrypto and libssl. I am trying to use prebuilt libcrypto.so and libssl.so and compile my application. But I keep getting undefined reference errors. My App/Android.mk LOCAL_PATH := $(call…
Martin75
  • 41
  • 3
2
votes
0 answers

AOSP: INSTALL_FAILED_OLDER_SDK

I'm facing the below error while installing the apk which is built on the Android-12 version of the AOSP repo and installing this apk on the Android-11 version of the System image error: C:\Users\test\Desktop\Radio_prio>adb install…
2
votes
1 answer

What are LOCAL_HEADER_LIBRARIES in Android.mk?

While generating a new library we can specify dependencies in Android.mk .For Example there are header dependencies which can be specified in LOCAL_C_INCLUDES, then there are library dependencies like LOCAL_STATIC_LIBRARIES and…
2
votes
2 answers

Issue while integrating car-ui-lib

i want to integrate car-ui-lib into my project. i manually create Android.mk in (src/main/jni) file from this google git After i build my project the android studio create cpp folder and add my Android.mk file there by using this piece of code in…
2
votes
1 answer

AOSP - error: undefined reference to during build

I need another person with good eyes to tell me what I am doing wrong here. I've had to upgrade the U-boot bootloader on my devices, and naturally I've had to make things fit again. But currently I can't get my AOSP system to build as it used to.…
Aaron Elliott
  • 73
  • 1
  • 8
2
votes
0 answers

In Android.mk, how to copy all the files in a directory recursively to out/vendor/ directory

I have a folder structure as following. sdk ├── 1.txt ├── 2.txt └── install ├── bin │   └── 3.txt └── lib └── 4.txt I want to copy all these files to vendor/etc/ using Android.mk. My sample Android.mk code: SDK_SRC_DIR =…
Srihari
  • 46
  • 6
2
votes
1 answer

How to get Code Coverage in AOSP Java and Robolectric with Android.mk

I'm writing an Application in AOSP. I need to make a unit test for this app. For this purpose I used robolectric. The app and the test is compiled with make (Android.mk). I need a code coverage report and don't know a way to get this. I only found…
For tez
  • 23
  • 3
2
votes
2 answers

Android - NDK The LOCAL_SRC_FILES for a prebuilt library should only contain one item

I use a c++ library on my app. The library generates an .a file in previous version. My Android.mk file is below: include $(CLEAR_VARS) LOCAL_MODULE := libmylib ifeq ($(TARGET_ARCH_ABI),x86) LOCAL_SRC_FILES := path-to/libmylib.a else …
zakjma
  • 2,030
  • 12
  • 40
  • 81
2
votes
0 answers

How to override defaults in Android.bp

For example,in Android 9.0.0_r30 source,there are two Android.bp files: art\build\Android.bp art\tools\hiddenapi\Android.bp in art\build\Android.bp,there is "art_defaults",under which there are cflags: "-msse4.2", …
jw_
  • 1,663
  • 18
  • 32
1 2
3
14 15