Skip to main content

3 posts tagged with "cordova"

View All Tags

· One min read

Androidエミュレータでアプリが起動直後に停止する。 アプリはCordovaで生成したもので、ブラウザとiOSでは動作してるからAndroidでも動くはずと思っていたのだが…。

調べてみたらこのページに辿り着いた。

[+]android - Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html) - Stack Overflow http://stackoverflow.com/questions/12319809/application-error-the-connection-to-the-server-was-unsuccessful-file-andr

[+]Fix for PhoneGap: Connection to server was unsuccessful | RobertKehoe.com https://www.robertkehoe.com/2013/01/fix-for-phonegap-connection-to-server-was-unsuccessful/

  1. index.htmlに書いてあったものをmain.htmlに書く。
  2. index.htmlは空っぽにして、main.htmlを呼ぶ。

という構成にすればいいっぽい。

確かにこれだけで問題なく動くようになった。

· 3 min read

gulpでcordova.d.tsをインストールしようと思ったんだけど、エラーが出た。
仕方ないのでtsdコマンドで直接試してみるか…とやってもだめ。

エラーはこんな感じ。

# gulp tsd [23:23:34] Using gulpfile ~/Project/gulpfile.js [23:23:34] Starting 'tsd'... [23:23:34][gulp-tsd] execute command: reinstall [23:23:34][gulp-tsd] config: ./tsd.json [23:23:34][gulp-tsd] latest: true [23:23:34][gulp-tsd] running... -> warning path reference not in index: plugins/BatteryStatus.d.ts -> warning path reference not in index: plugins/Camera.d.ts -> warning path reference not in index: plugins/Contacts.d.ts -> warning path reference not in index: plugins/Device.d.ts -> warning path reference not in index: plugins/DeviceMotion.d.ts -> warning path reference not in index: plugins/DeviceOrientation.d.ts -> warning path reference not in index: plugins/Dialogs.d.ts -> warning path reference not in index: plugins/FileSystem.d.ts -> warning path reference not in index: plugins/FileTransfer.d.ts -> warning path reference not in index: plugins/Globalization.d.ts -> warning path reference not in index: plugins/InAppBrowser.d.ts -> warning path reference not in index: plugins/Media.d.ts -> warning path reference not in index: plugins/MediaCapture.d.ts -> warning path reference not in index: plugins/NetworkInformation.d.ts -> warning path reference not in index: plugins/Push.d.ts -> warning path reference not in index: plugins/Splashscreen.d.ts -> warning path reference not in index: plugins/Vibration.d.ts -> warning path reference not in index: plugins/WebSQL.d.ts [23:23:34][gulp-tsd] finish [23:23:34] Finished 'tsd' after 512 ms

· 3 min read

gulpでcordova.d.tsをインストールしようと思ったんだけど、エラーが出た。
仕方ないのでtsdコマンドで直接試してみるか…とやってもだめ。

エラーはこんな感じ。

# gulp tsd
[23:23:34] Using gulpfile ~/Project/gulpfile.js
[23:23:34] Starting 'tsd'...
[23:23:34] [gulp-tsd] execute command: reinstall
[23:23:34] [gulp-tsd] config: ./tsd.json
[23:23:34] [gulp-tsd] latest: true
[23:23:34] [gulp-tsd] running...
-> warning path reference not in index: plugins/BatteryStatus.d.ts
-> warning path reference not in index: plugins/Camera.d.ts
-> warning path reference not in index: plugins/Contacts.d.ts
-> warning path reference not in index: plugins/Device.d.ts
-> warning path reference not in index: plugins/DeviceMotion.d.ts
-> warning path reference not in index: plugins/DeviceOrientation.d.ts
-> warning path reference not in index: plugins/Dialogs.d.ts
-> warning path reference not in index: plugins/FileSystem.d.ts
-> warning path reference not in index: plugins/FileTransfer.d.ts
-> warning path reference not in index: plugins/Globalization.d.ts
-> warning path reference not in index: plugins/InAppBrowser.d.ts
-> warning path reference not in index: plugins/Media.d.ts
-> warning path reference not in index: plugins/MediaCapture.d.ts
-> warning path reference not in index: plugins/NetworkInformation.d.ts
-> warning path reference not in index: plugins/Push.d.ts
-> warning path reference not in index: plugins/Splashscreen.d.ts
-> warning path reference not in index: plugins/Vibration.d.ts
-> warning path reference not in index: plugins/WebSQL.d.ts
[23:23:34] [gulp-tsd] finish
[23:23:34] Finished 'tsd' after 512 ms