0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Salesforce Mobile SDKのプロジェクト作成で躓いたこと

Last updated at Posted at 2018-05-29

Hybrid アプリケーションを作成する際に、下記のエラーの調査で時間がかかりました。
環境変数を読み込めていなかったなどの理由のエラーのようで、コマンドプロンプトを開きなおしてプロジェクトを再作成すると解消されました。

コマンドプロンプトを開きなおして、"forcehybrid create"でプロジェクトを作成し直すと解消されるエラー

環境情報

対象の Android SDK: Android Oreo (API 27)
最小 Android SDK: Lollipop (API 21)
Android 3.1.2
gradle:3.1.2
Jre1.8.0
Cordova: 7.0.0

  1. forcehybrid create実行時のエラー
    エラーメッセージ:Command failed: cordova plugin add https://github.com/forcedotcom/SalesforceMobileSDK-CordovaPlugin#v5.3.0 --force #348

  2. forcehybrid create実行時のエラー
    エラーメッセージ:Command failed: git clone --branch v6.1.0 --single-branch --depth 1 https://github.com/forcedotcom/SalesforceMobileSDK-Shared.git mobile_sdk\SalesforceMobileSDK-Shared

  3. gradleビルド時のエラー
    エラーメッセージ:AndroidManifest.xml:5: error: Error: No resource found that matches the given name (at 'icon' with value '').
    Gradleがエラーの場合はforcehybridから作り直す

  4. gradleビルド時のエラー
    エラーメッセージ:No manifest file found at ./AndroidManifest.xml. Falling back to the Android OS resources only.

  5. gradleビルド時のエラー
    エラーメッセージ:実行時に、Android Studio: “Please select Android SDK”とエラーが出力される

環境変数にANDROID_HOMEが設定されてないときのエラー

  1. forcehybrid create実行時のエラー
    エラーメッセージ:ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions

WindowsのAndroid SDKの場所

Projectフォルダを右クリックして、[Open Module Setting] > [ProjectStructure]画面のサイドメニュー[SDK Location] でAndroid SDK Locationが表示されます。
そのパスを環境変数に登録。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?