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

Getting errors with Android.bp when trying to build a static java library

I am looking for a way to build a static jar library from my below definition in Android.bp. I am using Android-12 OS. // Define the module type java_library_static { name: "com.example.foo.player", srcs: [ …
Shreyas R
  • 5
  • 2
0
votes
1 answer

Need to convert Android.mk file definition to Android.bp

I am an Android Firmware developer, working with a source of Android 12. I wanted to convert my Android.mk file to Android.bp, with the same definitions in tact in order to build a static jar library. Android.mk file: LOCAL_PATH := $(call my-dir) #…
0
votes
0 answers

Android NDK: WARNING:/Users/admin/projects/softphone/app/src/main/jni/Android.mk:silkcommon: LOCAL_LDLIBS is always ignored for static libraries

Trying to compile a modified version of SipDroid with Android Studio but I keep getting: Execution failed for task ':app:buildNdkBuildDebug[armeabi-v7a]'. > com.android.ide.common.process.ProcessException: Android NDK:…
Massihh
  • 29
  • 2
0
votes
1 answer

ServiceMode/Android.mk: Specifies both LOCAL_SDK_VERSION (system_current) and LOCAL_PRIVATE_PLATFORM_APIS (true) but should specify only one

I am an Android Firmware developer, working with a source of Android 12. I am facing an issue while I try to build a system application called ServiceMode. I am trying to build this application along with Android build and move it to system…
0
votes
1 answer

error: missing opencv_features2d (STATIC_LIBRARIES android-arm)"

I've created an application to read QR code using OpenCv. When I try to build it using NDK, everything works well NDK=/opt/android-ndk-r23c export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64 export TARGET=aarch64-linux-android export…
0
votes
0 answers

Add an external aar/jar as a shared library

I am having the following Android.mk file for my app which is using aar-release.aar include $(CLEAR_VARS) res_dir := res $(LOCAL_PATH)/res LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES += <...> LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/,…
zeitgeist
  • 852
  • 12
  • 19
0
votes
1 answer

android - simplify src path without hardcode

I would like to remove the hardcode file path from Android.mk. ifeq ($(TARGET_BUILD_VARIANT),user) LOCAL_SRC_FILES := ./app/build/outputs/apk/release/app-release.apk else LOCAL_SRC_FILES :=…
lucky1928
  • 8,708
  • 10
  • 43
  • 92
0
votes
0 answers

Android.mk - Adding external java libraries as maven repositories or prebuilt java libraries

I am trying to make my application compile within AOSP instead of using Gradle within Android Studio. I created an Android.mk file, however, since my application uses Eclipse Paho library, I do not know how to add it to the AOSP. Here is the…
mozcelikors
  • 2,582
  • 8
  • 43
  • 77
0
votes
1 answer

Android.mk add binary into /system/bin

I have a binary, with Android.mk as below. include $(CLEAR_VARS) LOCAL_MODULE := binary_test LOCAL_LDLIBS := libs LOCAL_CFLAGS := -O3 -UNDEBUG LOCAL_C_INCLUDES += tools/ LOCAL_SRC_FILES := main.c include $(BUILD_EXECUTABLE) And I want to add…
ltx
  • 45
  • 9
0
votes
1 answer

How to link libjingle_peerconnection_so.so to a project and call classes from it?

I try to build my jni class with a single line that tries to call webrtc audio processing. webrtc::AudioProcessing* apm = webrtc::AudioProcessingBuilder().Create(); I also try to link the libjingle_peerconnection_so.so to my project so that I could…
Artemy Kilin
  • 176
  • 15
0
votes
1 answer

Difference between system_current and current for the vairable LOCAL_SDK_VERSION in ANDROID.mk?

Our application should be built along with Android build and moved to the system partition. But we were using hidden api and so we added the variable LOCAL_PRIVATE_PLATFORM_APIS := true In the current Android 11, we removed all the hidden api from…
0
votes
1 answer

Is there a way to set default launcher app in AOSP without excluding other launchers

I'm aware of LOCAL_OVERRIDES_PACKAGES but I would like to set Launcher3 as my default launcher without overwriting another app I have installed. So I want the app to exist on the system but not be set as default and LOCAL_OVERRIDES_PACKAGES does not…
0
votes
0 answers

when I compile the Android.mk, it comes error couldn't find .so.toc

I want to use libcdrmclient_sw.so to make SHARED_LIBRARIES, and i'll use one func defined in libcdrmclient_sw.so like this int CDRMC_CheckPolicy(void* sessionHandle, char *destData, unsigned int *destDataLen); just another same declaration I modify…
etip
  • 1
0
votes
1 answer

How to make AOSP Module with Specified JDK Version?

As when I do complete compile ,some modules use jdk1.9 , some use jdk1.8(because the date 0 bug, it can not compile with jdk1.9). So how can I specify the special JDK when complete compile for some special modules? how to config the special jdk…
0
votes
1 answer

NoSuchMethodError : No virtual method noBackupDirectory : andriodx.work on Android.mk (AOSP App - Android 10)

Getting the following runtime crash when using androidx.work aar on Android.mk. I want to use Android Workmanager in Android 10 AOSP platform app. 11-13 12:47:10.805 6236 6236 E AndroidRuntime: java.lang.NoSuchMethodError: No virtual method…