Skip to main content 3 月 5 日~ 6 日にサンフランシスコで開催される TDX (Salesforce+ でも配信) で「Developer Conference for the AI Agent Era (AI エージェント時代に向けた開発者向けカンファレンス)」にぜひご参加ください。お申し込みはこちら

#Trailhead Challenges2,388 人がディスカッション中

Hands-on challenges are the “secret sauce” of Trailhead. Before searching for solutions to superbadge challenges, review the Salesforce Certification Program Agreement and Policies.

Hi !

 

Step : Set Up Your Salesforce Mobile Developer Tools for Lightning Web Components > Use Salesforce Mobile Developer Tools

 

sub step: SFDX: Preview Component Locally

after install @salesforce/lwc-dev-mobile

close and re-open visual studio

 

Android studio is open.

Device is create for simulation.

(I tested running the simulator directly before and everything is fine.)

 

Error : 

Starting SFDX: Start Local Development Server

09:33:51.221 sfdx force:lightning:lwc:start

Starting SFDX: Preview Component Locally

09:33:51.326 sfdx force:lightning:lwc:preview -p Android -t Android1 -n c/bikeCard -a browser -d c:\Salesforce\Formation\bikeCard --loglevel warn

(node:1860) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.

(Use `node --trace-warnings ...` to show where the warning was created)

(node:21892) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.

(Use `node --trace-warnings ...` to show where the warning was created)

» Warning: @salesforce/cli update available from 2.26.10 to 2.27.6.

» Warning: @salesforce/cli update available from 2.26.10 to 2.27.6.

» Warning: force lightning lwc start is not a sf command.

Did you mean force lightning lwc test run? [y/n]:

» Error: Run sf help force for a list of available commands.

09:34:06.773 sfdx force:lightning:lwc:start

ended with exit code 127

Error: To run this command, install the @salesforce/lwc-dev-server plugin. For more info, see [Set Up LWC Local Development](https://developer.salesforce.com/tools/vscode/en/localdev/set-up-lwc-local-dev).

> Requirements

> Checking SDK root location

> Checking Android SDK Prerequisites

> Checking Android Command Line Tools

> Checking SDK Platform Tools

> Checking SDK Platform API

> Checking SDK Platform Emulator Images

› SfError: SDK root location not found. Please set up ANDROID_SDK_ROOT or ANDROID_HOME in your environment.

› SfError: Android command line tools not found.

› SfError: No supported Android platform tools found. Minimum supported Android platform tools version is 23.

› SfError: Android SDK is missing prerequisites: Android SDK root is not set.

› SfError: No supported Android API package found. Minimum supported Android API package version is 23.

› SfError: Install at least one of these emulator images: google_apis,default,google_apis_playstore

√ Requirements (0.000 sec)

Error (1): Requirement verifications for platform %s failed.

Try this:

Please see the error messages above for details on resolving your requirement issues.

09:34:11.483 sfdx force:lightning:lwc:preview -p Android -t Android1 -n c/bikeCard -a browser -d c:\Salesforce\Formation\bikeCard --loglevel warn

ended with exit code 1

Error: Failed to start Android Emulator 'Android1'.

Android1 is the good name for the emulator. (cf screen 001)

pbl_salesforce_emulation_001.jpg

They say to install the @salesforce/lwc-dev-server plugin... so i do it.

 

Error : 

PS C:\Salesforce\Formation\bikeCard> sf plugins install @salesforce/lwc-dev-server

» Warning: @salesforce/cli update available from 2.26.10 to 2.27.6.

Polling for new version(s) to become available on npm... done

Successfully validated digital signature for @salesforce/lwc-dev-server.

Finished digital signature check.

Installing plugin @salesforce/lwc-dev-server@latest... failed

» Warning: @salesforce/lwc-dev-server > @oclif/config@1.18.17: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Error: C:\Users\xxxx\AppData\Local\sf\client\2.26.10-b796e35\node_modules\yarn\bin\yarn.js add @salesforce/lwc-dev-server@latest --non-interactive

--mutex=file:C:\Users\xxxx\AppData\Local\sf\yarn.lock --preferred-cache-folder=C:\Users\xxxx\AppData\Local\sf\yarn --check-files exited with code 1

PS C:\Salesforce\Formation\bikeCard>

Well : Package no longer supported.

ok....

 

start/stop vs

launch again SFDX: Preview Component Locally

(Is it normal that it always takes so long to get started?)

 

same error than first... so i search for the other error...

 

› SfError: SDK root location not found. Please set up ANDROID_SDK_ROOT or ANDROID_HOME in your environment.

› SfError: Android command line tools not found.

› SfError: No supported Android platform tools found. Minimum supported Android platform tools version is 23.

› SfError: Android SDK is missing prerequisites: Android SDK root is not set.

› SfError: No supported Android API package found. Minimum supported Android API package version is 23.

› SfError: Install at least one of these emulator images: google_apis,default,google_apis_playstore

well.... first error missing sdk root location... This seems like an obvious error seen like that... but in fact, no...

 

However, I installed Android Studio in accordance with the previous exercise. I did not find in the trailhead where we must indicate where the path of this environment variable (ANDROID_SDK_ROOT) is and especially what value to put there. I have no idea where the android sdk is...  For ANDROID_HOME it's c:\users\<username>\.android ?

Should we install the Android SDK in addition to the Android simulator ?

 

I welcome all help!

THANKS !

Regards,

C.

0/9000