How do I add a library project to Android Studio?

前端 未结 30 3885
梦谈多话
梦谈多话 2020-11-21 04:24

How do I add a library project (such as Sherlock ABS) to Android Studio?

(Not to the old ADT Eclipse-based bundle, but to the new Android Studio.)

30条回答
  •  情歌与酒
    2020-11-21 04:52

    Indeed as versions are changing, so is changing the user interface and options available on the menu. After reading most of the answers to these questions I had to guess what would work for Android Studio 1.1.0.

    1. With your mouse, select the project at the main level (this is where it shows the name of your app).

    2. Right click, and select the menu options New, Folder, Assets Folder.

    3. After creating the assets folder, paste or copy in it, whatever JAR file you need for your library.

    4. From Android Studio's main menu (top of the screen) select File -> Project Structure.

    5. Then select your project name and go to the Dependencies tab.

    6. Click on the plus sign (+) on the lower left of the dialog box and select file dependency.

    7. Finally open the recently created assets folder, select the JAR files that you copied, and then click apply and OK.

    Clean and rebuild your project.

提交回复
热议问题