How can I open an existing Flutter project made by Android Studio on Mac-Os to export ipa version of app? Can it be done with Mac-Os version of Android Studio or I have to do it with X-Code? How?
Thanks in Advance
I could finally do that by accomplishing the following steps:
Copy the project into macOs (with X-Code Installed)
Open it by Android Studio (preferably latest version)
Enable Flutter and Dart plugin on Android Studio framework settings
Run command flutter packages get (Connection to Flutter repositories must be available)
Run flutter build ios --release as #Günter Zöchbauer truly commented
Connect iPhone device or simulator and run directly on your device
If some errors printed you may need to verify your developer account settings on X-Code or check Github page of your libraries for possible iOS issues
You can do it in XCode.
Ensure you run flutter build ios --release before you do.
Connection to physical iPhone device is not necessary. Run any sample project in xcode. Start a Simulator. (Only One simulator preferrably).
clone the repository from github into Mac (with X-Code Installed)
open terminal.
cd to your pubspec.yaml
flutter run (it will automatically run flutter pub get)
(It will launch on the already running iOS simulator)
follow steps on flutter.dev to install flutter. Above steps will only work from terminal if flutter doctor(any flutter command) is recognized
Related
I've developed an application with Flutter with Android Studio. Now I want to build the app for iOS. I installed xCode on my Mac and git cloned the repository from github in xCode. How could I open the project in xCode? If I try to open the folder i get "Unable to open the file".
With Xcode You can open ios specific part of the project which is located in ios/xcworkspace.
To open a Flutter project in Xcode, you first need to make sure that you have built the correct Flutter files for ios, so, first, run:
flutter build ios
And then open your file under the directory ios/MYPROJECT.xcworkspace
I don't really use the iPhone simulator, so I deleted Xcode. After deleting Xcode, when I try to run the app I get an error:
[chat_app] flutter pub get
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
Running "flutter pub get" in chat_app...
The current Flutter SDK version is 0.0.0-unknown.
Because chat_app depends on firebase_auth >=0.5.0 which requires Flutter SDK version >=0.1.4, version solving failed.
pub get failed (1; Because chat_app depends on firebase_auth >=0.5.0 which requires Flutter SDK version >=0.1.4, version solving failed.)
exit code 1
Is there a way to tell Flutter to skip the iOS build and only build for Android?
When You Create The Project You can Tell Flutter to Create Project For Specific Platforms using --Platform option,
if You did'nt do so ,then you have to select emulator as a target Device to build , and it will not build for IOS by default,
Is it possible to work on a flutter project from Mac and Windows at the same time ?
Same time in the sense, work on Mac and test with iOS. later access the folder from windows and test windows device without copying the project folder? may be by storing project on a shared space ?
Any Help will be highly appreciated as I'm trying to develop an app that should work on iOS,android and Windows.
Write code (on Windows or MacOS) and push it to GitHub
Clone your app (on MacOS or Windows)
$ git clone https://github.com/myUserId/myApp.git
$ cd myApp
Make sure You've downloaded the app's dependencies
$ flutter pub get
[Modify the iOS version of the app as necessary]
Build it ($ flutter build ios) or run it ($ flutter run)!
I don't see any problem there. If from your Windows and MacOS device you can both access the project (on a shared folder for exemple) you should have any problem running Flutter on both of your devices.
You may want to use something more "easier" like a GitHub project where you only have to git pull the changes made.
I got stuck in this problem for several days, my android studio suddenly keep showing 'Loading...' on its device selector when there are active android emulator or connected to android device.
i use mac os catalina 10.15.5 and here is some clue that might help :
siekoo-mac:~ siekoo$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.4, on Mac OS X 10.15.5 19F101, locale en-ID)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS
development.
Download at: https://developer.apple.com/xcode/download/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin
code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install:
sudo gem install cocoapods
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.47.0)
[✓] Connected device (1 available)
siekoo-mac:~ siekoo$ adb devices
List of devices attached
16fb14c20205 device
Ive tried several solutions, like run invalidate & cache restart on android studio, reinstalling adb platform tools, reinstalling android SDKs or even downgrade/upgrade the android studio, all doesnt end with good result. For now, i run my project on android device via terminal
In my case it was due to different compile and target SDK versions inside app level gradle and library gradle. It was resolved by changing sdk versions from 26 to 29 in both.
Open another android project in new window (not a flutter project). Now you have two windows of android studio.
then device will detect on Android project. You will be able to connect your device for native android project. Then try again to detect device on flutter project.
Your device will show here.
This worked for me.
maybe
Open in Android Studio - Preferences | Languages & Frameworks | Flutter
Set path SDK .../SDK/flutter
I just start learning react-native. when I trying to run the react-native run-android command it is showing error about android emulator.
Please help me to run my first react native app on Genymotion.
simple way:
first connect and android device or run an android emulator then do this steps
1- open android studio
2- click on File->open->navigate to to your react-native project and choose android folder
3- comeback to cmd and run react-antive order again
4- react-native run-android
in gradle-wrapper.properties change distributionUrl=https://services.gradle.org/distributions/gradle-6.3-all.zip
from 5.x
First of all you have to installed genymotion plugin on android studio. After that please run genymotion emulator.
And please open android studio and android project of created RN app.
The relevant gradle version will be downloaded and synchronized.
And then run command "react-native run-android".
Steps to setup for React Native with GenyMotion on MAC Machine
Installed Android Studio
Installed Genymotion
Pointed Genymotion settings custom SDK to: /Users/myusername/Library/Android/sdk
Added path to adb tool directory in .bash_profile to: PATH="/Users/myusername/Library/Android/sdk/platform-tools:${PATH}"
Restarted terminal for path to take effect
Ran exp path in terminal to copy path to exp
Ran adb in terminal to make sure it could find adb in platform-tools directory
Restarted Genymotion
Created and started virtual device in Genymotion
Started Expo XDE and started project
Ran Open on Android from XDE
App started on virtual device created in Genymotion (step 9)
after these steps,
on Terminal fire : npm run android
This has worked for me !