Build "Sources for Android 27" so you can comfortably browse the Android API source in Android Studio.
- Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base| /** | |
| * Downloads all android-all dependencies and copies them to the mavenLocal() repository | |
| * | |
| * Once applied to your gradle project, can be executed with ./gradlew robolectricSdkDownload | |
| */ | |
| import java.nio.file.Files | |
| // The general idea of this was borrowed from https://gist.github.com/xian/05c4f27da6d4156b9827842217c2cd5c | |
| // I then modified it heavily to allow easier addition of new SDK versions |
Build "Sources for Android 27" so you can comfortably browse the Android API source in Android Studio.
mkdir android-sdk-source-build
cd android-sdk-source-build
mkdir -p frameworks/base| def robolectricVersion = '3.3' | |
| def androidSdkVersions = [ | |
| '4.1.2_r1-robolectric-0', | |
| '4.2.2_r1.2-robolectric-0', | |
| '4.3_r2-robolectric-0', | |
| '4.4_r1-robolectric-1', | |
| '5.0.0_r2-robolectric-1', | |
| '5.1.1_r9-robolectric-1', | |
| '6.0.0_r1-robolectric-0', |
| public class AndroidApplication extends MultiDexApplication { | |
| public static final String TAG = AndroidApplication.class.getSimpleName(); | |
| @Override | |
| public void onCreate() { | |
| super.onCreate(); | |
| registerComponentCallbacks(new ComponentCallback()); | |
| } | |
| private class ComponentCallback implements ComponentCallbacks2 { |
| Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. | |
| To use the support version of these attributes, remove the android namespace. | |
| For instance, "android:colorControlNormal" becomes "colorControlNormal". | |
| These attributes will be propagated to their corresponding attributes within the android namespace | |
| for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
| All Clickable Views: | |
| ----------- |
Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.
For more information see square/okhttp#967
Usage
| NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services | |
| Download the following ZIPs: | |
| ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
| Download the correct GApps for your Android version: | |
| Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
| Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
| Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) |