I'm trying to build an app that extends TrustAgentService, which isn't in the public SDK. I have an existing Android Studio gradle app that I need to enhance so.
I've downloaded the AOSP code (7.1.1 for Pixel, builds successfully), and created a Android Studio project using development/tools/idegen/idegen.sh, and following this guide
The AS project has a lot of unresolved symbols, and when I try to build it, it complains about
Error:Cannot compile Groovy files: no Groovy library is defined for module 'android' Error:Android Source Generator: [android] Android SDK is not specified
How, if possible, can I build the exisiting gradle app against the AOSP?
If this isn't possible, how can I overcome the errors when trying to import the AOSP to Android Studio (2.3.3)?