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
目录
相关文章
|
3月前
|
人工智能 IDE 开发工具
Studio Bot - 让 AI 帮我写 Android 代码
Studio Bot - 让 AI 帮我写 Android 代码
150 1
|
4月前
|
Java 开发工具 Android开发
OpenCV(一):Android studio jni配置OpenCV(亲测有效,保姆级)
OpenCV(一):Android studio jni配置OpenCV(亲测有效,保姆级)
156 0
|
2月前
|
数据库 Android开发 数据库管理
【Android】使用android studio查看内置数据库信息
【Android】使用android studio查看内置数据库信息
60 0
|
2月前
|
编译器 开发工具 Android开发
|
2月前
|
Android开发
【Android Studio】小游戏 | 实现两个小动物随手指移动
【Android Studio】小游戏 | 实现两个小动物随手指移动
|
2月前
|
Android开发 数据安全/隐私保护
【Android Studio】简单的QQ登录界面
【Android Studio】简单的QQ登录界面
|
3月前
|
IDE 开发工具 Android开发
Android Studio 下发布项目成APK文件
Android Studio 下发布项目成APK文件
117 1
|
3月前
|
前端开发 Java 数据库
用android studio写一个简单的记单词?????App
用android studio写一个简单的记单词?????App
20 0
|
4月前
|
API Android开发 开发者
Android Studio Electric Eel | 2022.1.1 版本
Android Studio Electric Eel | 2022.1.1 版本
|
4月前
|
XML Java Android开发
Android Studio App开发之利用图片加载框架Glide实现刷新验证码功能(附源码 简单易懂)
Android Studio App开发之利用图片加载框架Glide实现刷新验证码功能(附源码 简单易懂)
33 0