Titanium JIRA Archive
Appcelerator Community (AC)

[AC-927] MacOSX can't compile Android Module using JDK 1.7

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2015-09-29T05:47:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Labelsandroid, module
ReporterJack lee
AssigneeShak Hossain
Created2015-03-20T03:28:48.000+0000
Updated2016-03-08T07:37:14.000+0000

Description

I have Install the JRE1.7 and setup the Java Compiler in Titanium Studio but everytime I compile (packaging) the Module Is still using JRE1.6 . I can test this by a Switch Case with String Because in JRE1.6 is not support this .only in JRE1.7 can use Switch Case with String. Error Log

Attachments

FileDateSize
1.png2015-03-20T03:28:48.000+000031714
2.png2015-03-20T03:28:48.000+000066092
3.png2015-03-20T03:28:48.000+000029758
4.png2015-03-20T03:28:48.000+000046395

Comments

  1. Shuo Liang 2015-03-20

    Hi, Please run "ti setup check" in terminal and provide the output. THanks Regards, Shuo
  2. Jack lee 2015-03-20

    Dear Shuo Liang, ──────────────────┤ Check Environment ├─────────────────── Node.js ★ node new version v0.12.0 available! (currently v0.10.35) ★ npm new version v2.7.3 available! (currently v1.4.28) Titanium CLI ✓ cli bleeding edge (v3.4.2) Titanium CLI Dependencies ✓ async up-to-date (v0.2.10) ✓ colors up-to-date (v0.6.2) ✓ fields up-to-date (v0.1.23) ✓ humanize up-to-date (v0.0.9) ✓ jade up-to-date (v0.35.0) ✓ longjohn up-to-date (v0.2.4) ✓ moment up-to-date (v2.4.0) ✓ node-appc up-to-date (v0.2.25) ✓ optimist up-to-date (v0.6.1) ✓ request up-to-date (v2.27.0) ✓ semver up-to-date (v2.2.1) ✓ sprintf up-to-date (v0.1.5) ✓ temp up-to-date (v0.6.0) ✓ winston up-to-date (v0.6.2) ✓ wrench up-to-date (v1.5.8) Titanium SDK ✓ latest sdk installed (v3.5.1.GA) ✓ selected sdk up-to-date (v3.5.1.GA) Mac OS X Environment ✓ CLI Tools installed iOS Environment ✓ Xcode installed (6.1.1) ✓ iOS SDK installed (8.1) ✓ WWDR cert installed ✓ developer cert installed (2 found) ! distribution cert not found ✓ dev provisioning installed (8 found) ✓ dist provisioning installed (2 found) Android Environment ✓ sdk installed (/Users/jacklee/android-sdk-macosx) ✓ tools installed (v24.1.2) ✓ platform tools installed (v21) ! build tools untested version 22.0.0; may or may not work ✓ adb installed /Users/jacklee/android-sdk-macosx/platform-tools/adb ✓ android installed /Users/jacklee/android-sdk-macosx/tools/android ✓ emulator installed /Users/jacklee/android-sdk-macosx/tools/emulator ✓ mksdcard installed /Users/jacklee/android-sdk-macosx/tools/mksdcard ✓ zipalign installed /Users/jacklee/android-sdk-macosx/build-tools/22.0.0/zipalign ✓ aapt installed /Users/jacklee/android-sdk-macosx/build-tools/22.0.0/aapt ✓ aidl installed /Users/jacklee/android-sdk-macosx/build-tools/22.0.0/aidl ✓ targets installed (10 found) ✓ avds installed (3 found) ✓ ndk installed (undefined) ✓ ndk-build installed (undefined) Java Development Kit ✓ jdk installed (v1.7.0) ✓ java installed /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/java ✓ javac installed /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/javac ✓ keytool installed /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/keytool ✓ jarsigner installed /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/bin/jarsigner Intel® Hardware Accelerated Execution Manager (HAXM) ✓ compatible ✓ installed Network ✓ online - no proxy server configured ✓ http request test ✓ https request test Directory Permissions ✓ home directory ✓ titanium config directory ✓ titanium sdk install directory ✓ temp directory
  3. Jack lee 2015-03-20

    Prove a Check Environment in for My Mac Machine.
  4. Jack lee 2015-03-23

    Dear Shuo Liang I have provide the information . please let me know if you need more information for check. Thanks. Jack Lee
  5. Rakhi Mitro 2015-08-26

    Hello, I have tested this issue in updated environment. This is working as expected. *Test Environments:* CLI Version :4.0.1 Titanium SDK Version :4.1.0.GA Appcelerator Studio, build: 4.1.1.201507141126 java version :1.7.0_25 Operating System= Mac OS X, Version 10.10.1 *Steps to do:* 1.Check if Java JDK is installed: java --version (if not installed you can download it from [here ](http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html) ) 2.Check [Android Module Prerequisites ](http://docs.appcelerator.com/platform/latest/#!/guide/Android_Module_Quick_Start-section-43289022_AndroidModuleQuickStart-AndroidModulePrerequisites) . 3.From Appcelerator Studio menu, *select File > New > Mobile Module Project* to open the New Mobile Module Project dialog. 4.In the Project hame field, enter testrakhi. 5.In the Module Id field, enter *com.example. testrakhi* 6.In Deployment Targets, select Android.(if need install JDT & check NDK Settings) 7.Click Next, then click Finish. 8.Open the *new module >android>build.properties* Add NDK settings to *build.properties* file
       
       android.ndk =/Users/gsl5/Library/android-ndk-r8e
       
       
    9.Module Build : Right Click On *Module->Publish> Package Android Module* *Or* Build *Using Ant:* From a terminal,go to the module’s android directory and run ant *android /Users/gsl5/Documents/apache_ant/bin/ant* After the build completes, there will be a BUILD SUCCESSFUL Message in Terminal. *Test Results:* Android Module Packaging is Successful.Check [this](http://i57.tinypic.com/149qech.png) . Thanks

JSON Source