Opening a File from assets folder in android

前端 未结 6 1019
面向向阳花
面向向阳花 2020-12-01 14:37

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         


        
6条回答
  •  南笙
    南笙 (楼主)
    2020-12-01 15:10

    Mina, I had the same problem... I had images and an XML file within "assets" and I could read the XML file but not the images. After a couple of hours of frustration I finally found the solution !

    I have posted the solution here: Null-pointer issue displaying an image from assets folder Android 2.2 SDK

提交回复
热议问题