我对资产文件夹感到困惑。它不是在AndroidStudio中自动创建的,几乎所有讨论它的论坛都讨论Eclipse。
如何在Android Studio中配置资产目录?
我对资产文件夹感到困惑。它不是在AndroidStudio中自动创建的,几乎所有讨论它的论坛都讨论Eclipse。
如何在Android Studio中配置资产目录?
当前回答
Src/main/Assets
如果选择了应用程序,它可能不会显示在侧栏上。单击顶部显示android的下拉列表,然后选择软件包。到时候你会看到的。
其他回答
项目->app->src->main->RMB(鼠标右键)->新建->目录:
单击主视图→ 新建->目录→ 并键入名称“assets”
或main->new->folder->assets文件夹(参见图片)
follow these steps
1)file->New->Folder
there are multiple options like
aidl folder
assets folder
jni folder
2) choose options assets folder
3) then there is option to change path of assets folder if you
want to change then check otherwise left that checkbox of cahnge folder location
4) click on finish
查看项目的.iml文件内部,您将看到以下行:
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
这意味着已经为Gradle声明了“assets”文件夹。您需要在src/main/下创建它(我使用的是Android Studio 0.4.2)。
在AndroidStudio中,右键单击app->src->main中的文件夹,然后创建该资产的新DIRECTORY名称。