Where is Android.mk supposed to be?

前端 未结 2 2170
忘掉有多难
忘掉有多难 2021-02-20 02:13

In the documentation for Android NDK, the following statement is present:

The Android.mk file resides in a subdirectory of your project\'s jni/ directory

2条回答
  •  故里飘歌
    2021-02-20 02:32

    I can answer at least some of your questions. You are right about the documentation being a little confusing. If you are using a single native module, indeed the Application.mk may seem redundant - but, there are a few things that can only be set by the Application.mk (you can look here: Application.mk). The Application.mk is meant for settings that apply for all modules, whereas the Android.mk is for specific module settings. Indeed, usually simple projects have a single Android.mk and it resides on the same folder as the Application.mk.

    You can define where to put them, it also depends how you build your code - for example, if you are using a task for building ndk using 'ndk-build' and commandLine command, you pass the folder path as an argument. Usually, according to my experience, they reside under the jni folder.

提交回复
热议问题