java - How to add classpath in an Android Studio project -
java - How to add classpath in an Android Studio project -
i have android project android application depends on pure java library (and java library uses others compiled jars libraries). added dependencies, can build project, @ run time have classnotfoundexception
error.i had add together theclasspath
environment variable path jars.is there way set classpath locally project only, using command line option
java –classpath <path jars>
in android studio run/debug configurations?
in case haven't solved problem yet:
place .jar (in case .jar) file anywhere in c: (i recommend place file in android project directory. example: c:/users//androidstudioproject/
open project in android studio.
go to: file->new->new module
on bottom, under "more modules", select "import .jar of .aar package", think 3rd alternative listed.
click next, , next "file name" text field, notice little button text "...". click button, , locate .jar file step 1), leave "subproject" text field blank , click finish. android studio start rebuilding project, should take 10-20 seconds, depending on machine.
right click on project in left "projects" pane , click "open module settings" (the lastly alternative menu).
click on "app" under "modules", click on "dependencies" tab , click plus on right , select "3 module dependency".
if .jar file listed, select , click ok. click apply , ok.
the rebuilding process take 20-30 seconds
if no errors shown, have configured classpath successfully.
java android classpath
Comments
Post a Comment