java - Android Studio and openimaj -


i trying build android studio project using dependency openimaj java library.

apply plugin: 'com.android.application'  android {     compilesdkversion 22     buildtoolsversion "22.0.1"      defaultconfig {         applicationid "com.example.mapinguari.myapplication"         minsdkversion 15         targetsdkversion 22         versioncode 1         versionname "1.0"     }     buildtypes {         release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     compile 'com.android.support:appcompat-v7:22.2.0'     compile 'org.openimaj:openimaj:1.3.1' } 

is module build file. reports no errors when syncing ide.

however when try construct of classes in 1 of source files android studio not recognize of classes openimaj dependency.

any appreciated.

thank you!

i think might because you've specified non-jar openimaj dependency (specifically you've told link against openimaj master pom file, contains references different sub-modules). need choose specific modules want - example if application doing image processing, add dependency org.openimaj:image-processing:1.3.1.

edit: seems batik svg libraries have circular dependency somewhere breaks gradle (see https://issues.apache.org/jira/browse/batik-1098). causes eventual stackoverflowerror. additionally, pulling in xml-apis conflict android. assuming don't mind not have svg image support, following should work:

repositories {     mavencentral()     maven {         url "http://maven.openimaj.org"     } }  dependencies {     compile filetree(dir: 'libs', include: ['*.jar'])     testcompile 'junit:junit:4.12'     compile 'com.android.support:appcompat-v7:18.+'     compile('org.openimaj:image-processing:1.3.1') {         exclude group: 'org.apache.xmlgraphics'         exclude group: 'xml-apis'     } } 

you might want add additional exclusions dependencies not needed in app - seems including org.openimaj:image-processing pulls in lots of things not going needed (i've created issue here: https://github.com/openimaj/openimaj/issues/97).


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -