-
Notifications
You must be signed in to change notification settings - Fork 61
Android Studio
Juan Corona edited this page Jul 15, 2015
·
5 revisions
Without doing a Gradle migration, using the original project files.
Follow these steps for *nix (OSX tested)
mkdir ~/root-project-location && cd ~/root-project-location
git clone --recursive https://github.com/readium/SDKLauncher-Android.git
- Quick Start menu > Import project (Eclipse ADT, Gradle, etc.)
- Select
~/root-project-location/SDKLauncher-Android
and not the inner SDKLauncher-Android folder - Create project from existing sources > Next > Project name, location > Next
- Then you select the source file directories. Uncheck the two Readium_SDK_Test_Android entries to simplify things
- Review the libraries found, there should be a 'libs' entry with two items > Next
- Review suggested modules, there should be two modules named
Android
andSDKLauncher-Android
> Next - Select project SDK. Here I select Android API 21 Platform > Next
- Folders are scanned.. then it shows two AndroidManifest.xml files in a list > Finish
- While the project is indexing in Android Studio:
- Open a terminal again and
cd ~/root-project-location/SDKLauncher-Android/readium-sdk/
sh MakeHeaders.sh Android
cd Platform/Android
./ndk-compile.sh build
- This will compile the readium-sdk, if it is successful you will see:
[armeabi-v7a] Install : libepub3.so => libs/armeabi-v7a/libepub3.so
- Go back to Android Studio, create a Run/Debug Configuration for Android Application, select the SDKLauncher-Android module.
- You should be good to go.
Notes:
- You can't build the readium-sdk native code from Android Studio you must use the ndk-compile.sh script.
- Debugging the readium-sdk native code is not possible yet from Android Studio