No simulators available. Please install Xcode and an iOS simulator to preview your project - ios-simulator

In attempting to use the IDE Deco, for the first time (A IDE for React.js) I received the following error:
'No simulators available.',
'Please install Xcode and an iOS simulator to preview your project.'
I installed xcode. It's in file:
Macintosh HD < Applications < xcode-beta
I installed command line tools. According to command line prompt below, they are located in
/Library/Developer/CommandLineTools
.
[redacted] at MacBook-Air-2 in ~
$ xcode-select -p
/Library/Developer/CommandLineTools
[redacted] at MacBook-Air-2 in ~
$ /usr/bin/xcodebuild -version
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer
directory '/Library/Developer/CommandLineTools' is a command line tools
instance
[redacted] at MacBook-Air-2 in ~
$

run xcode at least once, and install command line tools
In console type:
$ which xcrun
// /usr/bin/xcrun
Then type:
$ xcrun --version
// xcrun version 33.
Then type:
$ xcrun simctl list
// == Device Types ==
Then:
open Xcode (top menu):
Xcode > Preferences > Location
there’s a dropdown for Command Line Tools. Make sure something is selected there.
Quit your IDE. Restart your IDE. It should work. These are the steps that worked for me.
I found these instructions in the Slack group for Deco. Posting them on SO for easier access. The link to the thread: https://decoslack.slack.com/archives/C0NB152SH/p1476392009000521

Related

Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1

