Sayn Yt
Sayn Yt

Reputation: 11

Can't create assets folder in android studio

I'm trying to create an assets folder in android studio but the option is grayed out! [1]: https://i.sstatic.net/kbLO4.png

Upvotes: 0

Views: 1807

Answers (3)

code programm
code programm

Reputation: 1

Just create a new directory on the same level as your pubspec.yaml file and add the following code to your pubspec.yaml:

flutter:

  assets:                   <---- add this
    - assets/               <---- add this

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

In my case I named the directory "assets". Your project structure should now look something like this:

├──android
|
├──assets
|
├──lib
|
└──pubspec.yaml

Upvotes: 0

MustaqAhmed Saiyed
MustaqAhmed Saiyed

Reputation: 37

You can directly create assets folder res right click and select asset folder i am create easy to create asset folder

Upvotes: 0

Arbaz Pirwani
Arbaz Pirwani

Reputation: 965

you have set your minSdkVersion to less than 16 in build.gradle (:app) go and search minSdkVersion and set it to minimum 16 I suggest set 21

defaultConfig {
    minSdkVersion 21
}

Upvotes: 3

Related Questions