简体   繁体   中英

How to compile an aosp project in android studio?

I have been trying to compile the aosp project bootanimation (with its source code located at) in Android Stduio. It includes many .so libs that is included in /system/lib. But NDK doesn't provide access to these libraries. So how should I compile the project in AS with cMake? Or NDK-build is ok if cMake is not available.

Simple answer: You can't build pretty much any part of AOSP from Android Studio. You must use the command line as instructed by https://source.android.com/setup/build/building#build-the-code

If you want to build a single module try mm after you have built the whole thing. See Building a particular module in the android source code for more info.

If you want to use an IDE for editing code I recommend IntelliJ. There is an idegen.sh script in AOSP to help you set it up, but you will end up with an IntelliJ project so bloated that it will be nearly impossible to use, better to set it up as a pure java project with a JDK that has no libraries and add all the source locations by hand.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM