Meteor cordova on Android building app

蹲街弑〆低调 提交于 2019-12-08 03:58:17

问题


I am trying to test my app on my phone. I did this:

meteor build <bundle path> --server <host>:<port>

I took the aligned.apk from the build folder and put it on my phone but it gave an error when I tried to install.

I tried brew install android-sdk and downloaded the latest apk, but that still didn't work.

I am not sure what I am supposed to do. Please help.


回答1:


Ok, dug a little deeper, here's what worked for me. See here for android: https://github.com/meteor/meteor/wiki/How-to-submit-your-Android-app-to-Play-Store

specifically:

keytool -genkey -alias your-app-name -keyalg RSA -keysize 2048 -validity 10000

cd ~/build-output-directory/android/
jarsigner -digestalg SHA1 unaligned.apk your-app-name

~/.meteor/android_bundle/android-sdk/build-tools/20.0.0/zipalign 4 unaligned.apk production.apk

Then install the "production.apk" to your device.




回答2:


Have you read this?

https://www.meteor.com/try/7

For iOS you need to install Xcode which is about 2GB (XCode)

  1. meteor install-sdk ios
  2. meteor add-platform ios
  3. meteor run ios (Simulator) or
  4. meteor run ios-device (Device) or
  5. meteor run ios-device --mobile-server my_app_name.meteor.com

Try to read upon this: https://github.com/meteor/meteor/wiki/Meteor-Cordova-Phonegap-integration

and this: http://www.sitepoint.com/beginners-guide-mobile-development-meteor/



来源:https://stackoverflow.com/questions/28294258/meteor-cordova-on-android-building-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!