Appium doctor not in approval of my ANDROID_HOME - appium

I have installed android SDK at root level in my ubuntu system.
/root/Android/Sdk
While running appium doctor it says the below:
✖ ANDROID_HOME is set to '/root/Android/Sdk' but this is NOT a valid path!
Please help

Related

Downloaded executables cannot execute on host - MacOS Monterey 12.4, Silicon Chip

I was recently trying to run my flutter app. However, when I tried to do so, I got the following error:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=3):
Application launch for 'com.[redacted]' did not return a valid pid
nor a launch error.
No such process
Command: /usr/bin/arch -arm64e xcrun simctl launch AA375D1F-5CFC-4D1B-B367-
4CB98488D7DA
com.[redacted] --enable-dart-profiling
--enable-checked-mode --verify-entry-points --observatory-port=0
Error launching application on iPhone 13.
To try and fix this, I ran flutter doctor, where I got the following errors:
See https://github.com/flutter/flutter/issues/6207 for more information
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
I have already tried uninstalling and reinstalling flutter, and I am still getting the same error. I am genuinely confused as to why this happening, and I would really appreciate some help. Thank you in advance!
After running this command: $ sudo softwareupdate --install-rosetta --agree-to-license,
the problem appears to have been fixed. I ran flutter doctor, and this was the output:
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Community Edition (version 2022.1.2)
[✓] VS Code (version 1.67.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
(Ignore the android issues- I intentionally did not install them).
I was getting the same error on my mac M1.
looks like,rosetta was not installed properly.
Install rosetta using.
sudo softwareupdate --install-rosetta --agree-to-license

Flutter run xcode build fails but building directly with xcode succeeded

I'm new to iOS development and I ran into this problem at the very beginning:
When I tried to flutter run my hello world app I got xcodebuild failed (I took only the last lines since it's too long):
81 errors generated.
<unknown>:0: error: failed to emit precompiled header '/Users/mehec/Library/Developer/Xcode/DerivedData/Runner-cssmbpuzzkyjvpfghedbpvdhbbmr/Build/Intermediates.noindex/PrecompiledHeaders/Runner-Bridging-Header-swift_2PXLF604USZTM-clang_KLU4EDN5EN1U.pch' for bridging header '/Users/mehec/Desktop/bgp/learn_flutter_0_test/ios/Runner/Runner-Bridging-Header.h'
<unknown>:0: error: generate-pch command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Planning build
note: Constructing build description
I then tried to build and run in xcode and everything's fine.
I have tried flutter clean and flutter upgrade even creating a new project but no effect
I'm using macOS 10.14.6, IntelliJ Idea 2020.1, Flutter 1.17.5 and 1.19.0, Xcode 11.3.1
the code in main.dart:
import 'package:flutter/material.dart';
void main() {
runApp(Center(
child: Text(
"hello world",
textDirection: TextDirection.rtl,
),
));
}
flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.19.0-4.3.pre, on Mac OS X 10.14.6 18G5033, locale en-US)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
You may also want to add it to your PATH environment variable.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Ultimate Edition (version 2020.1.3)
[✓] Connected device (1 available)
! Doctor found issues in 2 categories.
Thanks!
I had a similar problem.
The build from Xcode.app was successful, but the build from the command line or Android Studio failed.
Finally, I reinstalled rbenv, and the problem went away.
In other Github comments, some people solved the problem with conda deactivate, so I think the problem is caused by a bug in the development environment that Xcode.app does not refer to, such as ruby or python environment.

Flutter and Dart Plugins Android Studios

[✗] Android toolchain - develop for Android devices
✗ ANDROID_HOME = User/grantrienstra/Library/Android/sdk
but Android SDK not found at this location.
Is what I've been getting when I run flutter doctor -v and Youtube has not yielded any answers. Do you know how to install the Android toolchain? I have Android Studios downloaded and the Flutter and Dart plugins integrated.
By checking your path I'm assuming you're on Mac so try to add the tools and platform-tools to your PATH environment variable by running the following on the terminal:
export PATH=$PATH:~/Library/Android/sdk/tools
export PATH=$PATH:~/Library/Android/sdk/platform-tools
Then you should be good to go.

error:Unable to locate a development device; please run 'flutter doctor' for information about installing additional components

while trying to run a simple code using bloc I weren't able to test it because of that error , and before this it takes a lot of time trying to resolving dependencies and then post this error :
Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.
and after running flutter doctor the result is :
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.8.2, on Microsoft Windows [Version 10.0.17134.345], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
X Android SDK file not found: C:\Users\aya sisy\AppData\Local\Android\sdk\build-tools\28.0.3\aapt.
[√] Android Studio (version 3.1)
[√] VS Code (version 1.28.1)
[√] Connected devices (1 available)
! Doctor found issues in 1 category.
Seems like the Android Sdk is not found by Flutter.
Did you set the correct ANDROID_HOME environment variable ?
It could also be coming from the path including a space "...\Users\aya sisy\AppData\...".
Can you try to move it to another location ?
The same problem happened to me, except I'm using Ubuntu 18.04, so check the following:
The solution was to remove adb from apt package manager. so see if you accidentally installed adb for windows other than the one that come with android_sdk.
and from the logs you posted, it's clear that there is something wrong inside the android_sdk path so try to move it to other directory : for ex C:\dev\android_sdk and run the following command
flutter config --android-sdk "C:\dev\android_sdk"
Hoping that helps.
Just check whether your 'Project SDK' is set in File -> Project Structure; under the section Project Settings -> Project.
For me, it was not set by default, and setting it solved the problem.

Flutter build IOS on root of my flutter app does not work

Whenever I run this command from terminal: flutter build ios in the root of the project for my flutter app, I get back:
Cannot find "xcodebuild". Xcode 9.0 or greater is required to develop for iOS.
Encountered error while building for device.
I have the lastest Xcode (Version 10.0).
Flutter doctor:
[✓] Flutter (Channel beta, v0.8.2, on Mac OS X 10.13.6 17G65, locale en-GB)
• Flutter version 0.8.2 at /Users/h/flutter
• Framework revision 5ab9e70727 (2 weeks ago), 2018-09-07 12:33:05 -0700
• Engine revision 58a1894a1c
• Dart version 2.1.0-dev.3.1.flutter-760a9690c2
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at /Users/h/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-1024-b01)
• All Android licenses accepted.
[!] 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
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 24.2.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] Connected devices (1 available)
• h iPhone • 77afb908fc6c490d3fca62cdde9a74ab4e45b4f0 • ios • iOS 11.4.1
! Doctor found issues in 1 category.
I assume the IOS issue is thrown as I am running Xcode from an external HD
The source of my problem was that Flutter could not find the latest installed version of Xcode.
To fix it, go to Xcode->preferences->locations->set value for command Line tools.
The suggestion from flutter doctor -v is quite clear
✗ 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/Develope
You could try starting Xcode and agree when it asks to install missing components.
Id suggest you try the dev or master channel where support for Xcode 10 should have landed. Otherwise check this suggestion https://github.com/flutter/flutter/issues/20685#issuecomment-413524718
Run the following commands in your terminal:
1- cd your_project_path
2- sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
3- sudo xcodebuild -license
4- open -a Simulator
5- flutter run
If you Installed Xcode 10 manually via Apple Developer Download Center or Other Sources, then At first, RENAME your Xcode to the Version name you downloaded, like I downloaded the Xcode 10.1 version, so for me the renamed name would be Xcode10.1.app the .app extension is optional as it already has .app extension...
After that, paste this Command on your Terminal,
sudo xcode-select --switch /Applications/Xcode10.1.app/Contents/Developer
Note: the Xcode Version (i.e. Xcode10.1.app ) is Mendatory, if it's there good otherwise, Rename and add it, it's COMPLETELY SAFE and doesn't have any side effects
If you already have Xcode and this error randomly appears, just run these commands, as recommended by Flutter Doctor:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
Install Xcode (get it from https://developer.apple.com/xcode/) if you don't have it yet.
Accept the Terms and Conditions.
Ensure Xcode app is in the /Applications directory (NOT /Users/{user}/Applications).
Point xcode-select to the Xcode app Developer directory using the following command:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
Reference: https://github.com/flutter/flutter/issues/6308
According to #matt-hamman
If your Xcode was updated to v14.1 and your Mac is running macOS 12.6, this will happen because the macOS SDK that xcodebuild is looking for happens to be MacOSX12.3.sdk while your OS has already been updated to 12.6.
Running xcode-select -p returns /Applications/Xcode.app/Contents/Developer, which is what Xcode 14 configured automatically. (Changing this via sudo xcode-select --switch /Library/Developer/CommandLineTools fixes git, but breaks other things in subtle ways (like some CocoaPods commands).)
To fix this issue, simply run:
sudo cp -R /Library/Developer/CommandLineTools/SDKs/MacOSX12* /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
Further details can be gleaned from the original answer here
To fix it, go to Xcode->preferences->locations->set value for command Line tools.

Resources