My Android studio project cant run after restart my pc - java

After I restart my laptop, I have a problem with my project on android studio.
when I open android studio I see
that shows run btn is disabled. and my left menu is changed.
I confused with this problem.
and there is no "Android" option on dropdown ,
and this is my edit configuration view:

I found an answer that did repair my project.
there was an error on bottom right side of android studio that told "plugins are disable"
I clicked on it and another window opens then I checked options and press OK.
so after that it suggests to restart android studio.
the there was all right.
Excuse me for my English. I will thanks to some one that edits my answer to correct English.

Click here and select Android. Your run option will appear.
From My Sample project

Related

Android Studio Cannot Install Any SDK (Im Beginner)

Im starting Android Programming so Im installing Android Studio.
When Im trying to run the wizard, I get an error: "Missing SDK"
I didn't download any SDK and I know that Android Studio can download and install SDK's itself.
Then, I click on Next to see what's happening:
I know this page should has a Todo list to download SDK's and it will download and install them if I click on "Next" Button.
Then, I click on "Next" and sadly I see this page:
So Why??! It should has a list of SDK's to download! but it hasn't!
If I click on "Finish" button, it should download and install SDK's normally, but it says "Nothing to do!" :(
I know I never downloaded SDK's! "Android SDK is up to date."??
Then, I looked for emulator and I downloaded it from developer.android.com original website.
emulator archive page of developer.android.com website
I extracted downloaded zipped file into C:\Users\USER\AppData\Local\Android\Sdk and I tried again.
I didn't see many differences, except in these pages:
(a warning in bottom)
(error fixed)
Sadly, I have the same problem yet.
Then, When I click on "Finish" button at last page (or when I close the Wizard Page any time) Program sends me to the Android Studio's Main Page! But I can't make a new project:
Then, I open the SDK Manager to fix this problem. So I will see another problem!! :(
Then, I click on Edit button to fix this problem:
It sends me to the previous page!!!! :|
You know that I dont have any SDK:
And I really don't know that why Android Studio says "Android SDK is up to date." :(
Can anyone help me please?
(As you can see, Im using Windows 11 in a x64 based cpu.)
To download Android SDK, you should use a VPN or set DNS.

Cannot resolve symbol R and nothing is working?

So, I was working on a project in Android Studio, everything was going well until I had to sync my project and my R went red and now it doesn't recognize any of my layouts or anything of the sort...
I tried cleaning, rebuilding and Clean Caches - it's not working.
Try this:
first of all check your XML file where you are working now
maybe there is some problem in your XML file
after go to in your android studio and click file menu in dropdown select invalidate cache/restart
Try to below steps I hope it will help you.
Go to the projet and select option sync with gradle file's.
or once you have to try restart the android studio.

Refactor Button is Grayed Out in Android Studio

My android studion was working fine. But suddenly I can't refactor any of my projects. When I got to the Refactor->rename then the Button Grayed.
I tried re-installing android studio but did not work. Then I updated it to the latest version (From 173.4720617 to Build# AI-173.4819257) but got the same problem.
Even I tried to refactor different projects on another pc but got the same problem.
I don't know how this problem is generated within a night to all of my pc's.
Please help me solving this problem
The button is disabled because you are not changing the package name. Try to change the package name to different text, this will enable the button automatically.

JDK is not defined on Android Studio start

From 2 days, when I open Android Studio project, it seems like JDK is not defined, like on picture. When I place mouse cursor on some red method and click alt + enter, I can setup JDK, but when I make it, it does not help at all. Even Gradle refresh gives nothing.
I can temporarily fix this by going to "Invalidate caches/Restart...", but then upon the next restart I see the same problem.
Android Studio Version: 2.3.3
Edit

How do I open open-source projects in Android Studio?

I'm very new to Android programming, and I wanted to try learning by example. I found this open source project on Github: https://github.com/android/platform_packages_apps_contacts
I was hoping to open this in Android Studio so I could modify certain elements and see the result by running it, eventually learning how the process works as a whole. The problem is when I download the zip file and try to open the folder inside with Android Studio, nothing shows up. Any help would be appreciated!
In Android Studio, close all open projects until you get the "Welcome to Android Studio" screen. Choose "Check out project from Version Control", and in the popup, choose "GitHub". Screenshot:
Follow the UI from there.
Try to checkout it directly into Android Studio, VCS->Checkout from version Control->Git
Open all projects using:
Import project (Eclipse ADT, Gradle, etc)
I usually open my project that is saved in Google Drive in other computer, and the next option never work to me:
Open an existing Android Studio project
I always use the first option to avoid problems.
Use Open an existing directory in Android studio.
Navigate the project you wish to open to the directory containing such folders as:
manifest
java/src
res
...etc.
Now, Open.
By default, on Android Studio 2.2.2, when you open an existing Android Studio project, you land on an empty page showing only the name of your project on the top left (just below the open, save, refresh shortcuts icons) but side panels that contains your project structure and details are hidden.
You can open these panels either by pressing "alt + 1" as suggested on the background of the "starting IDE page" or by clicking on menu: "View" -> "Tool Buttons".

Categories

Resources