Where to place the 'assets' folder in Android Studio?

后端 未结 22 3272
醉酒成梦
醉酒成梦 2020-11-22 01:59

I am confused about the assets folder. It doesn\'t come auto-created in Android Studio, and almost all the forums in which this is discussed talk about Eclipse.

相关标签:
22条回答
  • 2020-11-22 02:31

    First of all the "Assets" folder will not be created automatically with the project. We have to create it.

    The location of Assets folder is: App > src > Assets

    Please have a look of the simple image below.

    Note: For creating assets folder just click on Project => Right click => Select New => Folder => Assets. It will create Assets folder.

    0 讨论(0)
  • 2020-11-22 02:32

    Simply, double shift then type Assets Folder

    choose it to be created in the correct place

    0 讨论(0)
  • 2020-11-22 02:33
    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 
    
    0 讨论(0)
  • 2020-11-22 02:34

    Step 1 : Go to Files. Step 2 : Go to Folders. Step 3 : Create Assets Folder.

    In Assets folder just put fonts and use it if needed.

    0 讨论(0)
  • 2020-11-22 02:37

    In Android Studio right-click Folder in app->src->main then create new DIRECTORY name that assets.

    0 讨论(0)
  • 2020-11-22 02:38

    need configure parameter for gradle
    i hope is will work

    // file: build.gradle  
    sourceSets {
        main {
            assets.srcDirs = ['src/main/res/icon/', 'src/main/assets/']
        }
    }
    
    0 讨论(0)
提交回复
热议问题