Android Studio 1.3.2 No Module - android-studio

Trying to follow this tutorial to run a new android project on a samsung device.
https://developer.android.com/training/basics/firstapp/running-app.html
However, I'm stuck in this step:
Run the app from Android Studio
1) Select one of your project's files and click Run from the toolbar.
I've selected the MyLoginActivity.java file but I can't click run (it's grey out)
I've tried to “Edit Configuration" add a "Android Application" but "Module" is empty:
I've tried to "Sync Project with Gradle Files". But the "Module" is still empty.

There was an ampersand (&) in the directory path! Creating a new project in a new directory without the & symbol solved all the issues.
No issue when opening a new project for XCode.

Related

Can't add an assets folder in Android Studio 3.6.3

Windows 10
Android Studio 3.6.3
I was trying to add an assets folder to my Android Studio project, which as I understand, should be located under new->folder->Assets Folder in any context menu of the Project view.
Opening the context menu for the app/src/main folder in the Project view doesn't show the new->folder option. I've tried adding it through the File menu, alt+insert and context menus of different project directories. The folder option doesn't exist in any of those.
contents of the context menu->new
Edit: I've also tried:
Reinstalling Android Studio without importing user settings
Restarting Android Studion with Invalidate Cache & Restart

I can not run a project I did not create

I have been trying to run a project - which I did not create , but downloaded - in android studio.
For that matter, I put this project's folder in my android studio projects folder.
Then, I use an option of "import existing project". The project seems to be successfully imported. However, the option of run is not active , or disabled.
The same happens when I try the option of "open existing project" instead.
What is the reason for that problem, and how should it be resolved ?

Flutter: How to import existing Flutter project, as a gradle project

How to import existing Flutter project, as a gradle project? 'Import Project' wizard asking for Gradle home path.
I have gradle, installed in my system. But what (which path) needs to set here.
Here is, what I'm trying:
Error
I had also gone through this problem where I have to import the existing Flutter project in Android Studio. I was able to import the project following below steps:
Open Android Studio
Goto File -> Open -> In Open File or Project window select the project you want to import.
Once you have done above steps try to resolve warnings shown in the log window. Warnings may be like update dependencies used in the project, etc.
Hope it will help you out.
I faced the same issue.
The gradle home directory (on my Windows machine) is located under:
C:\Program Files\Android\Android Studio\gradle\gradle-4.1
(please check the gradle version).
This will allow you to open the project. Then, you will most certainly need to "upgrade to gradle".
If this does not fully work, you might also consider using Visual Studio Code, which makes the "import" much easier: simply open the folder where you project resides. Optionally, you will have to resolve missing packages (-> Fetch packages). It should then be possible to run the project.
Hope this helps.
File - Open - Select the project root directory
Open Flutter settings from the tip menu - Click the pull-down menu, then flutter sdk dir appeared
Run
Or you can just use the flutter run command after step 1.
If you first add the flutter plugin for Android studio, then you can directly import the project as an Android Studio project and it should work fine.
In my case, having Android Studio 3.4.2 and Flutter 1.7.8, I only needed to:
1 - Open the project with the option "Open an existing Android Studio project".
2 - Run "flutter pub get" to get the packages listed in the pubspec.yaml file.
3 - Run the project with "flutter run"
If you are using Google services, don't forget to add your google-services.json file in your project. In another case, the project will fail without a clear message when you try to run it.
For Import exiting Flutter project.
Please choose Import Project because of Android Native application mean import use of android app only.
So use File -> Open -> Select Project root directory.
After open if ask for dependencies then Choose to Get dependencies

How to solve the issue of Android Studio 3 (3.1 canary) Preview: Cannot import project

I am working on Android Studio 3 Preview at the moment. However, whenever I tried to open an old project it says:
The project file specified already exists.
I have deleted:
Old code/project from hard disk (completely)
Removed the project from the project list.
Any tips on this?
This needs two steps:
You must delete the .idea folder under your project. It is a hidden directory. use ls -a to find it out.
Right click build.gradle and choose application. It probably popup a window asking for a program to open it, choose Android Studio.
I faced the same problem with 3.1 and .idea folder was also not there. Still it was not working. So instead of doing "Import Project" I did "Open an existing Android Studio project" and it worked.
I encounter same problem recently when opening existing Android Project,
deleting .idea or open directly build.gradle through Mac OS Finder work for me
Open the gradle file (select Android Studio if an application picker pops up) and it should bring up the "Import Project" dialog.
Just go to your Project Location Delete All files like .idea, .app etc and Relocate Your Project Location.

New version of Android Studio is not opening

I recently downloaded a new version of Android Studio, but after installation of the program, it asked options like to create new projects or others as I click on the project structure where I had to locate the path of the SDK. After locating its path correctly, it just froze. Nothing happens when I click the create a new project option. Instead of this, I clicked open the current project option. Android Studio opened, but without the SDK settings. When I go to the SDK manager to locate the path of SDK, that SDK manager option is not loading. It keeps on loading and shows nothing.
This problem is only related to the new version, not with the Android Studio 1.5. What should I do to solve this problem?
i hope this command help you!!
For linux
open Terminal
Follow this commmand
cd /media/ubuntu/DATA/android-studio/bin
./studio.sh
For Windows
Follow this commmand
cd /media/ubuntu/DATA/android-studio/bin
./studio.sh

Resources