Hi, there are some fundamental issues in your code that you should fix first: You try to make a console application (main method in c) but compiling it as shared library with the ndk (BUILD SHAREDLIBS).Compiling arm assembly code (stmfd) for x86 targets (APPABI:= x86) will not work.
- Aug 13, 2019.
- Apr 24, 2014.
- Jul 23, 2020.
This is a guide for Mac OS X (tested on 10.9.2) based on the Windows and Linux guides (if you look closely there's a lot of copy-paste text from those guides).
Install Java SDK
JDK for short is needed for the Android SDK, you can find it here (select the one without NetBeans since it's not needed).
In the following page Accept the License Agreement and download the right file for your system (Mac OS X x64). Then just install the Java SDK normally.
Apache Ant
Download Apache Ant from its website in the Binary Distribution section.
Go to the 'Current Release of Ant' and select the zip file.
Once downloaded unzip it in a known directory. e.g:
/Developer/Tools/ant
Installing the Android SDK
Then you have to install the Android SDK.
WARNING: The Download button on the right is for preconfigured install. Instead go to 'Use an existing IDE' and click that Download link.
Once downloaded unzip it in a known directory. e.g:
/Developer/SDKs/android-sdk-macosx
SDK Tools
Once you have unzipped the Android SDK execute it:
and install the following tools:
- Android SDK Platform-tools (latest)
- Android SDK Build-Tools API 19.1
- SDK Platform Android 4.4.2 API 19
- ARM EABI v7a System Image API 19
- Google APIs ARM System Image API 19
- Sources for Android SDK API 19
- Android Support Library
The following screenshot shows the selected tools on Android SDK Manager screen:
(
Install Package
should be enabled to you, mine isn't because it's already installed)
Select the 'Accept License' radial, and click Install.
Android NDK
Android Ndk R9d Download Mac High Sierra
Once you have the SDK tools you can get the NDK version r9d from here (Download acording to your system).This is a zip file, you can unzip it wherever you want. e.g:
/Developer/Tools/ndk
Clone the love-android-sdl2
repo
Download the
love-android-sdl2
repo. For this task you can use a Git tool or just download it from the Downloads section in a zip file
Git:
Download:
Once in the download page go to the Tags section and there download the lastest version (.zip files are prefered)
You can place the repository wherever you want. e.g
~/repos
Set up environment vars
![High High](/uploads/1/2/6/8/126854280/972853951.jpg)
To avoid headaches, i do recommend to set environment variables this way:
Set Android Variables
Open up a Terminal window (you can use Spotlight, write
terminal
and press enter, or you can find it on the /Applications/Utilities
folder) and type the following:
This will start nano text editor with (probably) a blank file. Then, you need to add the following lines to the file:
If you've saved the Android SDK and/or NDK in different paths, edit them accordingly.
After that, hit Control + X (to exit the editor) and type Y (to save changes to file)
Update PATH
Still in Terminal, type the following:
and press Enter. Another text editor should open. In this file, add the following lines:
The first line is the
tools
folder of Android SDK folder, the second one is the platform-tools
folder. And the last one is the path of bin
folder of Apache Ant package. If you used different paths, edit them accordingly.
Run ndk-build
Finally (and still in Terminal), navigate to your
love-android-sdl2
folder and run ndk-build:
Android Ndk R9d Download Macromedia
Optionally you can supply the
--jobs
flag if you have multiple cores. Suggested usage is n+1
cores, where n
is the number of cores your machine has. This is what one might use for an 8 core machine;
Then, make the changes specific to your game following the Game Packaging page.
Build
Use Apache Ant to deploy:
You should now have a apk that should run on your device located at:
Updated
Hi, I read these steps and git the zynq-boot repo and find that clearreg.S has been updated as clearreg.c. But, the question is, _binary_imagefiles_zImage_start(int, int, int) seems to be defined nowhere, or have I missed something? I am interested in booting Minix 3 on a ZedBoard. I think that it is good idea to boot it without U-boot. But Minix image is far from a Linux image. a Minix bootable image consists of kernel.bin and other 11 server ELFs. I don't know how to arrange them in the final image. Do you have any idea about this?
Android Ndk R9d Download Mac Os
Thanks a lot!