VSCODE Ubuntu no puede ver $ANDROID_HOME

VSCODE Ubuntu no puede ver $ANDROID_HOME

Soy nuevo aquí y decidí cambiarme a Ubuntu a tiempo completo para desarrollar aplicaciones como pasatiempo.

Como tengo una emulación de CPU AMD "RYZEN", funcionó o no, descubrí que Ubuntu funciona bien ya que tiene emulación de hardware, luego seguí adelante e instalé Android Studio y demás, Java y configuré las variables de entorno.

Luego instalé NativeScript y ejecuté la prueba de entorno tns doctory el resultado es este:

✔ Getting environment information 

No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
✔ Getting NativeScript components versions information...
✔ Component nativescript has 6.0.3 version and is up to date.

Luego instalé VSCODE, luego creé un proyecto de prueba de Nativescript y se creó correctamente, lo abrí en VSCODE y creé una configuración de depuración.

luego inicie un emulador de Android y luego intente ejecutar id. Se inició en Android y obtuvo

WARNING: The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android. 
 To be able to perform Android build-related operations, set the `ANDROID_HOME` variable to point to the root of your Android SDK installation directory. 


WARNING: WARNING: adb from the Android SDK is not installed or is not configured properly.  
 For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements 

WARNING: WARNING: The Android SDK is not installed or is not configured properly. 
 You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK 
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements 

WARNING: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later. 
 Run `$ sdkmanager` to manage your Android SDK versions. 

WARNING: You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=28'. 
 Run `$ sdkmanager` from your command-line to install required `Android Build Tools`. In case you already have them installed, make sure `ANDROID_HOME` environment variable is set correctly. 

Javac is installed and is configured properly.
The Java Development Kit (JDK) is installed and is configured properly.
Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.

Si ejecuté la terminal como usuario normal, tns runla aplicación se crea y se adjunta al emulador de Android.

Los mismos problemas que tengo en Cordova, dieron un error similar: $ANDROID_HOME no está configurado correctamente, mientras que todavía puedo ejecutar la invocación de "cordova emulate android".

Mi sospecha es que VSCODE no puede ver el entorno correctamente o las extensiones tienen problemas o algún error.

Agradezco cualquier ayuda brindada.

Respuesta1

Ok, encontré algo interesante mientras buscaba,"establecer variable de entorno para todos los usuarios en Ubuntu"y consiguióeste sitio web

Luego seguí sus instrucciones, configuré el ANDROID_HOMEsistema allí y reinicié... y. ahora NativeScript encontró el entorno y ejecutó el proyecto en el emulador en ejecución.

Además, Córdoba también pudo encontrar el medio ambiente, pero me consiguió un problema diferente.

Publicaré otra pregunta si puedo encontrar la respuesta para Córdoba.

Hace tres días que me rompo la cabeza... para configurar esto correctamente.

información relacionada