LoginSignup
3
4

More than 5 years have passed since last update.

cordova&VSCodeで環境を構築するまでの右往左往メモ。

Posted at

使用するもの

  • 当記事は下記の環境を準備する記事です。
    1. cordova
    2. visualStudioCode
    3. androidのデバッグ環境

詰まったところや見るところなど

基本的に
Visual Studio CodeとCordovaで作るハイブリッドアプリ開発環境
を参考に進めていく。
ただし、上記記事はiOSの記事なのでいろいろ差異がある。

androidでデバッグしようとした場合に引っかかったのは以下。

  • JDK1.8をインストールしてても、JDK1.8を要求される

cordova-requirements-check-failed-for-jdk-1-8-or-greater
→古いJDKをパスで指定しているため。環境変数の設定からJDKのパスを新しい(JDK1.8以上の)パスに変えると修正できる。

  • Gradleが見つからないのでインストールするか、AndroidStudioをインストールしろと言われる

Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio
→AndroidStudioをインストールしていても起き得る。Gradleを別途インストールしたほうが良い。インストールは下記記事をもとに実行。
Windows10にGradleをインストール

  • ADBが見つからないと言われる

ADBコマンド導入の方法
→上記記事に従ってADBコマンドが使えるように設定が必要。

  • デバイスが見つからないと言われる

ERROR: Failed to deploy to device, no devices found -cordova using visual studio

→USBで実機に繋いでUSBデバッグを有効にすることが必要。


参考URL

Visual Studio CodeとCordovaで作るハイブリッドアプリ開発環境

cordova-requirements-check-failed-for-jdk-1-8-or-greater

Could not find an installed version of Gradle either in Android Studio, or on your system to install the gradle wrapper. Please include gradle in your path, or install Android Studio

Windows10にGradleをインストール

ADBコマンド導入の方法

ERROR: Failed to deploy to device, no devices found -cordova using visual studio

3
4
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
3
4