Import or add a new project or project in Androidstudio v1.2.0 (import a third-party class library or project)

Source: Internet
Author: User

The following instructions are based on the Androidstdudio version v1.2

Because the Androidstudio project is changing in meaning with Worksapce in eclipse, it is not as it was when you imported a new package or created a new project.

Here's what I came up with to solve the problem. For reference.

1. After the project is created, copy the required third-party jar files to the App\libs directory in the project directory, as the Build.gradle file in version 1.2 has already been added to the dependent directory, so it is no longer necessary to change the file.

Dependencies {    ' libs ', include: [' *.jar '])    ' com.android.support:appcompat-v7:22.1.1 ' }

This actually has been added, but in the code to import the package when found not, you can restart to try. I'm filling in another project. It is possible to import the package without restarting.

2. Right click on the item select Open Module settings or press F4

Click the plus sign to add items or click the minus sign to delete items

The 4 above are additions to the new project, and the following are additions to the class library or import of third-party packages. Is it convenient?

This is a project that created a call to ANDROIDSDK.

---------------------

This is a project that created a pure java.

OK, now you can directly use the class library that is placed in the App\lib\ directory.

And, you see, why can't you use your own library of classes? Oh ~ ~ ~ this is to be manually added to rely on the line.

See the plus sign in the upper right corner?

Now look, is it going to work?

Import or add a new project or project in Androidstudio v1.2.0 (import a third-party class library or project)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.