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

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:
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?

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 -> Choose Mark Directory as -> Resources root
If it is not working, try to change file view to Android:

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

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.

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

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.

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".

Related

Add Android Run/Debug configuration for Flutter project

I am working with a Flutter example project where it shows how to share a FlutterView inside an Android application (and iOS also).
While working with it I tried this:
I make changes to the android project like changing the theme color, if I do hot-reload/run for main.dart I don't see the changes reflected in the running app. I have to stop it from Android Studio and run the main.dart again to see the changes.
To solve the issue I was thinking to add a run/debug configuration for Android app module. So that I could run android app and not main.dart.
Is there a way how to achieve this in Android Studio?
One solution for me was to open the android(/flutter_view/android/app) project from a new window in Android studio. I could run the app this way.
(But here I encountered another issue in case anyone has the solution).
According to my understanding you face problems when you open your project and try to run.
Android studio asks you to configure your project to be able to run...
It's easy to solve near to run button you will find "add configuration" button just press then from left side select "flutter" and put in the field "entrypoint" your main Dart file path main.dart...
EX. E:/project/lib/main.dart....
Then from top right corner press "create configuration"...
That's it.
For Configure your Flutter app on Android you have to Upgrade Gradle file..
So Go to the Tool and at you will find AGP upgrade Assistant..
It Download new Gradle file then its Config automatic..

How Do I Find Out Where My Project is Saved?

I know that this is a simple question but I am having a problem finding where my project is saved. I recently updated my Android Studio version and now that I have created a new project I do not know where the project files are being saved.
Does anyone have suggestions?
And also you can right click on the project and click show in explorer,
Edit:
As Matt suggested, you can use copy path also,
Note:
I am talking about Windows
The path to the project is shown in the title bar of the Android Studio IDE window:
In the above screenshot, the path is shown in square brackets after the application name ([/tmp/MyApplication]).
On MacOS with Android Studio 4.2.1 (and possibly earlier) the project path no longer shows in the Android Studio IDE window. I used to get the path from there. Also, there is no "Copy Path" or "Show in Explorer" on MacOS.
However, we can see it when we go to the project view, as you can see in this screenshot below.

Exported Eclipse Android project won't run from Android Studio

I followed googles instructions and exported a test project from Eclipse by using the
Export -> Generate Gradle build files
opened up Android Studio and imported. After getting my support libraries working properly my project would compile with out any errors. My problem started when I tried to run the app on my device. When ever I try to run the app it directs me to use an AVD, never giving me the option to select my device. I obliged, created a new AVD but to no avail only to get build failed error. (I'll add the exact error when I can) NOTE: I can see my device is connected by clicking on "(6)Android" and the bottom left of the screen. I do see all logcat messages in verbose. I added android:debuggable="true"to my manifest but still nothing.
Confused I created a new project directly from Android Studio, hit run and bingo,...it gave me the option to use my device to run it or an AVD. Selecting either results in a successful launch of the dummy "Hello World" app. I think it may have something to do with build variants as my imported project doesn't specify "debug" vs "release" while the Android Studio generated project does.
Anyone else experiencing this?
I found the answer to my own question. Bit of a double whammy. Before installing Android Studio I updated my SDK via Eclipse (as recommended/required by google). Turns out by doing so a few items in my current projects got disconnected. ie. build paths, dependencies, ect. (you now have to place external Jar's in the src/libs folder)
Here is what I did to fix it.
In Eclipse, Preferences -> Java Built Path ->"Order and Export" tab. Make sure items are selected
If you have external Jars, manually copy and paste the jar in the libs folder of the project. (I did this in my Finder)
confirm the project launches via Eclipse
If it runs, export the project again by "Generate Gradle build files" (confirm overwriting existing files, if any)
5.Open Android Studio and re-import the project. Again, confirming overwriting of any existing files.
6.Next to the run bottom at the top of the screen click on the drop down next to your project name. Click "Edit Configurations..." and select "show chooser dialog" if not already selected.
clicked ok to exit,..and PRESTO!!! I finally have a successful project migration.
Hope this saves someone else time.
Cheers!
Yeah i have experienced similar stuff on Eclipse, its quite buggy. Since Android studio is based on it i would expect everything. Still the best solution to everything is to reload project, refresh project or restart IDE.

How to create a new PhoneGap Android project in Eclipse "Juno" on Mac?

I recently reinstalled my OS, and used to have a PhoneGap / Android project. Now I want to use it again, so I reinstalled Eclipse and the ADT plug in. So far so good. Now the instructions say:
"Choose New > Android Project"
However, Android Project doesn't show up under new projects, like it used to.
http://www.adobe.com/devnet/html5/articles/getting-started-with-phonegap-in-eclipse-for-android.html
I downloaded phonegap-2.6.0, but perhaps it isn't connected to Eclipse... what do I do at this stage to get Android Project to show up?
If there is no 'Android Project' under the menu it is not about PhoneGap it is maybe about ADT, are you sure you installed it correctly ?
And, also you can create Android Project with PhoneGap by using 'command line', then you just go to the same menu:" New > Project " then choose Android Project with existing source choose the path you created before by command line and that's it.
edit1: Make sure you locate true directory for 'android-sdk-mac_x86'
edit2:this is how you create Android project by using Terminal
/path/to/cordova-android/bin/create /path/to/my_new_cordova_project com.example.cordova_project_name CordovaProjectName
I had a similar problem. For me, Eclipse wouldn't respond when I clicked Finish when importing source from a phonegap project.
I later found that I had mentioned an incorrect path to the android-sdk.
Check if that is your problem.
If it is, here is how you change it:
In Eclipse IDE, click on the Window menu and then Preferences.
A pop-up will be opened.
On the left pane, click on Android (click on it, not on the + sign beside it).
In the field SDK Location, click Browse and point to the location of your android-sdk.
You are done!
Hope that helped.
EDIT:
I am using Eclipse Juno, but the options must hopefully be pretty much the same for other versions too. Please comment if this is incorrect.

Cannot open an existing project in Netbeans

I'm using Netbeans 7.0.1 in my computer, I've already created several projects in that same machine, then after installing/adding plugins for Android, I could not open any project in that same machine. How do I make my netbeans open my existing projects again? Do you think the installation./addition of plugins has something to do with the matter? Do I need to remove all the changes that I made? How?
And I forgot to mention, Whenever I try to "Open Project" it will show a window which displays the location of the projects, this gives me the idea to go to "My documents\NetBeansProject\ProjectName", however, when I click the project that I want (e.g GenReport) in the textbox (the label is Titled 'Project Name' ), this is shown --
unrecognized project;missing plug-in?
Try using create new project from existing resources.
As dumb as this may sound, take your project directory, Zip it up and then choose File >Import Project > From Zip. That should get you back into your files.
This happened to me because NetBeans did not have HTML5 plugin isntalled (after I got a new version of NetBeans). What do you know -- the error message was telling me exactly what was wrong!
Just use File>Open project, then browse to the root of your exisiting project. It will be detected as an android project as long as you have the nbandroid plugin installed.

Categories

Resources