One, import source code 1, first in the root directory execution: source BUILD/ENVSETUP.SH2, and then execute: MMM development/tools/idegen/ //This line of command means to compile Idegen this project, Generate Idegen.jar file 3, sh./development/tools/idegen/idegen.sh// This line of command means to generate the corresponding file: Android.iws, ANDROID.IPR, Android.iml 4, after generating the corresponding file, open Android Studio, choose to open an existing Android studio project, select the root directory of Android source code, import can (work is the Android.irp file). After configuring the SDK version you can view the Android source II, configure the import file, remove unnecessary files, speed up the import speed, at the bottom of the android.iml file to add. <excludefolder url= "file://$MODULE _dir$/.repo" /> <excludefolder url= "file://$MODULE _dir$/abi" /> <excludefolder url= "file://$MODULE _dir$/art" /> <excludefolder url= "file://$MODULE _dir$/bionic" /> <excludefolder url= "file://$MODULE _dir$/bootable" /> < Excludefolder url= "file://$MODULE _dir$/build" &nbsP;/> <excludefolder url= "file://$MODULE _dir$/cts" /> <excludefolder url= "file://$MODULE _dir$/dalvik" /> <excludefolder url= "file://$MODULE _dir$/developers" /> <excludefolder url= "file://$MODULE _dir$/development" /> <excludefolder url= "file://$MODULE _dir$/device" /> <excludefolder url= "file://$MODULE _dir$/docs" /> <excludefolder url= "file://$MODULE _dir$/external" /> <excludefolder url= "file://$MODULE _dir$/external/bluetooth" /> <excludefolder url= "file://$MODULE _dir$/external/chromium" /> <excludEfolder url= "file://$MODULE _dir$/external/emma" /> < Excludefolder url= "file://$MODULE _dir$/external/icu4c" /> < Excludefolder url= "file://$MODULE _dir$/external/jdiff" /> < Excludefolder url= "file://$MODULE _dir$/external/webkit" /> <excludefolder url= "file://$MODULE _dir$/frameworks/base/docs" /> <excludefolder url= "file://$MODULE _dir$/hardware" /> <excludefolder url= "file://$MODULE _dir$/libcore" /> < Excludefolder url= "file://$MODULE _dir$/libnativehelper" /> <excludefolder url= "file://$MODULE _dir$/ndk" /> < Excludefolder url= "file://$MOdule_dir$/out " /> <excludefolder url=" file://$MODULE _dir$/ Out/eclipse " /> <excludefolder url=" file://$MODULE _dir$/out /host " /> <excludefolder url=" file://$MODULE _dir$/out/ Target/common/docs " /> <excludefolder url=" file://$MODULE _ Dir$/out/target/common/obj/java_libraries/android_stubs_current_intermediates " /> <excludefolder url= "file://$MODULE _dir$/out/target/product" /> <excludefolder url= "file://$MODULE _dir$/packages" /> <excludefolder url= "file://$MODULE _DIR$/PDK" /> <excludefolder url= "file://$MODULE _dir$/prebuilt" /> <excludefolder&nbSp;url= "file://$MODULE _dir$/prebuilts" /> <excludeFolder Url= "file://$MODULE _dir$/sdk" /> <excludefolder url= "file:/ /$MODULE _dir$/system " /> <excludefolder url=" file://$MODULE _dir$/tools " />
Android Studio Import system source and configuration