Android Studio Open an existing Android Studio project doesn't work [duplicate] - android

Android Studio 3.4.2 can't open project on macOS 10.15 Beta (19A526h)
Open Android Studio -> press Open an existing Android Studio project -> select folder with project -> NOTHING happens
I can create new project though, but can't open existing one.
Is there anything i missing here? Any help is appreciated.

I have met the same problem. It works by dragging folder onto AndroidStudio directly.

I made it easier to open projects with Finder by associating all settings.gradle files with Android Studio and then launching that file to open a project. (I'm on Android Studio 4.2.2)
I find that Android Studio's behavior with launching project files is inconsistent. If you don't have any project open and you launch a project's gradle.properties file with Android Studio, then it will open the whole project, BUT if you do this when another project is open then it will just open the gradle.properties text file in the already open project! However, for some reason this issue is avoided with settings.gradle -- it always opens the whole project even if another project is already open.

This problem occurs with macbook M1 macOS monterey. I solved this by,
Open Settings in Android Studio
Select Edit Custom VM options..
Add this line to it: -Dide.mac.file.chooser.native=false
Restart Android Studio

Related

Android Studio : Open Android Module in Android Studio option is missing in flutter project

I am developing a flutter app for both iOS and Android. When generating the APK, I prefer to use Android studio (my default IDE is VSCODE). However, when I go to Tools > Flutter I do not see Open Android Module in Android Studio option. I do see Open iOS Module in Xcode.
I followed couple of SO answers, even tried replacing android.iml file from a working project. Nothing happened. I re-cloned my project from BitBucket because sometimes the Android Studio was fine when the project is freshly from repo, but this time, that didn't work either.
I Also tried opening the gradle file and looking for the option (as explained in one SO answer), that didn't work too.
However I noticed, few issues.
In the folder structure, the root folder is replaced by the flutter icon. in projects where I have no issues with, the folder icon is folder.
In here I see .dart_tool folder. In working apps with no issue, I do not see this folder.
I do not have an android.iml file. In other projects I did.
Below is my folder structure in a nutshell. Whats going on here and how to fix this issue?
When you don't see any options to
open module in android studio
because of missing .iml files caused by .gitignore file, follow simple steps.
Click on File and choose Open..
Now in the opened dialog choose android folder of example flutter project under your plugin module. For e.g if test is your plugin with example as it's app then you need to select and click Ok
test\example\android
3. Then wait for Android Studio to sync and download necessary jar files.
Simplest solution
Open flutter project
Go to android folder
open manfiest file
On the top right you will see option open module in android studio
click on this option
Solution 2:-
Import your android project as a project in android studio
The easiest way is to use this command in the root directory of your project, it will create some missing files and it will definitely work.
flutter create --platforms=android .
Now just right click to Android folder

Android Studio 3.5 can't open previous version projects

I have a project stored in GitHub, it was created a few days ago using Android Studio 3.3.
I have installed Android Studio 3.5 on a new Windows, and checked out the project to the disk.
When I open the project in Android Studio 3.5, in Android view I only get an empty app item.
The Project view shows all the files yet it seems the project itself isn't loaded.
What should I do to load the week-old project in this very best IDE of great improvements?
Open Android Studio Launcher; or use File -> New -> Import Project
Select "Import Project"
Select project folder
Follow next steps *you understand another
When I have same problem, I use this steps to solve it.

Android Studio - Gradle sync failed: Already disposed

After updating to Android Studio 3.2 Beta 1, I started getting the following error for two different projects:
Gradle sync failed: Already disposed!
There is no error with Android Studio 3.1.3, and there was no error with various canary versions of Android Studio 3.2 before updating to beta 1.
I already tried everything I can think of (e.g. complete cleaning of project, including all generated .gradle/.iml/.idea files/folders, as well as a complete invalidate cache and restart of Android Studio) without success. The build works as expected from command line using Gradle.
This is not a duplicate of Android Studio Gradle Already disposed Module
EDIT
The event log is showing
Unable to save plugin settings: The plugin org.jetbrains.android failed to save settings and has been disabled. Please restart Android Studio
In the "IDE Fatal Errors" window, I am seeing the following exception:
'Gradle: backport-util-concurrent:backport-util-concurrent:3.1#jar' already disposed: --------------Creation trace:
java.lang.Throwable
at com.intellij.openapi.util.TraceableDisposable.<init>(TraceableDisposable.java:45)
at com.intellij.openapi.roots.impl.libraries.LibraryImpl.<init>(LibraryImpl.java:103)
at com.intellij.openapi.roots.impl.libraries.LibraryImpl.<init>(LibraryImpl.java:69)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase$LibraryModel.readExternal(LibraryTableBase.java:327)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.loadState(LibraryTableBase.java:64)
at com.intellij.openapi.roots.impl.libraries.LibraryTableBase.loadState(LibraryTableBase.java:30)
at com.intellij.configurationStore.ComponentStoreImpl.doInitComponent(ComponentStoreImpl.kt:375)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:331)
at com.intellij.configurationStore.ComponentStoreImpl.initPersistenceStateComponent(ComponentStoreImpl.kt:121)
at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:96)
at com.intellij.openapi.components.impl.PlatformComponentManagerImpl.initializeComponent(PlatformComponentManagerImpl.java:54)
EDIT2:
More recent version of Android Studio 3.2 are having the same issue.
As it turned out, the problem was that I was trying to open a project directory that was a symlink to the actual location (on the same partition). Gradle (on command line) had no issues building the project from the symlinked location, however, opening it in Android Studio resulted in the obscure and non helpful error described above.
Simple solution
1.Delete module folder and modules.xml file under .idea folder.
2.Close Android Studio
3.Reopen and sync
Possible duplicate problem:
Android Studio 3.0 - Unable to save settings: Failed to save settings. Please restart Android Studio Android Studio 3.0 - Unable to save settings: Failed to save settings. Please restart Android Studio
This worked for me: Delete the .idea folder.
1) Go to File--> Settings -->Plugins Disable any plugins not loaded (i.e. red in color) #friederbluemle This may not apply to you.
2) Enable the one plugin, Android Support
3) Right-click on your 'app' directory (contains your module gradle.build file) in Android Studio and select 'Show in Explorer' --- this opens that directory.
4) Quit Android Studio. Get out of any and all instances of Android Studio to allow you to then delete the fold, .idea, in that directory.
5) Restart AS, you'll notice the project will not come up -- you'll have to pick in the dialog window that appears. That's ok. Pick it, and it will 'rebuild' the folder, .idea.
6) Go to File--> Settings -->Plugins Enable any and all plugins if any.
What worked for me was going to Android Studio File and Invalidate/Restart options.
What worked for me is as follows
Delete the .idea folder
Close Android Studio
Reopen Android Studio and allow it sync your project all over.

