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

[JX8-OBSOLETE] Issues installing project on Android Studio

Steps to install on Android Studio and special considerations when installing.

  1. Download source project files (node8-android-src-part(1 to 3) zip files)
  2. Decompress in new folder JX8 in ~/AndroidStudioProjects
    1. Note that part1 and part2 includes files in folder aleReimondo-jxcore and you MUST JOIN the files from both zip files. Do NOT overwrite the folder because (in unix systems) it can miss the files when you overwrite the folder.
  3. Open Android Studio, enter JX8 project and accept new SDK path (if prompted)
  4. download NDK r16b from NDK archives ,decompress and copy files to [Android Studio/SDK folder]/ndk-bundle
  5. IMPORTANT - to avoid issues building NDK
    1. Edit the file [Android Studio/SDK folder]/ndk-bundle/build/core/build-binary.mk
      commenting the line number 217 to
      #//Ale  LOCAL_LDFLAGS += -Wl,--fatal-warnings
      [edited file=build-binary.mk]
  6. Change path in aleReimondo-jxcore/build.gradle to unix format
    def cmd = findNDK() + "/build/ndk-build"
  7. Build the JX8 project or (better)

Steps to rebuild the image

The paragraphs below are required steps to build your app, but it is important to rebuild the image to make some constants in the image (resource IDs) in sync with the values of values in your installation.
Follow this steps to build a fresh image (and read constants from your installation)
  1. See the contents of JX8/s8 folder. It is a console project used to build the image that is embedded in the android application
  2. Execute the s8vm in the JX8/s8 folder for each project
  3. Try to build images for all projects, the new snapshots will be saved in assetsPathName+"default.snapshot.js"
  4. After succeeding building the snapshots without errors, clear the constants e.g.
    del appS8/Constants.st
    del appS8/Constants.st.js
    del jx8fb/Constants.st
    del jx8fb/Constants.st.js
  5. Build the S8 projects again
    s8vm.exe --expose-gc --shell appS8.js build.js
    s8vm.exe --expose-gc --shell jx8fb.js build.js
    
  6. Build the android application, install in the device and debug with Android Studio

Attached files

build-binary.mk

Links to download NDK r16b

Windows 32-bitandroid-ndk-r16b-windows-x86.zip
Windows 64-bitandroid-ndk-r16b-windows-x86_64.zip
Mac OS Xandroid-ndk-r16b-darwin-x86_64.zip
Linux 64-bit (x86)android-ndk-r16b-linux-x86_64.zip