android - jar file under res/raw folder -
i need place 3rd party jar file raw resource under res/raw in apk. android studio (im using 1.3.1), seems file disappears final apk. presumably because of extension of 'jar'.
i cannot rename , not want included dex classes. app needs access jar runtime raw resource.
any advice (maybe modification gradle tasks can do) of how achieved?
according official android documentation should put .jar
files under /libs
folder only.
raw/
for arbitrary raw asset files. saving asset files here same saving them in assets/ directory. difference how access them. these files processed aapt , must referenced application using resource identifier in r class. example, place media, such mp3 or ogg files.
libs/
contains private libraries. stored in main application module.
once have placed .jar
file inside /libs
folder, can reference via gradle.build
file,
for example i've places acra-4.6.2.jar file inside /libs
folder
and made reference in gradle.build
file this,
dependencies { compile filetree(include: ['*.jar'], dir: 'libs') compile files('libs/acra-4.6.2.jar') }
Comments
Post a Comment