the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath “$CLASSPATH" GradleWrapperMain "$@"
the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables JAVACMD="$JAVA_HOME/jre/sh/java" else JAVACMD="$JAVA_HOME/bin/java" fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else JAVACMD="java" which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath “$CLASSPATH" GradleWrapperMain "$@" gradlew
mLocations = 3; } public int getmLocations() { return mLocations; } } public class Locations { private int mLocations; public Locations() { mLocations = 5; } public int getmLocations() { return mLocations; } }
mLocations = 3; } public int getmLocations() { return mLocations; } } public class Locations { private int mLocations; public Locations() { mLocations = 5; } public int getmLocations() { return mLocations; } } Locations locations = new Locations(); ((TextView) findViewById(R.id.text)).setText(locations.getmLocations());
= Boolean.parseBoolean("true"); public static final String PACKAGE_NAME = "com.gdg.dublin"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = "dublin"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; // Fields from product flavor: dublin public static final String API_KEY = "xxxxx"; }
= Boolean.parseBoolean("true"); public static final String PACKAGE_NAME = "com.gdg.dublin"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = "dublin"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; // Fields from product flavor: dublin public static final String API_KEY = "xxxxx"; } public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String PACKAGE_NAME = "com.gdg.cork"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = "cork"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; // Fields from product flavor: cork public static final String API_KEY = "yyyy"; }
= Boolean.parseBoolean("true"); public static final String PACKAGE_NAME = "com.gdg.dublin"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = "dublin"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; // Fields from product flavor: dublin public static final String API_KEY = "xxxxx"; } public final class BuildConfig { public static final boolean DEBUG = Boolean.parseBoolean("true"); public static final String PACKAGE_NAME = "com.gdg.cork"; public static final String BUILD_TYPE = "debug"; public static final String FLAVOR = "cork"; public static final int VERSION_CODE = 1; public static final String VERSION_NAME = "1.0"; // Fields from product flavor: cork public static final String API_KEY = "yyyy"; } ((TextView) findViewById(R.id.text)).setText(BuildConfig.API_KEY);
Installs and runs the tests for Build 'debug' on connectedCheck - Runs all device checks on currently connected devices. deviceCheck - Runs all device checks using Device Providers and Test Servers. lint - Runs lint on all variants. lintDebug - Runs lint on the Debug build lintRelease - Runs lint on the Release build apply plugin: ‘com.android.library’ apply plugin: ‘com.android.application’ plugins