I am trying to import common-math library to my Android Studio project. I placed the file commons-math3-3.6.1.jar file in libs folder and in the gradle file I have this line:
compile 'commons-math3-3.6.1.jar'
But I get this error: `
Error:(32, 0) Supplied String module notation 'commons-math3-3.6.1.jar' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.
Can anyone tell me what I have to do?
download the jar file, extract it locally. Open eclipse, project-property-java build path-libraries-add library, where you add the extracted folder there. then you can use the import org. apache.
Commons Math is a library of lightweight, self-contained mathematics and statistics components addressing the most common problems not available in the Java programming language or Commons Lang.
Is there a reason you need to use the jar file? You can get the file directly from Maven repository using something like this:
compile 'org.apache.commons:commons-math3:3.6.1'
Available on both JCenter and MavenCentral.
in Android view open Gradle Scripts - build.gradle and add this to dependencies:
implementation 'org.apache.commons:commons-math3:3.6.1'
You can also check their websites if newer version isn't available list of latest versions
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