I am a new flutter developer I use android in my practicing when I was using an old version I was able to create dart packages from menu add package
Now I just found a directory instead of packages does it the same? If not, how can I find a way from the menu to create a dart package in flutter
I didn't try this version before
Related
hello i am beginner in flutter, i want ask
i cant create project flutter, how to fix this?
i have all check in flutter doctor
flutter doctor image
and already install dart and flutter in android studio
plugin image
and then android support already enable to
android support image
so what i must do? because i cant make new flutter project
make flutter project image
When you making the flutter project you can't make it without flutter SDK path.(Path which you installed the flutter directory). if you didn't
installed it, first install it.
Browse the folder path of flutter SDK
Select the folder path
for more details,
Click the link - Flutter docs
I am new to flutter and android studio and have been following a tutorial on creating flutter apps. However, I am not able to create a new flutter project but I am unable to find the button to create the new project. Do I have to install anything else? Thank you so much in advance.
[Android Studio main screen]
Only Android Studio 3.2 allow to create project in direct.
So you can create it with Intellij Idea or command flutter create project_name
First, Go to 'Configure',
there tap 'Plugins'.
Find and download Flutter and Dart plugins.
Now you should have that 'create new Flutter Project' button. You're welcome.
I am trying to get an updated list of my plugins to show up on Android Studio in External Libraries under Flutter Plugins. For some reason, newly added plugins (added to pubspec.yaml) do not show up here.
I need it because it enables me to open the plugin library files and see how it is written for easily getting the examples listed in the plugin.
Is there a command I can run on Android Studio terminal or something I can do to refresh the list?
You should follow the official documentation for how to use an upgrade your pubspec.yaml:
From the terminal: Run flutter pub get.
From Android Studio/IntelliJ: Click Packages get in the action ribbon at the top of pubspec.yaml.
From VS Code: Click Get Packages located in right side of the action ribbon at the top of pubspec.yaml.
I'd also recommend you to do flutter clean from the terminal and run flutter pub get to be extra sure everything updated correctly.
I'm building a flutter app which uses a third party plugin.
The plugin has a bug in its android java code.
The problem is that I'm having trouble finding documentation on how to setup a development environment to debug the plugin from within my app.
I should note that the original developer can't reproduce the bug and hence I need to get it running within my app.
The instructions I've found so far involve having to build an apk, but this is time consuming and seems like its shouldn't be necessary.
I'm an experience java and dart programmer so I'm not having trouble with the basics (i.e. I have Android studio and vs code running and I can debug the plugin using its own sample code).
This is the process I have so far:
git clone the plugin to my local system.
Within my application add an override in my apps pubspec.yaml to
import the plugin from my local system.
dependency_overrides:
flutter_sound:
path: ../flutter_sound
Build my app so we can open in android studio.
Note: I had to delete my .pub-cache/hosted folder and then run
'flutter pub get' as some older (unused?) packages seem to stop
the build. I also ensure that I had the latest packages for
every package I was using.
flutter build apk
In android studio
Import my app project
- open the android project contained with my app project folder.
e.g.
~/git/app/android
Wait for the gradle build to complete.
Start the android studio debugger and select a simulator.
Open the 'Android Monitor' tab at the bottom of Android Studio.
So I managed to get this working.
There may be some steps superfluous to the process but I've included them all here as I've not had time to go back and work out which ones aren't required.
Note: a plugin is always contained within a dart 'package'.
git clone the third party package (flutter_sound in this example) to your local system.
Within your application's pubspec.yaml add an override to import the package from your local system.
dependency_overrides:
flutter_sound:
path: ../flutter_sound
Update your dependencies:
pub upgrade
Build your app so we can open in android studio.
Within the apps project root dir (where your pubspec.yaml is located) run:
flutter build apk
From android studio
Import your app project
Wait for the gradle build to complete (this took a couple of minutes).
Find the 'android' folder within your application project (from within the Project panel in studio).
Right click the android folder.
Select 'Flutter -> Open Android module in Android Studio'
When prompted tell Android Studio to open the Android Module in a new window.
Wait for the gradle build to complete.
Start the android studio debugger and select a emulator.
Open the 'Android Monitor' tab at the bottom of Android Studio.
You should now be able to set break points in your java code.
Good luck.
I am up to create a new flutter project. But when i do Android studio throws me a error stated in the image below.
And here is the flutter doctor from cmd
PS:- Older flutter projects are working totally fine
I faced the same problem so right now i use Visual Studio Code https://code.visualstudio.com/
Very light compared to Android Studio and easy to use
if you want to use it you should add these extensions
- dart
- flutter
- flutter Files(optional)