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
4
votes
0 answers

Running local unit test(Junit and Mockito) in AOSP

I created an application in android studio and written local unit test cases using Junit and Mockito. These local unit test cases are pure Java test cases so device not needed for execution. I run local unit test for my application in android…
Ranjith KP
  • 858
  • 6
  • 18
4
votes
2 answers

aidl file couldnt find import for class with Android.mk

I have a project that uses AIDL interfaces and everything is building just fine in android studio with gradle. however, im only using android studio for the convenience of an IDE for developing my android applications, i have to actually use Android…
Aaron Czajka
  • 147
  • 2
  • 10
4
votes
0 answers

AOSP local Unit Testing

I'm working on an AOSP based distribution. And I'm trying to implement Local Unit Tests (not Instrumented or CTS), just plain local Unit Tests, using frameworks like jUnit, Mockito, Powermock, Hamcrest and if necessary Robolectic. Currently, I'm…
4
votes
0 answers

How to write an Android.mk for a header-only library?

I'd like to use the import-module mechanism for all the libraries used by my apps, including a few that are header-only. Is there any way to do this, or am I limited to directly includeing .mk files which specify the include paths and explicitly…
Droid Coder
  • 381
  • 2
  • 10
4
votes
4 answers

Android.mk *** missing separator. Stop. The LOCAL_SRC_FILES for a prebuilt library should only contain one item

I cloned the following Telegram repo from Github: https://github.com/DrKLO/Telegram I am using a PC not Apple. I opened the project in Android Studio. I then linked the project with the C++ files, which are included in the repo. I did this with…
4
votes
1 answer

Adding Tesseract and Opencv to Android.mk (Android Studio)

I followed the instructions from here and added OpenCV successfully. But I've been trying to add tesseract to the Android.mk as well, for a few days now, and haven't been able to do it. I have an android.cpp that uses tesseract so I have to include…
Mauricio
  • 839
  • 2
  • 13
  • 26
4
votes
1 answer

Adding a compiler flag to only one file in Android.mk

I have an Android.mk file that has a number of files for which LOCAL_CFLAGS get applied to them. I would like to apply a different flag to only one of the files out of the many. How can this be accomplished? I searched the internet from the Android…
3
votes
1 answer

Error: SHARED_LIBRARIES missing STATIC_LIBRARIES Android.mk

I have an android application which also has c++ code dependencies. I want to build this application as system application by compiling with AOSP. In my android.mk, I have to first import a static library (abc.a) and then use it to build a shared…
Axaror
  • 39
  • 1
  • 3
3
votes
0 answers

AOSP print method call stack trace

I need to see a stack trace in AOSP C/C++ code. I have found some solutions but all of them not show properly function's names. 1. The solution from http://yongbingchen.github.io/blog/2013/05/09/dump-stack-in-android-native-c-code/ gives the…
3
votes
1 answer

Adding and using aar file with resources in AOSP build

I need to build an application with android.mk in aosp build tree. I have a custom .arr lib with some resources like drawables,strings..etc, Which resides in the following folder apps/libs/mylib.aar Anyone can tell me how to include the aar in the…
Ranjith KP
  • 858
  • 6
  • 18
3
votes
1 answer

Include .so in android.mk system app android

I have an APK that contains java code and some .so files. I have built the APK in Android Studio and now this APK needs to be part of /system/app/ folder on my custom ROM. Java code + .so = APK To include it in system/app/, I am having the below…
3
votes
1 answer

Android.mk to include prebuilt library

I'm struggling to get a module to compile on Android. It references an already existing shared library -- that I only have the .so and .h files. My current Android.mk looks like this: LOCAL_PATH:= $(call my-dir) EXEC_ARCH := armeabi-v7a …
Donato Azevedo
  • 1,378
  • 1
  • 13
  • 22
3
votes
1 answer

Can't import(import com.android.internal.statusbar) statements in android system application

Trying to remove notification bar from my system android application in AOSP. But can not able to import (import com.android.internal.statusbar and The import android.app.StatusBarManager) in my code. import…
user7989932
3
votes
3 answers

How to add extra permission to a prebuilt application (no source code) in AOSP

I have an application that doesn't have a specific android permission(for example android.permission.CHANGE_CONFIGURATION). I don't have its source code. I'm working on an AOSP. I prebuilt this application like: Put APK in…
Dr.jacky
  • 3,341
  • 6
  • 53
  • 91
3
votes
1 answer

In android ndk how to create multiple library(.so) at one build run

How to create a multiple .so file or library in a single ndk-build run For example i have posted my code: build.gradle: ndk { moduleName = [“native-lib”,”MyLibrary”] } sourceSets.main { jni.srcDirs = [] jniLibs.srcDir…
YLS
  • 1,475
  • 2
  • 15
  • 35
1
2
3
14 15