java - Tinify API with Android -
is possible use tinify compression api in android? i've implemented required stuff, app crashing time. here's code:
file photo = new file(environment.getexternalstoragepublicdirectory(environment.directory_pictures), imagename()+".jpg"); try { log.d("tiny", photo.getabsolutepath()); source source = tinify.fromfile(photo.getabsolutepath()); } catch (ioexception e) { log.e("tiny", e.getmessage()); e.printstacktrace(); }
a getting following error:
fatal exception: main java.lang.noclassdeffounderror: java.nio.file.paths
if it's not possible, there other apis image compression android?
it's not possible as-is. note java.nio.file.paths
added in java 7, android still supports java 6, some java 7 language features if using specific buildtoolsversion
, minsdkversion
. see things don't work section @ java7-on-android project page.
Comments
Post a Comment