difficulty in phone setup with android studio - react-native

Failed to install the following Android SDK packages as some licences have not been accepted.
build-tools;30.0.2 Android SDK Build-Tools 30.0.2
To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.
Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html
Using Android SDK: /Users/harshit/Library/Android/sdk

Are you using Android Studio? if so try to install it from the Preferences > Appearance & Behavior > System Settings > Android SDK > Install Licensing Library and any other libraries that you are missing.

Related

Error in USB debugging live testing in React Native

I am new to React Native and I install React Native and I want to test using y device (Realme 2).
Using USB debugging, but I am stuck on this same mobile using Android Studio runs in ADB.
This stucks at this position I await multiple 15m
info Starting JS server...
info Installing the app...
Configure project :app
File C:\Users\Muhammed Sajid Ali.android\repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 28 in D:\sajid\AndroidSdk\licenses
License for package Android SDK Platform 28 accepted.
Preparing "Install Android SDK Platform 28 (revision: 6)".
<======-------> 50% CONFIGURING [15m 0s]
:app
I solved this.
I earlier installed the Android SDK 8, 7.4.4, and 9 versions, but my mobile was 8.1. That’s why
it didn't start and it was downloading SDK 8.1. As I saw in the Android SDK folder, there was a new folder with some files.
Then I downloaded the 8.1 SDK, and it ran perfectly.
I think that was no problem with your compiler behavior, but I can suggest you to check if installing the app from USB is permitted in your phone's developer option and try to trigger the compiler with pressing return key (or enter) on the command line. That was working on mine.

Build failure: React Native Android

I am setting up my environment to start developing react native apps. I keep getting the following error:
PS C:\map\development\learnreact\react-native\helloworld> react-native
run-android Starting JS server... Building and installing the app on
the device (cd android && gradlew.bat installDebug)...
Configure project :app Observed package id 'platform-tools' in inconsistent location
'C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools' (Expected
'C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools\platform-tools')
Checking the license for package Android SDK Build-Tools 27.0.3 in
C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools\licenses
Warning: License for package Android SDK Build-Tools 27.0.3 not
accepted. Checking the license for package Android SDK Platform 26 in
C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools\licenses
Warning: License for package Android SDK Platform 26 not accepted.
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':app'.
Failed to install the following Android SDK packages as some licences have not been accepted.
platforms;android-26 Android SDK Platform 26
build-tools;27.0.3 Android SDK Build-Tools 27.0.3 To build this project, accept the SDK license agreements and install the missing
components using the Android Studio SDK Manager. Alternatively, to
transfer the license agreements from one workstation to another, see
http://d.android.com/r/studio-ui/export-licenses.html Using Android
SDK: C:\Users\bheka\AppData\Local\Android\Sdk\platform-tools
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 2s Could not install the app on the device, read the
error above for details. Make sure you have an Android emulator
running or a device connected and have set up your Android development
environment:
https://facebook.github.io/react-native/docs/getting-started.html
I have accepted licenses using .\sdkmanager --licenses but no luck. I have reinstalled the sdk using the sdk manager in android studio with no luck. Anyone know what I should do?
Make sure the sdkbuildtools used by Android Studio and your emulator are the same as the ones in your build.gradle file in your project folder. If they do not match then either change the build.gradle file to use the installed sdk version. What probably happened is you have sdk 27 used by your android studio and your rn project tried to build it using sdk 26. Accepting the license will not change anything because while it's accepted it is still not used by your emulator and you Android Studio.
Hope that helps!
I had similar issue and was resolved by fixing environment variable, ANDROID_SDK_ROOT. It was previously pointing to .../sdk/platform-tools/ and later worked by changing it to .../sdk

I can't run react-native project on android simulator

A problem occurred configuring project ':app'.
failed to find Build Tools revision 23.0.1
Open the Android SDK Manager (on Mac start a new shell and run
android); in the window that appears make sure you check:
Android SDK Build-tools version 23.0.1
Android 6.0 (API 23)
Local Maven repository for Support Libraries (this is called Android Support Repository in older versions)
Click "Install Packages"

Appcelerator titanium Mobile Module Project?

In Appcelerator Titanium to create a Mobile Module Project I am using titanium 1.8.2
and selected Mobile module Project and gave projectname & Appid but it shows message like "Target platform(s) not selected (Missing required Android Add-Ons[addon.+google.+apis.+7, addon.+google.+apis.+8])".Anybody know What should do
Launch the Android SDK Manager that is packaged in the Android SDK installer, and select the packages that need to be installed.

AIR with Android Emulator?

is it possible to debug AIR applications with the Android Emulator?
this is now possible by using Target apk-debug with the AIR 2.5 ADT. from the AIR 2.5 release notes:
Packaging targets
The AIR Developer Tool (ADT) supports new target options for building Android application packages (APK files):
Target apk: Creates a release APK package suitable for distribution. (Packages created with this target cannot be installed on an Android emulator.)
Target apk-emulator: Creates a release-mode APK package for installation on an Android emulator.
Target apk-debug: Creates a debug-mode APK package that can be installed on both Android emulators and devices.