Android Studio 没有assets目录的问题

简介:   Where to place the assets folder in Android Studio   If you are having problems with asset files not being included in your compiled a...
Screen Shot 2014-02-22 at 19.41.02

Where to place the assets folder in Android Studio

If you are having problems with asset files not being included in your compiled apk file, it may be because your assets folder is placed in the wrong directory.

The assets folder should usually be inside the following folder:

<project>/src/main/

That is the default, but make sure to check the asset folder configuration setting in your projects .iml file, to be sure which folder it really is:

<option name=”ASSETS_FOLDER_RELATIVE_PATH” value=”/src/main/assets” />

The path to the assets folder should be:

<project>/src/main/assets

place all your assets inside, and the files should now get included in the build!

If not, try cleaning t he project, by going to Build -> Clean project
or running  ./gradlew clean

project-structure

转:http://envyandroid.com/archives/1074/assets-android-studio
目录
相关文章
|
27天前
|
存储 Linux 开发工具
Linux手动升级替换Android Studio
【6月更文挑战第22天】
|
26天前
|
Android开发
Android Studio(2022.3.1)设置阿里云源-新旧版本
Android Studio(2022.3.1)设置阿里云源-新旧版本
133 1
|
1月前
|
XML Java 开发工具
Android Studio开发Android TV
【6月更文挑战第19天】
|
1月前
|
Android开发
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
Android studio 出现Plugin [id: ‘com.android.application‘, version: ‘8.1.0‘, apply: false] 问题解决办法
212 1
|
10天前
|
Oracle Java 关系型数据库
Android studio 安装以及第一个程序
Android studio 安装以及第一个程序
18 0
|
21天前
|
Java Linux 开发工具
Windows环境下Android Studio v1.0安装教程
Windows环境下Android Studio v1.0安装教程
26 0
|
29天前
|
Android开发
如何 将Android Studio升级至最新版(4.0)
如何 将Android Studio升级至最新版(4.0)
43 0
|
29天前
|
Java 开发工具 Android开发
Android Studio 导出JavaDoc文档
Android Studio 导出JavaDoc文档
21 0
|
1月前
|
开发工具 Android开发
Android studio历史版本下载
Android studio历史版本下载
108 0
|
1月前
|
Android开发
Android Gradle开发—脚本实现自动打包后复制一份APK文件,并修改APK名称,到指定目录作备份
Android Gradle开发—脚本实现自动打包后复制一份APK文件,并修改APK名称,到指定目录作备份
45 0