简体   繁体   中英

Android assets folder not added to apk

I'm pretty new to eclipse and Android and I'm trying to add some files to the assets folder, but certain files and directories are not being included in the .apk file.

I have set-up the following structure in the solution:

/assets
  /textures
    /test.png
    /splash.png
  /xml
    /testData.xml

I don't know if there is a specific way to get eclipse to re-build/compile the project and add the new assets to the assets folder in the .apk, but the /xml subfolder (and its contents) are not in the apk. Subsequently I get FilenotFoundExceptions thrown when I deploy the app. The textures are all included.

How can I force a recompile and rebuild of the apk and is there anywhere to manually check which files are included in the project (like an assets manifest file)?

As far as I know there are no restrictions placed on hierarchy or file formats for within the assets folder. Also, when I dragged the files from the desktop to the solution explorer, I selected 'copy files to project'.

Thanks

It appears one cannot use upper-case letters in the naming of files within the assets folder. Contrary to my example above, I was actually using camel-backed file names within the folders. After changing the file names to lower-case, the apk was automatically re-built with the assets the next time I deployed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM