I have created Jar from the my NEM Java Project. I am getting IllegalAccessException for some gradle dependencies I have used with my Java project.
This the Error:
Error:java.lang.IllegalAccessException: no such method: org.nem.core.connect.HttpMethodClient.lambda$post$0(HttpPostRequest,URI)HttpRequestBase/invokeStatic Error:java.lang.NoClassDefFoundError: org/apache/http/concurrent/FutureCallback
This is gradle build for building nem.core Jar.
apply plugin: 'java'
apply plugin: 'maven'
group = 'org.nem.core'
version = '0.6.93-BETA'
description = """NEM Core"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
maven { url "http://repo.maven.apache.org/maven2" }
}
dependencies {
compile group: 'com.googlecode.javaewah', name: 'JavaEWAH', version:'1.0.0'
compile group: 'net.minidev', name: 'json-smart', version:'1.2'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version:'1.58'
compile group: 'commons-codec', name: 'commons-codec', version:'1.9'
compile group: 'commons-io', name: 'commons-io', version:'2.4'
compile group: 'org.apache.commons', name: 'commons-math3', version:'3.2'
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version:'4.1.1'
compile 'com.google.code.gson:gson:2.8.2'
testCompile group: 'junit', name: 'junit', version:'4.11'
testCompile group: 'org.mockito', name: 'mockito-all', version:'1.9.5'
testCompile group: 'com.googlecode.matrix-toolkits-java', name: 'mtj', version:'1.0.1'
testCompile(group: 'com.github.tomakehurst', name: 'wiremock', version:'1.55', classifier:'standalone') {
}
}
//packaging tests
task packageTests(type: Jar) {
from sourceSets.test.output
classifier = 'tests'
}
artifacts.archives packageTests
Can someone help/guide me with building JAR for Android Studio.