Steps to Reproduce
$ flutter create myapp
$ cd myapp
# add `battery` to `dependencies` in `pubspec.yaml`
$ flutter run
Logs
myapp $ flutter run
[ +22 ms] [/Users/thill/src/mobile/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +23 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/dev
[ ] [/Users/thill/src/mobile/flutter/] git rev-parse --abbrev-ref HEAD
[ +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] dev
[ ] [/Users/thill/src/mobile/flutter/] git ls-remote --get-url origin
[ +5 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ ] [/Users/thill/src/mobile/flutter/] git log -n 1 --pretty=format:%H
[ +13 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[ ] 3ea4d06340a97a1e9d7cae97567c64e0569dcaa2
[ ] [/Users/thill/src/mobile/flutter/] git log -n 1 --pretty=format:%ar
[ +8 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[ ] 3 days ago
[ +1 ms] [/Users/thill/src/mobile/flutter/] git describe --match v*.*.* --first-parent --long --tags
[ +8 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[ ] v0.1.5-0-g3ea4d0634
[ +103 ms] /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[ +32 ms] Exit code 0 from: /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString
[ ] 3.0
[ +84 ms] /Users/thill/Library/Android/sdk/platform-tools/adb devices -l
[ +11 ms] Exit code 0 from: /Users/thill/Library/Android/sdk/platform-tools/adb devices -l
[ ] List of devices attached
FA75P0306014 device usb:340787200X product:sailfish model:Pixel device:sailfish transport_id:1
[ +8 ms] idevice_id -h
[ +68 ms] Found plugin battery at /Users/thill/.pub-cache/hosted/pub.dartlang.org/battery-0.1.1/
[ +88 ms] [/Users/thill/src/mobile/myapp/ios/Runner.xcodeproj/] /usr/bin/xcodebuild -project /Users/thill/src/mobile/myapp/ios/Runner.xcodeproj -target Runner -showBuildSettings
[ +4 ms] Exit code 1 from: /usr/bin/xcodebuild -project /Users/thill/src/mobile/myapp/ios/Runner.xcodeproj -target Runner -showBuildSettings
[ ] xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
[ +11 ms] "flutter run" took 365ms.
Oops; flutter has exited unexpectedly: "Exit code 1 from: /usr/bin/xcodebuild -project /Users/thill/src/mobile/myapp/ios/Runner.xcodeproj -target Runner -showBuildSettings".
[ +19 ms] Sending crash report to Google.
[ +20 ms] /Users/thill/Library/Android/sdk/platform-tools/adb -s FA75P0306014 shell getprop
[ +585 ms] Crash report sent (report ID: 834f8b387866efb6)
Crash report written to /Users/thill/src/mobile/myapp/flutter_04.log;
please let us know at https://github.com/flutter/flutter/issues.
[ +248 ms] ensureAnalyticsSent: 0ms
[ ] exiting with code 1
$ flutter analyze
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
Oops; flutter has exited unexpectedly: "Exit code 1 from: /usr/bin/xcodebuild -project /Users/thill/src/mobile/myapp/ios/Runner.xcodeproj -target Runner -showBuildSettings".
Sending crash report to Google.
Crash report sent (report ID: 28f445f00f521b0c)
Crash report written to /Users/thill/src/mobile/myapp/flutter_05.log;
please let us know at https://github.com/flutter/flutter/issues.
Flutter Doctor
myapp $ flutter doctor -v
[✓] Flutter (Channel dev, v0.1.5, on Mac OS X 10.12.6 16G1114, locale en-US)
• Flutter version 0.1.5 at /Users/thill/src/mobile/flutter
• Framework revision 3ea4d06340 (3 days ago), 2018-02-22 11:12:39 -0800
• Engine revision ead227f118
• Dart version 2.0.0-dev.28.0.flutter-0b4f01f759
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/thill/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[!] iOS toolchain - develop for iOS devices
✗ 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
✗ libimobiledevice and ideviceinstaller are not installed. To install, run:
brew install --HEAD libimobiledevice
brew install ideviceinstaller
✗ ios-deploy not installed. To install:
brew install ios-deploy
✗ CocoaPods not installed.
CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
For more info, see https://flutter.io/platform-plugins
To install:
brew install cocoapods
pod setup
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] VS Code (version 1.20.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.9.0
[✓] Connected devices (1 available)
• Pixel • FA75P0306014 • android-arm64 • Android 8.1.0 (API 27)
! Doctor found issues in 1 category.
Understandably to reach platform-specific functionality I need to tooling to target said platform but in this instance I do not care about / do not want to setup iOS dev so should be able to run this for Android-only.
Is it possible to flutter run for only a single platform?
As-is I do not have an Apple ID for work, which means an Xcode installation is not possible, so cannot proceed with building an app using the battery package.
Steps to Reproduce
Logs
Flutter Doctor
myapp $ flutter doctor -v [✓] Flutter (Channel dev, v0.1.5, on Mac OS X 10.12.6 16G1114, locale en-US) • Flutter version 0.1.5 at /Users/thill/src/mobile/flutter • Framework revision 3ea4d06340 (3 days ago), 2018-02-22 11:12:39 -0800 • Engine revision ead227f118 • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759 [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) • Android SDK at /Users/thill/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-27, build-tools 27.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [!] iOS toolchain - develop for iOS devices ✗ 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 ✗ libimobiledevice and ideviceinstaller are not installed. To install, run: brew install --HEAD libimobiledevice brew install ideviceinstaller ✗ ios-deploy not installed. To install: brew install ios-deploy ✗ CocoaPods not installed. CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side. Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS. For more info, see https://flutter.io/platform-plugins To install: brew install cocoapods pod setup [✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] VS Code (version 1.20.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Dart Code extension version 2.9.0 [✓] Connected devices (1 available) • Pixel • FA75P0306014 • android-arm64 • Android 8.1.0 (API 27) ! Doctor found issues in 1 category.Understandably to reach platform-specific functionality I need to tooling to target said platform but in this instance I do not care about / do not want to setup iOS dev so should be able to run this for Android-only.
Is it possible to
flutter runfor only a single platform?As-is I do not have an Apple ID for work, which means an Xcode installation is not possible, so cannot proceed with building an app using the
batterypackage.