From 58ff02a3f4b7b43bc1c1d90e35bb45b94ae77753 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Tue, 20 May 2014 12:41:50 +1000 Subject: [PATCH] Build with dependency on support-appcompat-v7. Thanks to the awesome work of mvdan, this was mostly ready to roll. However, I had to wrestle for a while for two reasons: 1) I forgot to add the dependency in the build.gradle file (it was already present in settings.gradle) 2) My IDE was unable to read the ANDROID_HOME env variable, and despite my internet-search-fu, I couldn't figure out how to make IntelliJ specify env variables for a gradle build. It took a while to figure out, because it was failing silently in weird ways. After slaving away on a nice method to parse both the ANDROID_HOME and the local.properties file (looking for sdk.dir), and then emmiting nice error messages if neither were found or pointed to an invalid location, I discovered it had already be done: android.plugin.sdkDirectory ends up here: https://android.googlesource.com/platform/tools/build/+/master/gradle/src/main/groovy/com/android/build/gradle/internal/Sdk.groovy#161 Which does exactly all that and more. So now sdkLoc is initialized to the value of android.plugin.sdkDirectory. --- AndroidManifest.xml | 2 +- build.gradle | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 280ec4d33..0a372cd23 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -7,7 +7,7 @@ android:versionName="0.69-test" >