Difference between revisions of "Android"

From Wasya Wiki
Jump to: navigation, search
(Build)
(Build)
Line 34: Line 34:
 
== Build ==
 
== Build ==
  
From: https://facebook.github.io/react-native/docs/signed-apk-android
+
<pre>
 +
# get the signed keystor
 +
# From: https://facebook.github.io/react-native/docs/signed-apk-android
  
  react-native run-android --variant=release
+
  react-native run-android --variant=release # this is for testing only, it doesn't do anything
 
  npm run eject
 
  npm run eject
 
  cd android && ./gradlew assembleRelease
 
  cd android && ./gradlew assembleRelease
 +
</pre>

Revision as of 02:29, 30 August 2018

Develop

  • pi_native, that's the newsitems app
  • wasya_native, that's the main one right now

Run Emulator

/Users/piousbox/Library/Android/sdk/tools/emulator -avd Nexus_5X_API_26

This launches wasya_native 20180829

 ./node_modules/.bin/react-native run-android

Reload App in Emulator

adb shell input keyevent 82
R+R

Build

From: https://facebook.github.io/react-native/docs/signed-apk-android

Generate key, then

 ./gradlew assembleRelease

It's here: /Users/piousbox/projects/react/pi_native/android/app/build/outputs/apk

From: https://docs.expo.io/versions/latest/guides/building-standalone-apps.html

npm install -g exp
exp build:android

Build

 # get the signed keystor
 # From: https://facebook.github.io/react-native/docs/signed-apk-android

 react-native run-android --variant=release # this is for testing only, it doesn't do anything
 npm run eject
 cd android && ./gradlew assembleRelease