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

How to get the -fpermissive flag to take effect?

I'm building a library in c++ with the NDK (Android). The output tells me that some code is flagged as an error but could be suppressed by using the -fpermissive flag. At least that's how it looks to me. The output is: MyClass.cpp:412:1: error:…
Alyoshak
  • 2,696
  • 10
  • 43
  • 70
2
votes
1 answer

Try to set SDL with OpenGL context on Android. Get error message "Failed loading eglChooseConfig"

I am trying to run my first SDL hello-world project on android. I use the android project template provided in SDL source package, it use a class called SDLActivity to communicate with android and native c/c++ code. I import them into Eclipse…
Shan-Hung Hsu
  • 127
  • 2
  • 14
2
votes
1 answer

Building executable for android

I am trying to build a hello world executable for android. My test.c: #include #include int main() { printf("Hello World\n"); return 0; } My Android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) # give…
Raghuram Vadapalli
  • 1,190
  • 2
  • 13
  • 27
2
votes
1 answer

Error in compiling cocos2d-x project for android when using json

I'am using cocos2d-x version 3.3rc In some of my class I #include "cocos2d/external/json/writer.h" when I want to compile my project to make android apk, by running build_native.py script, it shows the following error to me: fatal error:…
mostafa88
  • 532
  • 1
  • 8
  • 20
2
votes
1 answer

libpcap static linking errors (undefined reference to pcap APIs) in Android NDK-build

I am trying to run the packetspammer application on an Android nexus-7 wifi only tablet (code name: grouper). I downloaded the libpcap library and was able to generate the static library (libpcap.a). However, when I try to build the packetspammer…
Sarvavyapi
  • 810
  • 3
  • 23
  • 35
2
votes
1 answer

Importing Static library in to Android Project

I have a static library(libnative.a) which I have generated for arm architecture. Now I want to use the library in my android application using NDK. My Android.mk has LOCAL_STATIC_LIBRARIES := libnative i was also trying to load the library in…
Kishore
  • 952
  • 2
  • 11
  • 31
2
votes
2 answers

How to filter with wildcard in Android.mk

I am trying to tweak one Android.mk module for a specific usage so it could be built only for a specific TARGET_PRODUCT. So, I inserter something like this: ifneq ( ,$(filter product_name,$(TARGET_PRODUCT))) ... endif # TARGET_PRODUCT Problem is,…
miller
  • 1,636
  • 3
  • 26
  • 55
2
votes
2 answers

Android NDK - Additional Include Directories

I am using the Android NDK to build a shared library. I have include a snippet from my Android.mk file that is causing me a few issues. LOCAL_PATH := $(call my-dir) ..#other module here ..#other module here include $(CLEAR_VARS) LOCAL_MODULE :=…
kushaldsouza
  • 710
  • 5
  • 12
  • 36
2
votes
1 answer

Using $(warning) inside Android.mk shows a false error in Eclipse. How can I fix this?

I'm working on an Android project, using the Eclipse ADT environment provided by Google. This project has a somewhat complex Android.mk file, that can be easily misconfigured. In order to ensure correct build flow and output warning and diagnostic…
user1222021
2
votes
1 answer

NDK and libiconv

I'm trying to build libiconv through the ndk. I'd never used make files before so I'm learning as I go and used this suggestion as a starting point: https://groups.google.com/forum/#!msg/android-ndk/AS1nkxnk6m4/EQm09hD1tigJ This is my…
Anthony
  • 7,638
  • 3
  • 38
  • 71
1
vote
1 answer

Why build.gradle which uses Android.mk to build native files compiles them on every build?

I am maintaining a legacy Android project which uses Android.mk build file instead of CMake. Previously the native compilation was done from command line batch files. I changed the build system to use build.gradle. For some strange reason when I…
Scam
  • 552
  • 5
  • 21
1
vote
1 answer

Do we need Jack to use Java 8 features to make a build using Android.mk?

I have an Android.mk file and I was trying to make a build for Android 8.1 where I was using RxJava but while building it, I was getting the error Lambda coming from jar file need their interfaces on the classpath to be compiled so, I searched a…
NiJ
  • 23
  • 6
1
vote
1 answer

How to shrink resources and remove unused language resources with Android.mk

I am working on AOSP Settings application which builds properly. I am trying to build "user build" and have enabled proguard using proguard.flags and disabled jack compilation ANDROID_COMPILE_WITH_JACK := false LOCAL_PROGUARD_FLAG_FILES :=…
Rinav
  • 2,527
  • 8
  • 33
  • 55
1
vote
2 answers

How to import a .so Library in Android.mk when i build APK

I have this problem: I have to build my app using the Android.mk file and I have to insert the library "libcom_google_ase_Exec.so" inside the final apk, but I can't do it. What I get is an APK that doesn't contain the library and therefore the app…
Remper1997
  • 11
  • 2
1
vote
1 answer

prebuil apks not getting added in aosp build

I am trying to add a prebuilt apk to aosp source but the apk is not geting added. Android.mk details is like LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_UNINSTALLABLE_MODULE := true LOCAL_MODULE_PATH :=…