java - External Jar Library not included to apk using Android Studio -


firstly know there similar questions not exact same problem , didn't solve problem. found solutions eclipse there no studio. when add external library jar, throws classnotfound exception running code. in other hand works fine on desktop module. there anyway solve problem? or reason?

without knowing project looks can make couple guesses.

in app's build.gradle (there separate 1 in folder below project can ignore 1 now) file need add jar files dependancies.. done default this:

dependencies {     compile filetree(dir: 'libs', include: ['*.jar']) } 

this add jar files in libs folder

normally place jar files in directory like:

myprojectfolder/app/libs

so make sure jar files in place gradle can find them in


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -