我对资产文件夹感到困惑。它不是在AndroidStudio中自动创建的,几乎所有讨论它的论坛都讨论Eclipse。
如何在Android Studio中配置资产目录?
我对资产文件夹感到困惑。它不是在AndroidStudio中自动创建的,几乎所有讨论它的论坛都讨论Eclipse。
如何在Android Studio中配置资产目录?
当前回答
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
其他回答
如果你在这个线程中尝试了所有的子弹都没有用,那就尝试清理你的项目。在我的情况下,它只在Projet->清洁后起作用
步骤1:转到文件。步骤2:转到文件夹。步骤3:创建资源文件夹。
在“资源”文件夹中,只需放置字体并在需要时使用。
项目->app->src->main->RMB(鼠标右键)->新建->目录:
在AndroidStudio中,单击应用程序文件夹,然后单击src文件夹,再单击主文件夹。在主文件夹中,可以添加资产文件夹。
在android studio中,您可以指定源、资源和资产文件夹的位置。对于build.gradle文件中的每个模块/应用程序,您可以添加如下内容:
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
sourceSets {
main {
java.srcDirs = ['src']
assets.srcDirs = ['assets']
res.srcDirs = ['res']
manifest.srcFile 'AndroidManifest.xml'
}
}
}