I have a .gif file inside the assets folder like this assets/Files/android.gif. when I try to open the file it throws an exception at the second line
AssetM
I suspect you are getting complaints about unhandled exception type IOException. If that's the case, you need to put the call to mgr.open in a try-catch block to handle the exception that may occur when retrieving the InputStream object.
AssetManager mngr = getAssets();
try {
InputStream is2 = mngr.open("Files/android.gif");
} catch (final IOException e) {
e.printStackTrace();
}