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
42
votes
1 answer

The difference between .mk file and Makefile

I've just begun to study Porting Android. And I come across a new type of file which is .mk file. It's is an extension of Makefile but I don't know what it is different from a Makefile ? So, can somebody help you clarify them. Thanks very much !
hugtech
  • 877
  • 3
  • 11
  • 16
13
votes
2 answers

Android Data Binding in Make file (Android.mk)

As per a lot of examples, android data bindings are enabled by putting the following snippet in build.gradle file: android { .... dataBinding { enabled = true } } However, I'm working on an android project in AOSP which builds…
waqaslam
  • 67,549
  • 16
  • 165
  • 178
11
votes
3 answers

aar support in Android.mk

I am doing android custom ROM development now. the build system of aosp is based on Android.mk, But I want to include some aar libraries, is it possible to include aar libaries in Android.mk ?
Juude
  • 1,207
  • 2
  • 13
  • 22
8
votes
2 answers

How is TARGET_ARCH_ABI set in Android.mk

I am trying to build my native application using ndk-build. Suppose I followed this guide to create my Android project: https://rathodpratik.wordpress.com/2013/03/24/build-cc-executables-for-android-using-ndk/ When I try to print out my…
shaveenk
  • 1,983
  • 7
  • 25
  • 37
7
votes
1 answer

how can I use annotationProcessor in android.mk

I just want to use bufferknife and drag2 in my system app, I have built my app with the command mm. I have tried every possible method I could find, but failed! I've only found the below Android.mk by Googling: # Copyright (C) 2015 The Android Open…
feng
  • 71
  • 3
7
votes
2 answers

android.mk LOCAL_MODULE_FILENAME should not contain extensions

i am trying to build some of the files from libavcodec and libavutil Following this, i created Android.mk file as below : jni/Android.mk contains LOCAL_PATH := $(call my-dir) FFMPEG_TOP := $(LOCAL_PATH) include $(CLEAR_VARS) include…
nmxprime
  • 1,506
  • 3
  • 25
  • 52
6
votes
0 answers

Trying to run ButterKnife in AOSP, returning NullPointerException

Trying to test the application with butterknife 8.4.0 and some sample text and I keep getting a NullPointerException The actual code itself is fine but I believe Android.mk might be the issue. So here are the portions of that makefile that are under…
6
votes
0 answers

Convert gradle file to MK file( build.gradle to Android.mk )

I used the below gradle to build my sample application. build.gradle apply plugin: 'com.android.application' android { defaultConfig { resConfigs "en","ja" } buildTypes { release { shrinkResources true …
Ranjith KP
  • 858
  • 6
  • 18
6
votes
2 answers

Cannot find module with tag in import path (Android NDK)

I am getting so frustrated with this issue. I keep getting it and I cannot figure out why. Here is my Android.mk in src/jni LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := tutorial01 LOCAL_SRC_FILES :=…
MoMo
  • 186
  • 1
  • 3
  • 15
6
votes
2 answers

java.lang.IllegalArgumentException: Unable to load native library

I'm using purely native NDK in my project (Native Activity). It works fine when I add Prebuilt static libraries with my .so in Android.mk file. But when I try linking Prebuilt shared library, it shows the below exception: 03-27 16:42:09.982:…
Karthik Sivam
  • 2,505
  • 3
  • 18
  • 24
6
votes
1 answer

Cmake Vs. Android.mk

I feel like CMake and Android.mk have a lot in common, can someone please explain to me what are the differences and why did Google invented a new build system and didn't use CMake ?
0x90
  • 39,472
  • 36
  • 165
  • 245
5
votes
1 answer

Adding a custom etc file to aosp build

I have a set of custom etc files including text files, binary data files that I want to see populated into aosp's system/etc folder. I saw the previous question Add custom.xml file to AOSP etc folder which is similar but isn't what I want to do. I…
Jaya Kumar
  • 51
  • 3
5
votes
1 answer

Building c++ projects which have cmake build files for Android using NDK

I have to build 2 separate C++ projects which have Cmake build files setup for different platforms. I want to build them both for Android using NDK so that I can use them as prebuilt libs in Android Studio. How do I build them for Android using NDK…
Chris R
  • 63
  • 1
  • 5
5
votes
4 answers

How to include constraint layout library in an AOSP project

I have an existing android application that I'd like to build inside AOSP (android source tree) using Android.mk. The app uses constraint layout which is not included in AOSP source tree (AFAIK). How can I satisfy this dependency? Other support…
4
votes
2 answers

How to use external jar like jsoup library in android framework [AOSP] java files (NOT Android Studio or Java IDE)

I wish to use jsoup library in Android Open Source Project. For this I did two things:- Step 1: Made a directory jsoup in common as follows: [android]prebuilts/misc/common/jsoup/ In this jsoup folder I added jsoup-1.13.1.jar downloaded from :…
Aditya Gupta
  • 63
  • 1
  • 6
1
2 3
14 15