1

I am building a custom app in Android AOSP and added it under packages/apps/Car/MyApp

Currently, the only way that I know how to integrate it into the build process is to create a Makefile Android.mk. Since adding dependencies/3rd party libraries with that approach is very tedious I would prefer being able to do it via gradle.

Is there any known solution how to use gradle as the build system for the app and trigger it with the Android.mk so it is still included in the overall build?

phoebus
  • 1,280
  • 1
  • 16
  • 36
  • I too, am stuck on this Developing AOSP with Android Studio 3.1 Cannot build test apk for instrumented tests Ask https://stackoverflow.com/questions/50415724/developing-aosp-with-android-studio-3-1-cannot-build-test-apk-for-instrumented-t – likejudo Jun 15 '18 at 15:57

1 Answers1

2

You can build it with gradle, and write Android.mk for your built apk. For adding prebuilt apk as system/privilege app, you can visit the stackoverflow question How to include prebuilt APK into AOSP with platform privileges

utzcoz
  • 649
  • 4
  • 15
  • Agree, in addition, to be able to run system code with gradle, you can use java reflection. From my experience that what Google does when it build their apps and need API beyond what you get with 'gradle-android sdk' environment. – skoperst Feb 15 '18 at 16:22