[View]  [Edit]  [Lock]  [References]  [Attachments]  [History]  [Home]  [Changes]  [Search]  [Help] 

[node8-android] Building the application package (APK)

Generating a debug apk file for Android device

  1. open node8-android-src Android project in Android Studio
  2. select app to generate the apk file for Uploaded Image: selectApp.png
  3. click on Run
  4. select a device (if any device were connected to the computer)
  5. the following will be shown in Android Studio TODO tab:

Target device: lge-lg_d690-...
Installing APK: C:\S8\Android\JX8\JX8-android-src-30may16\appU8\build\outputs\apk\appU8-debug.apk
Uploading file to: /data/local/tmp/net.smalltalking.s8.jx8
Installing net.smalltalking.s8.jx8
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/net.smalltalking.s8.jx8"
	pkg: /data/local/tmp/net.smalltalking.s8.jx8

Launching application: net.smalltalking.s8.jx8/net.smalltalking.s8.jx8.MainActivity.
DEVICE SHELL COMMAND: am start  -n "net.smalltalking.s8.jx8/net.smalltalking.s8.jx8.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=net.smalltalking.s8.jx8/.MainActivity }
app was installed in Android device and apk file for appU8-debug.apk was generated.
(in this example -as shown in the messages-, the apk file was generated in folder C:\S8\Android\JX8\JX8-android-src-30may16\appU8\build\outputs\apk\)

Using a debug apk file to install the app in another Android device

  1. connect the Android device to the computer
  2. go to the folder where debug apk file was generated
  3. copy the debug apk file to a target Android device folder, for instance: /sdcard/backups/apps
  4. once the apk was copied to the Android device, install the app from that apk file:
Uploaded Image: apkAppInstall1-50.png Uploaded Image: apkAppInstall2-50.png Uploaded Image: apkAppInstall3-50.png Uploaded Image: apkAppInstall4-50.png
Another way to install your app is by running adb from command line:
  1. connect your Android device to the computer
  2. run in command line: adb install app-debug.apk
For example:
C:\Users\Pc\AppData\Local\Android\sdk\platform-tools>adb install C:\S8\Android\JX8\downloaded-APKs\20160602-2\appU8-debug.apk
3630 KB/s (13824033 bytes in 3.718s)
        pkg: /data/local/tmp/appU8-debug.apk
(adb application is packaged with Android SDK)

App execution issue when Instant Run option enabled

Publishing an app to Android market