Hi Im still having an issue when running my basic script using Appium.
The issue is Unable to launch WebDriveragent because of xcodebuild failure.
Tried executing the Carthage bootstrap --platform iOS,tvOS' but returns an error
platform iOS,tvOS
IntelliJ Error
I've tried to backtrack the issue by going to my webdriveragent and entering
./Scripts/bootstrap.sh -d
but still it produce an issue
Bootstrap Issue
so I tried to use
carthage bootstrap --use-xcframeworks --platform iOS --no-use-binaries;
it does not return any issue
Appium Server Issue
Im using
MacOS = BigSur 11.5
Appium = 1.17
Xcode = 12.5.1
Carthage version = 0.38.0
Sorry I'm really new to iOS world. Followed all tutorial in the web. Manage to connect an app (IntegrationApp.app) and it works in iOS Real device and simulator but when I tried to connect Appium to real device and simulator it fails
Also tried to reinstall Carthage and even the whole Appium (tried the whole process)
Steps I did
Install Appium desktop and Appium doctor
Open the location of Appium and look for webdriveragent
Open terminal and set it to the location of webdriveragent
code I use is : mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh -d (didn't work so tried other which stated above)
Open the WebDriverAgent file in Xcode and set the necessary field (Build success)
Tried to open IntegrationApp.app in iOS device(real and simulator)(Success)
Tried to open Appium inspector and set the following:
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability("platformName", "iOS");
cap.setCapability("platformVersion", "14.5");
cap.setCapability("deviceName", "iPhone 12");
cap.setCapability(CapabilityType.BROWSER_NAME, "safari");
// cap.setCapability("app");
URL url = new URL("http://127.0.0.1:4723/wd/hub");
IOSDriver driver = new IOSDriver(url, cap);
Manage to solve this problem (Though it has another issue on real device - still has answers here)
Download new Appium version v1.18.3
Tried to setup again but after creating the Resource Directory (mkdir -p Resource/WebDriverAgent.bundle). instead using ./Source/bootstrap.sh -d I used
sudo ./Source/bootsrap.sh -d
I'm using a company provided macbook air. And I also run the
sudo carthage bootstrap --use-xcframeworks --platform iOS --no-use-binaries;
And this is a good read to https://www.mutuallyhuman.com/blog/webdriveragent-getting-started-with-automated-ios-testing/

The plugin firebase_admob could not be built due to the issue above [duplicate]

I am getting this error in jitpack, I've tried everything on the internet. Below is my error
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-26 Android SDK Platform 26
build-tools;28.0.3 Android SDK Build-Tools 28.0.3
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
And when i run ./sdkmanager --licenses
All SDK package licenses accepted.======] 100% Computing updates...
Using sudo with the above command gives
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
additional error log
File /opt/android-sdk-linux/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Build-Tools 28.0.3 in /opt/android-sdk-linux/licenses
Warning: License for package Android SDK Build-Tools 28.0.3 not accepted.
Checking the license for package Android SDK Platform 26 in /opt/android-sdk-linux/licenses
Warning: License for package Android SDK Platform 26 not accepted.
I don't know why it's checking for licenses there when my sdk location is other
You need to accept the licences before building.
According to Android SDK docs you can use the following command depending on the sdkmanager location: Docs on --licenses option seems to be missing though.
yes | sdkmanager --licenses
GNU/Linux Distributions:
yes | ~/Android/Sdk/tools/bin/sdkmanager --licenses
macOS:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
Windows:
%ANDROID_HOME%/tools/bin/sdkmanager --licenses
Flutter:
> flutter config --android-sdk 'path-of-android-sdk'(only for ubuntu user)
> flutter doctor --android-licenses
In Android Studio go to Tools -> SDK Manager.
Go to SDK Tools tab.
Select the Android SDK Command-line Tools (latest) and download by pressing Apply.
On Windows, you can find the sdkmanager.bat at
C:\Users\[your_user]\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
in Windows OS go to your sdkmanager path then execute
./sdkmanager.bat --licenses
You can find your sdkmanager in C:\Users\USER\AppData\Local\Android\Sdk\tools\bin
OR
For those people not using android studio on window os. Go to your cmdline-tools\tool\bin and type cmd on the directory box to open the directory in your terminal. Then run sdkmanager --licenses
To find your actual android SDK path follow the red marked area of the below picture
If you are working with Flutter then this command would definitely work for you.
flutter doctor --android-licenses
Problem: SDK license not accepted
Step 1: Open SDK Manager
After opening the SDK manager, open the SDK tools tab as shown below
Step 2: Check the option Show Package Details
It'll list out all the versions of SDK tools
Step 3: Install the required SDK tool version
Check the specific version of SDK tools that is complaining (for me, it was 29.0.3 as shown above in the first screenshot) from the list, accept the agreement in the dialog that opens next and you're done.
MacOS Catalina
Step 1: Changing Android Studio Preference
Open-up your Android Studio
Press Command+, or go to top-left AppBar Android Studio > Preferences.
From Left Pane, select Appearance > System Settings > Android SDK
Select SDK Tools next to SDK Platforms and under Android SDK Location
Check mark Android SDK Command-line Tools (latest) and Press OK button.
Wait for installation to be finished
Step 2 (For Flutter Users):
Go to Terminal and run the following command
flutter doctor --android-licenses
Step 2 (For Android Users):
Go to the Terminal and run the following command
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
yes | ~/Library/Android/sdk/tools/bin/sdkmanager --licenses
You can accept the license agreements of the stated SDKs by going to the SDK Manager (Settings > [Search for Android SDK]) then find the packages noted in the error message and find them there. Chances are, you'll find SDKs that are not fully installed and installing them will ask you to accept the license agreement.
use android-28 with build-tools at version 28.0.3; or build-tools at version 26.0.3.
or try this: yes | sudo sdkmanager --licenses
This works for me:
yes | ./sdkmanager "platforms;android-28"
yes | ./sdkmanager "build-tools;28.0.3"
yes | ./sdkmanager --licenses
For Android Studio Arctic Fox, it was solved for me by installing the Google Play Licensing Library.
Go to Preferences
Expand Appearance & Behavior
Then expand System Settings
Select Android SDK and go to SDK Tools tab
Install Google Play Licensing Library
If you are getting this error while using Flutter then please run the below command on command prompt.
flutter doctor --android-licenses
If you get below error after running the above command
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Then please do the below steps
Open android studio
Go to SDK manager
Click on SDK tools tab
Install Android SDK command line tool
Run flutter doctor --android-licenses again
In Android Studio go to: Tools > SDK Manager > SDK Tools
On the bottom right, check the "Show Package Details" box and download the version of sdk that you need:
Tried this on Android Studio and it worked for me:
Tools > SDK Manager (Make sure to check Show Packages below)
SDK Platforms > Show Packages > Android - 28
SDK Tools > Show Packages > 28.0.3
Appears to be a bug at the momment:
https://issuetracker.google.com/issues/123054726
Solution that worked for me:
Create a .travis.yml file in your project directory and copy these lines:
before_script:
- mkdir "$ANDROID_HOME/licenses" || true
- echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license"
Reference:
https://github.com/square/RxIdler/pull/18/files
in Windows OS go to your sdkmanager path directory in cmd
You can find your sdkmanager in C:\Users\USER\AppData\Local\Android\Sdk\tools\bin
then execute the followwing command:
sdkmanager --licenses
after that it will ask to accept license agreement several times then accept all by just typing y on cmd
This works for me in Windows 10:
C:
cd \Users\YOUR_USER\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
sdkmanager.bat --licenses
After, yes to all
On Mac OS 10.15.1, I got the same error even after accepted all the licenses by running sdkmanager --licenses It worked after I updated the ANDROID_HOME path configuration in the ~/.bash_profile to the following
export ANDROID_HOME=/Users/your_username/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
export PATH=$PATH:~/Library/Android/sdk/platform-tools
And reload the ~/.bash_profile
source ~/.bash_profile
I tried many solutions but didn't work for me.
The below solution works for me.
locate the sdkmanager file in android SDK.
In my case :
~/Android/Sdk/tools/bin
go to that path : cd ~/Android/Sdk/tools/bin
Accept licenses manually : ./sdkmanager --licenses
Enter Yes or y
If you are using flutter go with the following steps
1.open the command prompt
Then the following command
2.C:\Users\niroshan>flutter doctor
And you will see the issues as follows
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 10.0.17763.1339], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
X Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[!] Android Studio (version 4.1.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.50.1)
[!] Connected device
! No devices available
! Doctor found issues in 3 categories.
Actually what you have to run is the below command
C:\Users\niroshan>flutter doctor --android-licenses
https://www.youtube.com/watch?v=g789PvvW4qo really helped me. What had done is open SDK Manager and download any new SDK Platform (dont worry it wont affect your desired api level).
Because with downlaoding any SDK Platforms(API level), you should accept licences. That's the trick worked for me.
I had the same problem when trying to run an app on my android device in a different project where I was working with some old version of tomcat8 and had to set the JAVA_OPTS variable and value. So I removed this system variable for JAVA_OPTS, which had a Variable value set to -Xms1024m (Remove the JAVA_OPTS system variable, but you can also store it for future use if you need to revert to using your old projects that might need it).
Then run the SDK manager bat file in your sdk path:
PS C:\Users[your_pc_username]\AppData\Local\Android\Sdk\tools\bin> .\sdkmanager.bat --licenses
Accept all licenses (Y).
How I solve this problem (AndroidStudio 4.2)
Click in Build tab
Select Failed to install the following Android SDK packages ... (warning)
Click Install missing SDK package(s)
On Ubuntu it still didn't work using the answers suggested.
This is what worked for me:
cd full-path-to-bin folder, where sdkmanager is located.
yes | ./sdkmanager --licenses --sdk_root="full-path-to-bin"
In the option --help it shows we can pass common args to it, which finally accepted ALL licences:
Usage:
...
sdkmanager --licenses [<common args>]
...
Common Arguments:
--sdk_root=<sdkRootPath>: Use the specified SDK root instead of the SDK containing this tool
To add to the answers, you can also change to the sdkmanager directory and in a sub shell and accept the licenses there
(
cd /home/user/android-sdk-linux/tools/bin
yes | ./sdkmanager --licenses
)
I just done File -> Invalidate caches and restart
Then install missing packages.
Worked for me.
On Windows:
Add USER Environment variables:
NOTE: Path should be appended
JAVA_HOME %ProgramFiles%\Android\Android Studio\jre
ANDROID_SDK_ROOT %LocalAppData%\Android\Sdk
Path %LocalAppData%\Android\Sdk
Run the below command to accept licenses:
NOTE: Accept all licenses (say y)
%ANDROID_SDK_ROOT%/tools/bin/sdkmanager.bat --licenses
Now run your app:
(like below, or another command that failed for you):
cd \myapp\
react-native run-android
in my case I just installed a new version of android studio on a new laptop and cloned the old repository where
buildToolsVersion "30.0.2" at application level build.gradle.
I just upgraded to 30.0.3 which android studio recommended on its own and the problem went away
I moved my Sdks and Avds folder as it was using lots of memory in local disk c, but after that I got the above issue.
For me Invalidate Caches/Restart solve the issue
File->Invalidate Caches/Restart
In my case updating buildToolsVersion in app level build.gradle worked perfectly. If you don't know which to use you can create new project and copy buildToolsVersion from that into existing one.
A one liner solution with downgrade to java 8:
sudo apt-get install openjdk-8-jdk -y && export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 && flutter doctor --android-licenses

