简体   繁体   中英

Add achartengine library to my android studio 1.1 project

Hi I'm trying to add the achartengine library to my project si i've downloaded the library zip file .... Please can someone tell me how can i proceed ?

PS : i'm using android studio 1.1

Simply add the file to /app/libs. The file build.gradle (app) should contain the following lines by default:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    ...
}

These lines are responsible for including all JAR files stored in the directory libs.

However, I experienced some issues with using multiple libraries. For solving them I added the following subsection to the section android in the previously mentioned Gradle file:

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}

For using achartengine with ProGuard I had to add the following lines to the file proguard-rules.pro:

-keep public class org.achartengine.. { *; }
-keep public class org.achartengine.** { *; }

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