Myxy290
Myxy290

Reputation: 237

I can't find the Image Asset option in Android studio

I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a New Image Asset to edit my app's icon, i can't find it. When i right-click the android/app/src/main/res folder, it does not appear within New. I am following some older tutorials and they all have that option there.

This is what comes up: enter image description here

My version of Android Studio is:

enter image description here

And my version of Flutter is: 2.8.1 (Dart 2.15.1)

How can i fix this, or are there any alternatives for modifying my app's icon?

Upvotes: 18

Views: 16358

Answers (9)

lloyd tony
lloyd tony

Reputation: 11

This worked for me

Go to File > Open > yourandroidfolder > this window

wait for the gradle build to complete

NOTE AFTER THIS YOU MIGHT NEED TO UPGRADE AGP

Upvotes: 1

Bilal Hasson
Bilal Hasson

Reputation: 41

I've had a similar issue in that Image Assets didn't show up.

I recognised that the root folder for my project was the react-native project folder, and not the android folder.

Solution: Open android studio project from the android folder

Android Studio Screenshot

Upvotes: 1

Md. Mahdiul Islam
Md. Mahdiul Islam

Reputation: 21

I have faced same issue and this suggestion really helped me. Hope this will help you too.

https://stackoverflow.com/a/66773774/20910266

To me the key point is this:

"don't open the whole project of flutter using Android studio just open the android folder found inside the flutter project with Android studio, so the Android studio can treat it as a Android project rather than flutter project, which will give you all Android features like the one ur looking for #image asset studio".

Upvotes: 2

For Flutter users: If you created the Android project via flutter create, make sure to open the Android Studio project in the android subfolder, not the one in the root folder. Then, Android Studio should automatically run gradle. Once this has finished (which can take quite some time on the first run), the Android Studio UI should automatically switch to the "Android View", and the "New > Image Asset" option should become available for the res folder. No need to manually mark anything.

Just make sure that gradle runs through, otherwise the real "Android View" won't be available, even if it is selected.

Upvotes: 17

Billy D
Billy D

Reputation: 97

I got it to come up when I right click on the root node of the project (a flutter project) and selected flutter -> Open Android module in Android Studio Then I was able to right click the res folder and clicked on new -> Image Asset

Upvotes: 5

Asith Madushan
Asith Madushan

Reputation: 44

Update To Latest Version Frist.

Android Studio Dolphin | 2021.3.1 Patch 1

Visit https://developer.android.com/ And Download Manually And Install.

After You Can Find Res/New_resources_deirectory/midmap

It's Very Simple.

#Android_Studio

Upvotes: 0

Shift and Shiftine
Shift and Shiftine

Reputation: 181

Ah, I've seen this before as you're using Flutter. Despite all the answers, I'd recommend you to right-click the android/ folder from your Flutter app root and select Mark as... > Project Root, then close and reopen the project in Android Studio.

If Android finally recognizes this as an Android project, it will take a long, long time to download some of the project's dependencies (in which some of them are already downloaded through flutter pub get and flutter run/build. After it's ready, the project files will be finally available for you, including the option to launch the Image Asset Studio.

Upvotes: 0

N4D4V
N4D4V

Reputation: 102

Try to do the following:

Right click on res directory -> Choose Mark Directory as -> Resources root

Right click -> Mark Directory as -> Resourses root

If it is not working, try to change file view to Android:

enter image description here

Upvotes: 0

plplmax
plplmax

Reputation: 2755

Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".

tools menu

resource manager screen

Upvotes: 7

Related Questions