dinsdag 15 december 2015

JDeveloper MAF Android Emulation

During a simple tutorial/training to run a MAF application that was pre-build from my JDeveloper 12 version I was going from one installation to another before I got something to work.

Follow these steps to emulate your MAF application build in JDeveloper on an Android device ..

1. Make sure MAF Extension is installed in JDeveloper.
Choose Help, Check for Updates and check the MAF Extension to install it.

2. Install JDK 8, which MAF needs

3. Download the Android SDK

4. Generate a key store for your Android keys.

First make sure you know the java home on your machine.
Then open a cmd windw and navigate to that directory. Now type

keytool -genkey -v -keystore mykey.keystore -alias mykey -keyalg RSA -keysize 2048 -validity 10000

I had some issues with the - when I copied it from Step 6 Deploy and Test the application

Make sure you remember the password :-).

5. Make sure you install the packages as described in the Android SDK

Don't forget this step
To use the Intel x86 Emulator Accelerator, once downloaded, you then must then install the drivers.
To install the Intel HAXM executable, search your hard drive for IntelHaxm.exe.

Navigate to Windows Explorer and locate the <android_home>\android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager\intelhaxm-android.exe file. Double click it and you can use the defaults while it installs.

6. In JDeveloper make sure you set the MAF Android settings as described in Step 6

If you would deploy now you would get
Failed to detect a connected Android emulator.  Make sure the emulator is running.  Otherwise, manually restart the ADB server.  The following results were provided by ADB:
List of devices attached

Because you have to do step 7 first, start the emulator.

7. Start the Emulator using the SDK Manager at the location where you installed the Android SDK.
See step 22 at

AVD Name = MAF
Device = Nexus 7
Target = Android 5.0.1 - API Level 21
CPU/ABI = Intel Atom (x86_64)
Internal Storage = 200 MiB
Skin = No Skin
Front Camera = Emulated
Back Camera = None
Memory Options Ram = 1024
SD Card = 640 MiB
Use Host GPU = Selected

If you get
Starting emulator for AVD 'MAF'
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAX kernel module is not installed!

You forgot step 5 :-).

Geen opmerkingen:

Een reactie posten

Opmerking: Alleen leden van deze blog kunnen een reactie posten.