How to import android source code(AOSP) into Android studio?

前端 未结 3 1254
生来不讨喜
生来不讨喜 2021-02-04 13:22

I know how to import android source code into eclipse , but is there any way to import android source code into android studio.because i want to change my ide from eclipse to an

3条回答
  •  借酒劲吻你
    2021-02-04 13:52

    I know this was already answered, but I wanted to add onto this for anyone else that sees this.

    For Android studio:

    1. Open terminal (*nix system) call the following:

      {AOSP root}/make idegen && development/tools/idegen/idegen.sh
      
    2. This will generate an android.ipr file in the {AOSP root} directory.

    3. In Android Studio, select 'Open project' and select the generated android.ipr file.
    4. Note: this will take a long time to index all the files (~2 hours). Be patient. If a dialog box that says 'Framework detected' appears, select that and hit 'OK'.

    Now you have the entire Android framework loaded into Android Studio.

提交回复
热议问题