I'm having trouble when i add achartengine-1.1.0.jar in my project. When i add
compile file('libs.achartengine-1.1.0.jar')
in build.gradle, Gradle shows the following message :
Gradle: A problem occurred evaluating project ':NativeCharts'.
Cannot convert the provided notation to an object of type Dependency: /home/***/NativeChartsProject/NativeCharts/libs/achartengine-1.1.0.jar.
The following types/formats are supported:
- Instances of Dependency.
- Strings/CharSequences, e.g. 'org.gradle:gradle-core:1.0'.
- Maps, e.g. [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
- FileCollections, e.g. files('some.jar', 'someOther.jar').
- Projects, e.g. project(':some:project:path').
- ClassPathNotation, e.g. gradleApi().
Comprehensive documentation on dependency notations is available in DSL reference for DependencyHandler type.
Thanks in advance. Fab.
Using library projects helps you to structure your application code. To create a new library module in Android Studio, select File New Module and select Android Library .
The android default libraries like appcompact, design support libraries are stored in your folder where you have installed the SDK, precisely <SDK FOLDER>/extras/android/m2repository/com/android . The 3rd party libraries are stored in . gradle/caches/modules-2/files-2.1 folder.
To add a dependency on a library that is an annotation processor, you must add it to the annotation processor classpath using the annotationProcessor configuration. That's because using this configuration improves build performance by separating the compile classpath from the annotation processor classpath.
Android App Development for Beginners The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level.
The dependency should read compile files(...)
, not compile file(...)
. Also in the above you write the path as libs.achartengine-1.1.0.jar
, this should be libs/achartengine-1.1.0.jar
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With