So, I'm trying to work with Android N. I'm a fairly new android developer, my goal is to make the app compatible with N features like multi-window, while still having it work on earlier versions.
Here is how I start my build.gradle:
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
There's an error message that says "buildTypes cannot be applied to '(groovy.lang.Closure)'"
Try adding a blank line before your
buildTypes line. If that does not help, consider editing your question and posting the entire
build.gradle file, rather than the subset.
I'm not using groovy at all in this app
Gradle is based on Groovy.
Could I just use 24.0.0?
Or is there a place I can look that up, specifically.
$ANDROID_HOME is wherever your Android SDK is installed. Generally speaking, all of the
com.android.support libraries get updated in unison, so looking up one (e.g.,
appcompat-v7) should give you a valid version number to use for the others.
You are also welcome to try setting up your dependencies via the Project Structure dialog in Android Studio. Personally, I work with the
build.gradle file directly.
Can I safely use the Java 8 features with the Jack toolchain with my app still working on pre-N versions of Android?
You cannot use the new classes (e.g.,
java.util.stream), as they are new to API Level 24. Other features are supposed to work going back to API Level 7 IIRC. That being said, I have not tried them yet.