Can not remote Run QT Camera Example on i.Mx6Q

This is the application output, when I run app:
sh: /root/camera: not found
Application finished with exit code 127.
How to fix this problem? Thanks
Environment
I'm using Buildroot 'imx6-sabresd_qt5_defconfig' and adding 'openssh', 'gdb'
And the following is what I set up Qt Creator for i.Mx6Q:
Tools > Options > Build & Run > Compilers
Name : imx6 buildroot GCC
buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-g++
Tools > Options > Build & Run > Debuggers
Name : IMX6 buildroot gdb
buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabihf-gdb
Tools > Options > Build & Run > Qt Versions
Version Name : Qt %{Qt:Version} (buildroot)
buildroot/output/host/usr/bin/qmake
camera.pro
+ target.path = /root
+ INSTALLS += target
- target.path = $$[QT_INSTALL_EXAMPLES]/multimediawidgets/camera
- INSTALLS += target
Originally, I run on VMware Ubuntu.
When I not using VMware, the qt app remote run and debugging successfully.
Didn't change any environment setting.

How do I delete preinstalled apps on an android?

I am trying to delete preinstalled applications on my HTC phone. I have tried to root my phone but was not very successful.
Ty
Disabling is one way. For example Motorola enables them every update.
You can also remove them completely using adb:
Install adb if you do not already have it, https://developer.android.com/studio/command-line/adb
Enable developer mode, usually by going to settings > system > about phone > and repeatedly clicking build number
Configure your phone in debug mode, usually settings > systems > developer options > USB debugging
Start a console and put adb in your path
List your packages using: adb shell pm list package -f
Remove the package using: adb shell pm uninstall --user 0
Example:
adb shell pm uninstall --user 0 com.microsoft.office.outlook
Removes Outlook
adb shell pm uninstall --user 0 com.linkedin.android
Removes LinkedIn
I'm not sure if updates reinstall applications.
Source: How do I get an apk file from an Android device?
Try disabling them first from Settings and then delete app data

