Adobe XD element export to flutter issue - android-studio

The Issue
After I installed Flutter Export in Adobe XD and Flutter and Dart in Android Studio, I wanted to Export All Widgets in XD. After attaching the right folder in the upcoming window the following text shows up: " Could not find dependencies entry in pubspec.yaml for : adobe_xd." Any suggestions how I can add it into the .yaml file? Because all of my tries failed. Thanks for responding <3

You need to add the adobe_xd https://pub.dev/packages/adobe_xd package into your Flutter project's pubspec.yaml file

Related

Can't understand Gradle settings file,please add the path 'aar_file_name' manually error in flutter

I want to add .AAR file into my flutter project. How to add .AAR file ?? please help
I follow this steps in my android studio but it not work
File --> New --> New module --> import JAR/AAR package
it give this error
Can't understand Gradle settings file,please add the path
'aar_file_name' manually error in flutter
Open the andriod Module
enter image description here
Then import aar file in the andriod module.
I faced the same issue. In my case, it was missing settings.gradle file. Make sure that the file exists at your project root. If not, just create an empty file and try again. This worked for me.
In my project open android module in android studio was disabled due to lost of xxx_android.iml file in android directory After
adding xxx_android.iml file I could able to add my xxx.aar file in to project

Flutter in Android Studio: Build Bundle/APK greyed out

I installed Flutter and Android Studio following this link here:
https://flutter.dev/docs/get-started/editor
I've been coding in flutter for two months now and can run my app in simulator or on a connected device no problem.
But when I try to actually build an apk via "Build" --> "Build Bundle(s) / APK", this option is greyed out.
Android Studio: 3.3.2
You can't build apk using Build option in Android Studio if you are running your Flutter project.
There are 2 solutions to build it.
In terminal, write flutter build apk (this will build apk for release version not the debug version)
Open your module in Android Studio and you can use Build option of the Android studio to build the debug apk.
For option 2, you can go to build.gradle file and you should see an option in Android Studio asking you to open the module separately (see the screenshot) Tap on this option and you can then build your apk in both debug and release mode.
I realize this might have already been answered, but I have another solution to this issue. I was having the same problem after modifying my pubspec.yaml file, so after trying to build within terminal nothing would happen. Apparently, you have to open the .yaml file within Android Studio from your project directory in order to for AS to realize that there's been a change to the file. After I opened the file from the project folder, the option for Build > flutter > Build Bundle(s) /APK > Build App Bundle finally reappeared again. Just sharing my experience and hope it can help someone else who may come across this rather strange issue.
Reopen the project from your projects directory, not from recent projects option. This solved for me
Please follow these steps:-
Go To Project Structure>Project>NOSDK
Change NOSDK to the latest
ANDROID API PLATFORM
Then go to MODULE and DO THE SAME

Flutter project : no Android highlighting

I have my flutter project running and compiling. Dart mistakes are highlighted and android studio make some proposition to fix it.
But There is nothing similar deeper in my android folder (ex: ./android/app/src/main/java/com/path/MainActivity.java). I have to compile to see errors and correct them one after the other.
To develop the Android and iOS parts of your application you can simply open the corresponding modules.
Either:
from the window toolbar: Tools -> Flutter -> Open for Editing in Android Studio
or right click the 'android' folder, Flutter -> Open Android Module in Android Studio.
The problem is caused by missing .iml project files.
These files are added automatically to the .gitignore file,
to avoid that in the future just edit .gitignore and remove .iml
this is already an open issue in the flutter repository.
to add those files again to your project just write :
flutter create .
the missing files will be added.

ios/mac - Android Studio: Flutter SDK path doesnt set

Steps to Reproduce:
1. Open Android Studio IDE on Mac (Flutter plugin already installed)
2. Android Studio > Preferences.. > Language & Frameworks > Flutter
3. Section SDK: Set Flutter SDK path
4: Press Apply
Expected:
Path should be set and remain in the text box
Actual:
Path disappears from Flutter SDK path text box, no path is set and cant go on programming
As I work on a group project, i regulary have to pull from github. After every pull, i had to reset the Flutter SDK path (dont really know why but it kept disappearing). It used to work just fine until some days ago, the behavior explained on top started. Any help would be really appreciated!
Video: http://sendvid.com/vlt9ykpz
If someone else has the same problem: Deleting the local copy and pulling the whole project from git again fixed the issue in my case. Just dont forget to copy your local changes as the would be deleted aswell
I ran into this while moving the location of the Flutter SDK.
After all the files were in place, restarting the IDE showed the correct path after it had been disappearing before restart.
C:\dev\tools\flutter_sdk\flutter (folder that contains flutter\bin)
Don't commit the android/local.properties file (add it to .gitignore)
or update the path using flutter config --android-sdk path after checkout.
having the same issue on ubuntu 20, installed flutter with snapd

Flutter: How to import existing Flutter project, as a gradle project

How to import existing Flutter project, as a gradle project? 'Import Project' wizard asking for Gradle home path.
I have gradle, installed in my system. But what (which path) needs to set here.
Here is, what I'm trying:
Error
I had also gone through this problem where I have to import the existing Flutter project in Android Studio. I was able to import the project following below steps:
Open Android Studio
Goto File -> Open -> In Open File or Project window select the project you want to import.
Once you have done above steps try to resolve warnings shown in the log window. Warnings may be like update dependencies used in the project, etc.
Hope it will help you out.
I faced the same issue.
The gradle home directory (on my Windows machine) is located under:
C:\Program Files\Android\Android Studio\gradle\gradle-4.1
(please check the gradle version).
This will allow you to open the project. Then, you will most certainly need to "upgrade to gradle".
If this does not fully work, you might also consider using Visual Studio Code, which makes the "import" much easier: simply open the folder where you project resides. Optionally, you will have to resolve missing packages (-> Fetch packages). It should then be possible to run the project.
Hope this helps.
File - Open - Select the project root directory
Open Flutter settings from the tip menu - Click the pull-down menu, then flutter sdk dir appeared
Run
Or you can just use the flutter run command after step 1.
If you first add the flutter plugin for Android studio, then you can directly import the project as an Android Studio project and it should work fine.
In my case, having Android Studio 3.4.2 and Flutter 1.7.8, I only needed to:
1 - Open the project with the option "Open an existing Android Studio project".
2 - Run "flutter pub get" to get the packages listed in the pubspec.yaml file.
3 - Run the project with "flutter run"
If you are using Google services, don't forget to add your google-services.json file in your project. In another case, the project will fail without a clear message when you try to run it.
For Import exiting Flutter project.
Please choose Import Project because of Android Native application mean import use of android app only.
So use File -> Open -> Select Project root directory.
After open if ask for dependencies then Choose to Get dependencies

Resources