-
Notifications
You must be signed in to change notification settings - Fork 631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated the Android build instructions. #1779
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,18 +2,48 @@ | |
|
||
Download the latest [build for Android](http://d.etpan.org/mailcore2-deps/mailcore2-android/) | ||
|
||
### Build for Android ### | ||
### Build on Mac ### | ||
Tested with macOS 10.13.6, Android Studio 3.1.4 | ||
|
||
Install Java 6, 8, or 10 | ||
* http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html | ||
* Building with Java 8 or 10 might throw a few warnings during the build, but it will still build | ||
|
||
Download the Required Android SDKs (16, 21, 22) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here with Android SDK and NDK. |
||
* Download using Android Studio | ||
|
||
Download the Required NDK (13) | ||
* https://dl.google.com/android/repository/android-ndk-r13b-darwin-x86_64.zip | ||
|
||
Open terminal and set two temporary export variables | ||
* (Make sure they point to your SDK and NDK folders) | ||
``` | ||
export ANDROID_SDK=/Users/YOURNAME/Library/Android/sdk | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you keep it as /path/to/android-sdk (and maybe provide a specific example). Like
|
||
export ANDROID_NDK=/Users/YOURNAME/Downloads/android-ndk-r13b | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Downloads is not a great path to install a SDK/NDK ;) |
||
``` | ||
|
||
Clone the repo and goto the `src` folder | ||
``` | ||
git clone https://github.com/MailCore/mailcore2.git | ||
cd mailcore2 | ||
cd src | ||
``` | ||
|
||
Copy the headers into the build folder | ||
``` | ||
mkdir -p ../build-android/include/MailCore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there any way we could make sure build.sh does it for us? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you update the build.sh script to take care of it instead of adding more instructions? |
||
cp `find . -name '*.h'` ../build-android/include/MailCore/ | ||
``` | ||
|
||
Run the build script | ||
``` | ||
$ export ANDROID_SDK=/path/to/android-sdk | ||
$ export ANDROID_NDK=/path/to/android-ndk | ||
$ cd build-android | ||
$ ./build.sh | ||
cd ../build-android | ||
./build.sh | ||
``` | ||
|
||
It will produce the following binaries: | ||
It will generate `mailcore2-android-*version*.aar` | ||
|
||
- mailcore2-android-*version*.aar | ||
To modify the version number, change the `build_version` in `build.sh` and rerun `./build.sh` (make sure you set your export variables, as listed above) | ||
|
||
### Running example ### | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you try not being too specific with downloads URLs?
Java version will evolve over time and I'd like to avoid changing these instructions too often.