How to force Android Studio to start with the welcome screen? - android-studio

is it possible to let Android Studio start into the welcome screen instead of directly loading the last recent project?
I´ve not really the fastest pc and I often need to switch between projects, its really annoying sometimes.

Go to
(as of July 25, 2015)
File -> Settings -> Appearance & Behavior -> System Settings -> Un-check "Reopen last project on startup" -> Click apply
(old version)
File -> Settings -> General -> Startup/shutdown -> Reopen last project on startup.
Un-Check the checkbox.
Or, on the Mac, Preferences -> General -> ....

It is now not under File, but in the main menu, goto:
Android Studio -> Preferences -> Appearance & Behavior -> Click on: System Settings -> Then you see: Un-check "Reopen last project on startup" -> Click apply

For Mac users, as of Version 4.1.2, the path is Preferences (CMD + ,) -> Appearance & Behavior -> System Settings -> uncheck Reopen last project on startup.

If you are in a screen of a previous projects:
Customize->All settings-> Appearance & Behaviour--> System Settings --> uncheck Reopen projects on startup(under Project section)
Click Apply
Done)

Related

Where is Android Studio Markdown support plugin preview preference?

I want to show preview for markdown.
But it is not shown.
I am using Markdown support by JetBrains. And Android Studio 3.1
I found IntelliJ help.
https://www.jetbrains.com/help/idea/markdown.html
But I can not see that preference.
How can I see markdown preview?
Updating JetBrains Runtime (JBR) will solve the issue.
Start the IDE, use Help -> Find Action, type "Choose Boot Java Runtime for the IDE", press Enter.
Select the newest version with JCEF to install.
Click the OK button and wait until the file with JetBrains Runtime is downloaded and configured.
Restart the IDE and Enjoy.
Video(44S): https://youtu.be/Mtu3dUgK480
Go to File>Preferences>Editor>File Types then select Files Opened In AssociatedApplications and add *.md to the list
Reassign the wild card
Do likewise for the Text file type
Enable the Markdown
Go with Vladimir Schneider
Preview like a bawse!
UPDATE: As mentioned by #desgraci below. It's now a paid plugin. It doesn't even show up. It would ideally work as indicated in the updated documentation but some requests left in the reviews.
I'm unable to make it work.
I suggest giving up and opening it in Visual Studio Code.
Right-click tab with your file, select Split Right.
In second instance, right-click tab again and select Open in Preview.
Now you have text and preview at the same time.
Taken from https://issuetracker.google.com/issues/159933628?pli=1#comment7
In the Android Studio:
Find action (ctrl + shift + A / command + shift + A)
Search for Choose Boot Java Runtime for the IDE
Select the latest version in
the "New:" dropdown - e.g. 11.0.12+7-b1504.27 JetBrains Runtime with
JCEF OK Restart
Worked in: Android Studio Chipmunk | 2021.2.1 Patch 1 | Build #AI-212.5712.43.2112.8609683
There is another plugin which is "Markdown Navigator Enhanced" and that I tested on Android Studio 3.5.2, it enables a toolbar with some editing functions as well as the preview options.
You can Edit, preview or do both in a split window, you can even show the HTML code.
The plug-in is paid, but it has a 30-days trial that can be good for a short usage.
Download plugin first,and then you'd better do something to active it:
Windows:
AndroidStudio ->File -> Editor ->Coe Style -> File Types->Markdown-> + -> *.md -> ok -> ok
Mac:
AndroidStudio -> Preferences -> Editor -> FileTypes -> Markdown-> + -> *.md -> ok -> ok
Then enjoy writing in md.
This is not just a JavaFX issue, which can be resolved by installing Choose Runtime plugin and choosing a different JDK. The Markdown plugin itself also references classes from IntelliJ UI, which means that even with a runtime that includes JavaFX, it still requires IntelliJ and won't work properly with Android Studio:
Caused by: java.lang.ClassNotFoundException: com.intellij.ui.javafx.JavaFxHtmlPanel PluginClassLoader[org.intellij.plugins.markdown, 193.6494.42] com.intellij.ide.plugins.cl.PluginClassLoader#4fa7c8ac
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:77)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 93 more
It will still work with the default bundled JDK, just reduced functionality without the preview panel.
References:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003498520-Mardown-plugin-doesn-t-show-preview
https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under
A little late but you can go to Settings/Preferences -> Editor -> File Types. Select Markdown Language from the list. Below, in the Registered Patterns section, add *.md, press ok, and restart Android Studio
Elijah's answer is great, but you may have to do ↓ after his actions.
Preferences -> Editor -> FileTypes -> Markdown-> + -> *.md
Since there is no good plugin for Android Studio IDE, If you have VS Code, I recommend Markdown Preview Enhanced plugins.
Or if you work a lot with Notepad++ , you can install the MarkdownViewerPlusPlus plugin
Follow folowing steps for Notepad++ MarkdownViewerPlusPlus plugin setup:
Download MarkdownViewerPlusPlus, you get a .dll file
Open notepad++ -> plugins -> open plugin folder
create subfolder "MarkdownViewerPlusPlus", paste your .dll file
restart notepad++, in plugins menu options now you should see MarkdownViewer++.
File -> Editor -> File Types->Markdown-> + -> *.md -> ok
File -> Editor -> File Types -> ASSOCIATE FILE TYPES WITH ANDROID STUDIO -> select all -> ok -> yes
File -> Plugins -> Marketplace -> search "Markdown" -> install -> APPLY -> OK
Help -> Find Action -> "Choose Boot Java Runtime for the IDE" -> Select the runtime that comes with JCEF support -> OK
restart Android Studio
My solution to this issue is to preview on VS Code
Go to File>Preferences>Editor>File Types then select Files Opened In AssociatedApplications and add *.md to the list
when you open the md file it will ask if you want to open it with your favorite file editor select vs code
Alternatively you can use markdown editors separately. Here are few options:
MacDown for Mac
Typora
GhostWriter
Few more online editors:
StackEdit
Dillinger
Editor.md
Draft
In the Android Studio:
Find action (ctrl + shift + A / command + shift + A)
Search for Choose Boot Java Runtime for the IDE
Select the latest version in the "New" dropdown - e.g.:
11.0.16.8-2043.64-jcef JetBrains Runtime with JCEF
OK
Restart
Worked in:
Android Studio Electric Eel | 2022.1.1
Build #AI-221.6008.13.2211.9477386, built on January 11, 2023