How To Open an Existing Android Studio project in Android Studio without launching last opened proect

I want to open existing Android Studio Project without launching Android Studio with last closed project.
i.e When I launch Android Studio then it opens last closed project on it.
Then I have to close it or go to
File menu -> Open -> Open File Or Project
Rather than i wants to open it from windows file explorer/finder or from terminal where project is stored.
like Xcode, Unity and other IDE does.
Or we can say.
can we create a special Android Studio Launcher icon for separate Project in that project directory.
That isn't possible. Other IDE projects create a "project file" that associates the contents of the project to that specific IDE.
Netbeans for example is not one of those, and so is Android Studio.
There are only two ways to open a project for Android Studio.
Hopefully in the future they will implement a simpler way to do it!
We can launch android's specific project in android studio from command line tool studio.
Go to directory where project is stored
user#:~/AndroidStudioProjects$ studio MyProject
If the commands don't work you can run in Studio > "Tools" -> "Create Command Line Launcher..."

How To Open an Existing project in Android Studio

All the questions dealing with this are now outdated. I am simply trying to open an existing Android Studio project.
I have cloned a repository for a project from http://blog.stylingandroid.com/material-part-2/
I have all the files, I choose "Open an existing android studio project" and then choose the "Material" folder which is the root directory of the project. When the project loads, it is called "gradle" and there are no files showing in the project frame.
I am using the latest version of android studio and the latest build tools as of 19 Dec 2014.
How do I import a project?
From the Android Studio welcome screen, try "Import Non-Android Studio project". It sounds like exactly what wouldn't work, but it does.
On 1.5.1, there's no Import Non-Android Studio project as the accepted answer says, but chosing Import project (Eclipse ADT, Gradle, etc.) does the trick. Open an existing Android Studio project does not work. Still quite weird.
Click on file, then click on Open. select the main file that contains the project's name without opening the file.
then Gradle loads but still nothing happens and the welcome screen is shown. press the combined keys of Alt+1 then the project files will appear on the left side of the screen.
Sometimes it is tricky to open Android project. My tip is try to use
File -> Open... -> <path_to_settings.gradle>

Categories

Resources