Flutter UI Guides not showing in Android Studio - android-studio

In Android Studio V4.1.3 (build no. Al-201.8743.12.41.7199119) The Flutter UI guides for widgets and methods not showing at all even though it is enabled in the settings. Please, be kind to see the screenshot =>
no Flutter UI guides
I have Flutter Plugin V55.1.1 and Dart Plugin V201.9335 installed.
All your help is highly appreciated.
Thank you

You might be creating the new Flutter project and selecting Java for Android. But when you select Kotlin and create project. The issue will be fixed.
And if you want your old projects to be converted to Kotlin, just open the terminal in that project and run this
run flutter create -a kotlin .
The dot(.) at the end is also important it will generate the Kotlin files in current directory.
After this, just re-open the project, you'll get the guides.

I have the same android studio version as you and Flutter Plugin V55.1.1 and Dart Plugin V201.9380 installed. Getting the same issue. I have even tried to enable and disable the "Show UI guidelines for build methods" in Setting > Language & Frameworks > Flutter, but nothings work.
I cloned flutter/sample from GitHub and it seem that the UI guides is showing on that samples project.
My current (kinda easy cheat) solution right now is by creating a New Flutter application project via VS Code. And when I open that flutter project on Android studio, the UI guides is there. I have configure my VS Code with the recommended setting for Dart code.
Tutorial to configure your VS Code reference: https://youtu.be/nAmOt5_fMtU?t=278
I'm pretty new in flutter development but I'm pretty sure there might be something that we can configure on Android Studio seeing that generated project file from VS Code does shows the UI guideline. If someone know how do let me know. Cheers!

Related

How to configure an iOS Application for Kotlin Multiplatform in Android Studio?

I want to add a Run/Debug Configuration for an iOS Application for a Kotlin Multiplatform Mobile application in Android Studio 4.1.2. However, there seems to be a problem with the configuration for iOS.
In the screenshot below you can see the problem. In the dialog "Run/Debug Configuration" Android Studio complains about
Error: Please specify Xcode project location in xcodeproj property of gradle.properties
Using the "Fix" button does not solve the problem. Android Studio just adds an additional xcodeproj to gradle.properties and the complains about a duplicate parameter.
I also tried different paths (relative and absolute) for xcodeproj. No luck.
If I remember correctly, it used to work out of the box. A new Kotlin Multiplatform Mobile project was automatically configured for Android and iOS. I'm not sure what changed. Probably something was updated.
Is this a bug with the KMM plugin? Or is there something I can do on my system to fix this?
don't do that with Android Studio.
Just open Xcode, click on 'open another project...', locate to the iosApp folder that named it when creating your project on Android Studio.
after that, just click run and have fun.
If the project doesn't run right away even on opening it from Xcode and shows the shared framework is missing, Then try generating the shared framework for iOS platform using terminal. Navigate to the project folder and execute
Command: ./gradlew packForXcode
Now the shared framework should have a xcode-frameworks product and you should be able to build and run the project through Xcode.
I fixed it by downgrading the Kotlin version from 1.4.30 to 1.4.21. You can check this thread here. To downgrade, download the version you want from the plugin store and choose the install plugin from disk as in the picture below
Upgrading Android Studio version to 4.2.1, KMM plugin version to 0.2.6, creating new KMM project with KMM plugin, the problem can be fixed automatically.
If you don't wanna use Xcode:
Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.
What worked for me was to download the latest Canary Android Studio and setup my KMM project there.
Hopefully soon this will be stable for the next versions
Same as here: https://stackoverflow.com/a/66941077/3117650
Look like there is some IDE issues in this versions, one option would be to downgrade the Kotlin version.
What worked for me was to download the latest Canary Android Studio and setup my KMM project there.
Hopefully soon this will be stable for the next versions

How do I migrate my Flutter project from vscode to Android Studio?

