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.
My version of Android Studio is:
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?
8
Answers
Does it work for you? If that doesn’t work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
Try to do the following:
Right click on
res
directory -> ChooseMark Directory as
->Resources root
If it is not working, try to change file view to
Android
: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
andflutter run
/build
. After it’s ready, the project files will be finally available for you, including the option to launch the Image Asset Studio.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
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 onnew
->Image Asset
For Flutter users: If you created the Android project via
flutter create
, make sure to open the Android Studio project in theandroid
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 theres
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.
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".
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