How to show "External Libraries" node in Android studio like it is shown in IntelliJ IDEA? - android-studio

I need to show "external libraries" widget Android studio like it is shown in Intellij.
In Intellij we have:
but in Android studio for some reason external libraries widget is missing.
and "select the opened file" button does not work.
How to make it work?

Android Studio is using the Android view by default for the Project View tool window, you can switch it to the Project view to see the same list of dependencies as in IntelliJ IDEA:

Related

How to make my emulator shows up outside of my android studio?

Recently, I updated my android studio to bumblebee version, and when I run my codes, I realized that my emulator are shown inside of my android studio instead of creating a new window for the emulator. you can see what I mean, here.
does anybody knows how to fix this? I already tried to change the settings but nothing is changed. should I reverse the update?
I had the same issue, to resolve it do the following:
In Android Studio: click on
File,
Settings,
Click on the Tools dropdown,
Emulator,
uncheck the "Launch in a tool Window" box
Settings with Launch in a tool window checkbox

How to open an existing Flutter Project in Android Studio

I might sound noob here but I can't see a clear way of opening existing Flutter Project in Android Studio 3.1.2.
I checked this but it didn't work. So I want to know if there is a standard IDE way of doing this? I also can't find any docs clearly mentioning it. Do I need to install a 3rd party plugin?
After opening it as an Existing Android Studio Project, I get the following error:
The error is solved by running Get Dependencies. Is it a normal behavior?
Install Flutter plugin for Android studio: https://flutter.io/get-started/editor/
Open Android Studio
Open existing Android Studio project by using one of below methods:
EASIEST WAY: Drag your project folder and drop to Android Studio.
Other ways:
What works for me was to open existing Android Studio project like mentioned above, and then go to menu
Tools -> Flutter -> Flutter Clean
Then configuration window will open and ask you to locate flutter sdk. After locating the sdk, click OK and then the flutter functions will be available (Pub buttons, runs menu). After that you can proceed to get the dependencies (pub get).
It's basically cleaning the project folder of previous setting(s) which might conflicting with the system (android studio). But that won't happen if you get the project from source repository because all of the junk files wont be in the project folder.
The quickest way on macOS is
open -a Android\ Studio android when you are in the root project directory.
Alternatively, if you use the jetbrains toolbox, you can enable "Shell Scripts" in its settings. This will create a binary in the folder of your choice, so you have to add this folder to your PATH. Then, you can use studio . inside the Android folder, or studio android in the flutter project. The benefit of this, is it also works with other Jetbrains products (e.g. charm project_dir or clion project_dir. Unfortunately this method glitches out (for pycharm at least).
Looks like Android Studio can't load Android Application module from Flutter project automatically. I also have same problem, so in my situation Gradle can't be found, because of lack of Android project.
There's important note from official site:
Important: Do not use the New > Project from existing sources option for Flutter projects
I suggest, same is for Open option.
Just Open your project as normal, and then in [Android Studio > Preferences > Languages&Frameworks > Flutter > Flutter SDK path] select the path where you downloaded & unpacked Flutter SDK.
I know it's already late, but you can open an existing Flutter project in Android Studio by following these steps (make sure you have already installed Flutter & Dart plugin and Flutter SDK):
Click Open from File menu in Android Studio,
Go to the path of the project,
Click Open from the dialog,
When the project opens in Android studio, it will show an error of packages and dependencies. So, click on Get Dependencies on the top. Android Studio will automatically add all the required dependencies and packages.
There is a simple way of doing this in android:
Just Open your project as normal, and on the top right corner, click on Flutter Attach option, and voila!
See Attached screen grab!
Usually you can open your Flutter project in Android Studio simply when you right click on the android folder > Flutter > Open Android module in Android Studio but sometimes this option could be disabled, check this answer to enable..

Gradle window in missing in android studio for my flutter project

The gradle window is missing in the android studio for my flutter project but it is available for my Kotlin project.
I have to generate the signing certificate SHA-1 to register my app in Firebase.
Here is how you find the gradle section in Android Studio for a Flutter-Project:
Open the build.gradle file in app/src/
There should appear a small bar at the top of the code-editor and click Open for Editing in Android Studio
A new window will open, showing the option for opening the gradle section in the side-panel, as expected.
This answer is giving you a quite extensive explanation for then generating the SHA1-fingerprint.
The problem for Android Studio is that the android(gradle)-project is not top-level.
You can right-click on project- or android-folder, select Flutter->'Open Android module in Android Studio' .
After that the gradle-tab appears on the right and you can use it as intended.

Android Studio - Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha1

Screen Shot #1 - Android Studio Project Gradle Build View
Screen Shot #2 - Android Studio Project Gradle Sync View
Going through the "Android Studio 2.2 Development Essentials book" and following along with the tutorial in chapter 3. Everything was OK until I completed a task in the Development Essentials book (chapter 3, page 24 in book) that said,
As we can see from the component tree hierarchy, the user interface
layout consists of a layout parent with a single child in the form of
a TextView object. If Android Studio has used a RelativeLayout manager
for the project, the first step is to convert it to a
ConstraintLayout. ConstraintLayout is a new and flexible layout
manager that is used in most projects in this book. To achieve this
conversion, right-click on the content_android_sample entry in the
Component Tree and select the Convert RelativeLayout to
ConstraintLayout menu option as shown below:
Upon completion of the above quoted tutorial task (in chapt. 3 of the Development Essentials book), an error was presented that said:
Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha1
Also, a rendering error was listed as well that said:
Rendering Problems The following classes could not be found:
- android.support.constraint.ConstraintLayout (    Add constraint-layout library dependency to the project, Fix Build Path, Edit XML, Create Class)
Any thoughts on how to fix this? Please see screen shots attached (above). I'm new to Android Studio.
Thank you very much for your time.
I am using the following OS and Android Studio version below:
Win7 professional 64 bit OS
Android Studio 2.2
Build# AI-145,3330264, Built on October 6, 2016
You need add check in..
exist a icon with name "SDK Manager" just click
open Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools
And in this dialog add:
ConstraintLayout for Android
Solver for ConstrainLayout
Then, here only you need close and open Android Studio.
Maybe only you can update to:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
Or update your dependency to:
compile 'com.android.support.constraint:constraint-layout:latest_version'
This should solve your error. Go to your build.gradle and change your implementation 'com.android.support.constraint:constraint-layout:1.0.0-beta7' to implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta7' or to any latest

Android Studio can no longer add SDKs, only JDKs. Why?

I've upgraded Android Studio from 0.8.* to 1.0.0 RC2 and finally 1.0. Somewhere between the RC2 and 1.0 Android Studio seems to have lost most of its references to the Android SDK.
Some indicators of this are:
All Android SDK tools have disappeared from the toolbar
No longer possible to attach the debugger or run apps from within Android Studio
In 'Project Structure', the SDKs list shows a list of previously added SDKs but when pressing '+' to add an SDK it only allows me to add JDKs.
In 'Project Structure', the previously added SDKs show "Unknown SDK home path" with a path to the location of the Android SDK. Editing the field with the '...' gives me a "Select Home Directory for Unknown SDK" and pointing to an Android SDK location and pressing OK shows a warning dialog saying "The selected directory is not a valid home for Unknown SDK".
The 'android' facet is an unknown facet type
How do I make Android Studio recognize the Android SDK again?
After a few hours of research (uninstalling and re-installing) I worked out how to fix it but still I don't know how it happened.
These are the steps:
Close your current project
Go to Settings
Click on Plugins
Enable Android Support
Follow the wizard
If you are on Windows, you can right-click the toolbar, and select Customize Menus and Toolbars -> Main Toolbars -> Android.MainToolBarActionGroup. You can also select the SDK Manager and AVD Manager from the Main menu.

Resources