Hide Android Studio file path

How can I hide the file path in android studio (it is captured on the screenshot)? I am talking about this:
app -> src -> main -> java -> com -> son...
Sorry for the stupid question but I didn't manage to find it it preferences and this path is not shown on my old mac with the same version of android studio.
On my Mac, I am able to hide the file path by going to the View menu, then unchecking the checkbox next to "Navigation Bar".

Android studio automatically open's documentation view

I don't know if it is bug or kind of setting, but it is very annoying while typing value i.e. android:layout_gravity="", it opens hints with dropdown, and after a while the documentation view gets opened and hides the dropdown with hints.
I checked that no button is suspended or anything like that. I use Ubuntu 14.04.
Strange, because I've not changed anything with AS from months and there was no such behavior before. There's solution:
Follow the simple steps to remove open Documentation by cursor move :
Android Studio -> File -> Setting -> Editor -> General
Right side of the screen go to Others :
Uncheck checkBox show quick documentation of mouse move & Apply.
Preferences > Editor > General > CodeCompletion > uncheck Auto popup feature
I found out that I don't want to disable the documentation.
Instead, I set the window to be 'Opened as Popup',
This displays the documentation aside to the cursor and autocloses it automatically.
Surely I've set it before as a 'Tool Window' to see the full content and then I forgot to set it back.
Note that this functionality has been moved recently. It's now in:
Android Studio -> Preferences -> Editor -> General -> Other.
Uncheck "quick documentation on mouse move".
Studio 3.4.2, somehow had setting checked, uncheck it.
File -> Settings -> Editor -> General -> Code Completion.
Cheers
This the only correct answer as far i know because i sorted out this way only. Just click on Help>find Action>auto(in the search box)> and uncheck the checkbox in the image shown
For Android Studio 4.x ~ Arctic Fox | 2020.3.1
Preferences > Editor > Code Editing > Quick Documentation > Show quick documentation on mouse move: unchecked

How to create my own 'Reformat Code' style in Android Studio?

In Eclipse,(Window -> Preferences -> Java -> Code Style -> Formatter) there was a facility to create my own format style and apply it in the code. Is there a way to do that in Android Studio(for Java code) ?
To change formatter options go to File | Settings | Code Style | Java
To reformat your code manually, press Ctrl + Alt + L (or using the menu Code | Reformat code...). To reformat the whole source code of your module, just select the module folder first.
More information about reformating source code can be found on the IntelliJ Web Help
In Android Studio 3.3.2 (running in Mac OS) "Android Studio" -> "Preferences" -> "Editor" -> "Code Style" -> "Java".
I would be useful to find a way to export/import only code format settings in order to share them between the team.
Open global settings/preferences via ⌘, or Android Studio > Prefences.
In the left hand side bar, go to Editor > Code Style.
open the scheme: drop down menu and select Default IDE.
Click the cog menu to the right of the drop down menu and select duplicate....
Then rename your new profile, and change the general settings as well as the settings for each language in the sub menu of Code Style as you see fit.
Then with you new profile selected, reformat your code with ⌘ + ⌥ + L
These style are global and can be used in other projects.
Same method applies for Code Cleanup too.

How do I run multiple instances of Android Studio

How do I run multiple instances of Android Studio? A second instance is launched if you select "File\New Project", but "File\Open" and "File\Reopen" does not create a second instance.
Your Android Studio was set to open project in the same window. You can change that, so it asks whether to open new window while opening other project.
Do this:
Go to: File -> Settings -> Appearance & Behavior -> System Settings -> Project Opening.
Check [x] "Confirm window to open project in".
Now open the other (2nd) project with File -> Open... etc.
You will now be asked if you want to open a new window or replace what you already have. Select New Window.
Screenshots:
Older versions:
Go to Settings -> General -> Project opening.
Check 'Confirm window to open project in'.
Create or open different project
You will be asked if open a new window.
There was an update in Android studio so the new solution would be:
go to >file
go to >settings
go to >appearance and behavior
go to > system settings
now in system settings check the "confirm to open project in" option
On Mac is:
Android Studio
Preferences
Appearance & Behavior
System Settings -> Project Opening -> Confirm to open project in
When you open other project, you will be asked if you want to open a new window or replace what you already have.

Resources