Mehditeranee opened a new issue #930: Android emulator : The "path" argument 
must be of type string. Received null
URL: https://github.com/apache/cordova-android/issues/930
 
 
   **Prerequisite**
   
    - Android SDK is well installed (directory : 
/Users/gamecube/Library/Android/sdk)
   - My `~/.bash_profile` file is : 
   
   ```
   export JAVA_HOME=$(/usr/libexec/java_home)
   export ANDROID_SDK_ROOT="~/Library/Android/sdk"
   export ANDROID_AVD_HOME="~/.android/avd"
   export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
   
   export ANDROID_HOME="$HOME/Library/Android/sdk"
   
   # avdmanager, sdkmanager
   export PATH="$PATH:$ANDROID_SDK_ROOT/tools/bin"
   
   # adb, logcat
   export PATH="$PATH:$ANDROID_SDK_ROOT/platform-tools"
   
   # emulator
   export PATH="$PATH:$ANDROID_SDK_ROOT/emulator"
   
   # apksigner, zipalign
   export PATH="$PATH:$ANDROID_SDK_ROOT/build-tools/${version}"
   export ANDROID_HOME="/Users/gamecube/Library/Android/sdk"
   export ANDROID_SDK_ROOT="/Users/gamecube/Library/Android/sdk"
   export PATH="${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
   export PATH="$PATH:$ANDROID_HOME/build-tools/29.0.3"
   
   export PATH="$PATH:$ANDROID_HOME/tools"
   export PATH="$PATH:$ANDROID_HOME/tools/bin"
   export PATH="$PATH:$ANDROID_HOME/platform-tools"
   export PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"
   ```
   
   
   **How to reproduce:** 
   
    1. Run this command: `cordova build android`
    2. Run this command to launch android emulator: `cordova emulate android 
--verbose`
   
   **Expected result**
   
   The emulator is launched.
   
   **Obtained result**
   
   ```
   Command finished with error code 0: /Users/gamecube/Desktop/geocars 
3/platforms/android/gradlew cdvBuildDebug,-b,/Users/gamecube/Desktop/geocars 
3/platforms/android/build.gradle
   Built the following apk(s): 
        /Users/gamecube/Desktop/geocars 
3/platforms/android/app/build/outputs/apk/debug/app-debug.apk
   No scripts found for hook "before_deploy".
   Checking Java JDK and Android SDK versions
   ANDROID_SDK_ROOT=undefined (recommended setting)
   ANDROID_HOME=/Users/gamecube/Library/Android/sdk (DEPRECATED)
   Running command: adb devices
   Command finished with error code 0: adb devices
   Running command: avdmanager list avd
   Command finished with error code 0: avdmanager list,avd
   No emulator specified, defaulting to Pixel_2_API_28
   Running command: adb devices
   Command finished with error code 0: adb devices
   Found available port: 5584
   The "path" argument must be of type string. Received null
   TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type 
string. Received null
       at validateString (internal/validators.js:118:11)
       at Object.dirname (path.js:1128:5)
       at /Users/gamecube/Desktop/geocars 
3/platforms/android/cordova/lib/emulator.js:294:37
       at _fulfilled (/Users/gamecube/Desktop/geocars 
3/node_modules/q/q.js:854:54)
       at /Users/gamecube/Desktop/geocars 3/node_modules/q/q.js:883:30
       at Promise.promise.promiseDispatch (/Users/gamecube/Desktop/geocars 
3/node_modules/q/q.js:816:13)
       at /Users/gamecube/Desktop/geocars 3/node_modules/q/q.js:624:44
       at runSingle (/Users/gamecube/Desktop/geocars 
3/node_modules/q/q.js:137:13)
       at flush (/Users/gamecube/Desktop/geocars 3/node_modules/q/q.js:125:13)
       at processTicksAndRejections (internal/process/task_queues.js:79:11)
   ```
   
   
   **My questions** 
   
   *Why Android Emulator does not work?* 
   
   and 
   
   *Why is there this error? :* 
   
      TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type 
string. Received null
   
   
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to