-
Notifications
You must be signed in to change notification settings - Fork 0
Compiling & Importing PBD SDK
###Compile Pay-by-Data SDK
Make sure the PBD code and the original AOSP is merged correctly.
Go the the root directory of you AOSP folder, and execute the followings:
. build/envsetup.sh
lunch sdk-eng
make update-api
make sdk or make -j6 sdk
###Import PBD SDK into Android Studio The compiled sdk should be in out/host/linux-x86/sdk. Copy the sdk to another location to avoid it being overwritten by future build.
Go to your copied custom sdk directory, enter the subfolder called platforms, you will see another subfolder(probably named android-5.0.2). Change the subfolder's name to android-, being your sdk api level. In this case(for android-5.0.2): android-21.
Open Android Studio, create a new project, go to Project Structure under Files tab, to change the SDK path to the one you built.
Then update build.Gradle(Module:app) file: update compileSdkVersion & targetSdkVersion to the custom sdk api level(21). update the support library in the dependencies block to a version that matched the compileSdkVersion(21.0.2).
After the indexing is completed, you should be able to access the PBD API within Android Studio. If not, try Invalidate cache and restart in Files tab. After the restart it should be working.
###Running PBD Emulator The PBD versions of emulator will be compiled together with the SDK. It's located in /system_images. For this android-5.0.2_r1 source code, if you followed my instructions you might build an emulator system image with ABI armeabi-v7a. This is ABI is declared to be 10x slower than the x86 ABI, so try to compile the x86 if you know how.
You need to install Emulator first if you haven't done so. Then create a new emulator, choose Nexus 7 device and choose a Lollipop system image with API 21 armeabi-v7a. You should notice that's the only one you don't need to download, because it has been built together with your SDK.