I created my Flutter project by typing into my CLI Flutter create project_name and all this time I've been coding using VScode, and the project is near completion, which means I have to do a software demo in the coming days to my professors in university. However, I would need to open multiple android emulators that will run the same project, based on my brief research and testing, VScode does not allow running multiple android emulators that run the same project. So I have to transfer that project from VScode to Android Studio.
I've tried simply opening my Flutter folder in Android Studio and I'm getting gradle build errors. Any help would be appreciated thank you!
As long as you have the Flutter plugin installed in Android Studio, you can just open the folder like any other.
Though FWIW, I don't know if Android Studio supports debugging on multiple devices at the same time. It does work in VS Code (as shown at Flutter Interact with the "Flutter Octopus") if you're on the master channel (see https://github.com/flutter/flutter/wiki/Multi-device-debugging-in-VS-Code).

Flutter users should run `flutter packages get` instead of `pub get`

I got a flutter project to complete from my friend.
I am using Android Studio(AS) as editor. I have installed flutter and dart plugins in AS. Now, I have imported the flutter project by selecting option at start of AS import AS project. Then it I don't know why it shown me error message to setup Dart SDK(Q1: my first question is why it is giving error I already have dart plugin). Somehow I managed to get Dart from this link and gave path to till dart-sdk folder as seen in screenshot
And now I am stuck on this error:
Because xxo_tag_xxxls depends on flutter_test any from sdk which doesn't exist (the Flutter SDK is not available), version solving failed.
Flutter users should run flutter packages get instead of pub get.
you should configure in addition to the Dart language SDK, pointing to the Flutter SDK ('C:\src\flutter') within your Andoid Studio project. Go to the top menu 'Tools > Flutter > Flutter Clean' and the IDE will ask you to configure what is missing.
in mac if you are using android studio, go to android studio at the top left, preferences, flutter, then add path to sdk
you have to configure in addition to the Dart language SDK, pointing to the Flutter SDK ('C:\src\flutter') within your Andoid Studio project. Go to the top menu 'Tools > Flutter >flutter package get and click on it ,it will find the things those are missing.

Android Studio 3.1.3 having issues with Constraint layout, Error Failed to find style 'coordinatorLayoutStyle' in current theme

This is the issue i am getting.
Error not rendering issue
i tried all the options available on the web. it is a new installation of studio 3.1.3 and it is happening for every new project as i did not test with any old project as i do not have one.
steps to recreate is to clean installation of android studio 3.1.3 and create a new project. i tried to create multiple projects but same issue.
i tried all the options available on Android Studio 3.1.3 having issues with Constraint layout link but all are failing.
any one let me a studio version name where i will not get this issue. i just wanted to develop a app. and i am not a andriod developer. so these issues are very annoying for me.
Have the same problem. I think it's from Android SDK Platform 28 so I uninstall it, and use Android SDK Platform 27 and it work for me.
To uninstall : Tools> SDK Manager> System setting> Android SDK> Show package detail(little
box on the right below corner)> Put out the check sign from Android SDK
Platform 28 > apply and try new project.
Note : Sorry for bad English.

How to get the list of installed/non-installed dependencies in Android Studio

I am currently using some libraries (e.b. material design lib) to create apps.
I want to set the minimum SDK to 5.0, but it cannot be done because the version of that library is higher.
My question is how can I know the list of installed/non-installed dependencies(e.g. com.android.support:design) provided by Google in android studio(like SDK manager) or not?
Honestly, I was using the Eclipse IDE for developing android apps, and now I switch to Android Studio. It is difficult to me to use Android Studio. Is there any resources to learn more detailed about the usage of Android Studio?
My question is how can I know the list of installed/non-installed
dependencies provided by Google in android studio(like SDK manager) or
not?
At first make sure in the left panel Project is selected.
Then right-click on your appropriate project name and select Open Module Settings
There you will see the Dependencies tab that you were searching for. There you will explore the options to add or remove dependencies or shifting them up or down in the easiest way. Hope you will find Android Studio more interesting then Eclipse gradually.
Is there any resources to learn more detailed about the usage of
Android Studio?
The official android developer site of Google is well enough to learn Android Studio in details. Everything is there. Still you can also go for tutorialspoint tutorial about Android Studio.
Links:
https://developer.android.com/training/index.html
https://www.tutorialspoint.com/android/android_studio.htm

Resources