AllJoynChat sample - directory not found for option '-L/build/Debug-iphoneos'

I tried to build the AllJoynChat sample and got the following error message:
ld: warning: directory not found for option '-L/build/Debug-iphoneos'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I am using Xcode 7.2 and iOS 9.2 SDK. Any help?
It seems like your the build cannot find openssl library.
The following steps need to be followed exactly as below:
Unzip the AllJoyn SDK package to a folder on your development system.
Download and copy the OpenSSL source into a separate folder on your development system, not under the AllJoyn SDK.
Navigate to the OpenSSL source top folder in Finder, and copy the openssl.xcodeproj folder you downloaded from GitHub into this folder.
Open the openssl.xcodeproj in Xcode.
In Xcode, build the crypto target (libssl.a and libcrypto.a) for each
combination of configuration (debug|release) and platform (iphoneos|iphonesimulator) that you need for your iOS project by selecting Product->Build For->(your desired configuration).
Create a new folder called "build" under the top-level OpenSSL folder created in step 1.
Locate your OpenSSL build products folders (i.e.: Debug-iphoneos) in the
/Users//Library/Developer/Xcode/DerivedData/XXXXXXXXXXXXX-openssl/Build/Products folder, and copy all the - folders, like Debug-iphoneos, to the build
folder created in step 6.
You should now have a folder structure similar to this containing libssl and libcrypto
for each $(CONFIGURATION)-$(PLATFORM_NAME) you built in step 5:
openssl-1.0.1c
build
Debug-iphoneos
libssl.a
libcrypto.a
Debug-iphonesimulator
libssl.a
libcrypto.a
Define an environment variable OPENSSL_ROOT=
This environment variable needs to be present whenever you build projects using the AllJoyn SDK.
9a. For Mac OS X 10.7 to 10.9, to set the environment variable, open a Terminal window and type the
following:
launchctl setenv OPENSSL_ROOT <path to top level folder containing openssl>
Restart XCode.
9b. With Mac OS X 10.10, environment variable processing changed. Most importantly, OPENSSL_ROOT
must be defined before launching Xcode (Xcode will not pick up new or changed variables
after launching). Therefore, to set the environment variable, open a Terminal window and type
the following:
launchctl setenv OPENSSL_ROOT <path to top level folder containing openssl>
sudo killall Finder
sudo killall Dock
Restart XCode.
If you have already done the above check step 9 since the step differs for different version of OS X and you may be on the latest version for which the instructions have not been updated yet.

Resources