Make consistent use of gradle wrapper (#10993)

diff --git a/dev/benchmarks/complex_layout/android/.gitignore b/dev/benchmarks/complex_layout/android/.gitignore
index 1fd9325..3caaa44 100644
--- a/dev/benchmarks/complex_layout/android/.gitignore
+++ b/dev/benchmarks/complex_layout/android/.gitignore
@@ -8,6 +8,6 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/dev/benchmarks/complex_layout/android/app/build.gradle b/dev/benchmarks/complex_layout/android/app/build.gradle
index 1e4b757..9506616 100644
--- a/dev/benchmarks/complex_layout/android/app/build.gradle
+++ b/dev/benchmarks/complex_layout/android/app/build.gradle
@@ -23,6 +23,10 @@
     }
 
     defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/dev/benchmarks/complex_layout/android/app/src/main/AndroidManifest.xml b/dev/benchmarks/complex_layout/android/app/src/main/AndroidManifest.xml
index df92d8b..c93aafa 100644
--- a/dev/benchmarks/complex_layout/android/app/src/main/AndroidManifest.xml
+++ b/dev/benchmarks/complex_layout/android/app/src/main/AndroidManifest.xml
@@ -1,9 +1,6 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.yourcompany.complexLayout"
-    android:versionCode="1"
-    android:versionName="0.0.1">
+    package="com.yourcompany.complexLayout">
 
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
     <uses-permission android:name="android.permission.INTERNET"/>
 
     <application android:name="io.flutter.app.FlutterApplication" android:label="complex_layout" android:icon="@mipmap/ic_launcher">
diff --git a/dev/benchmarks/complex_layout/android/build.gradle b/dev/benchmarks/complex_layout/android/build.gradle
index 14662e4..77cbd09 100644
--- a/dev/benchmarks/complex_layout/android/build.gradle
+++ b/dev/benchmarks/complex_layout/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -20,12 +23,9 @@
 rootProject.buildDir = '../build'
 subprojects {
     project.buildDir = "${rootProject.buildDir}/${project.name}"
+    project.evaluationDependsOn(':app')
 }
 
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/dev/benchmarks/complex_layout/android/gradle/wrapper/gradle-wrapper.properties b/dev/benchmarks/complex_layout/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/dev/benchmarks/complex_layout/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/dev/benchmarks/microbenchmarks/android/.gitignore b/dev/benchmarks/microbenchmarks/android/.gitignore
index 1fd9325..3caaa44 100644
--- a/dev/benchmarks/microbenchmarks/android/.gitignore
+++ b/dev/benchmarks/microbenchmarks/android/.gitignore
@@ -8,6 +8,6 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/dev/benchmarks/microbenchmarks/android/app/build.gradle b/dev/benchmarks/microbenchmarks/android/app/build.gradle
index 7ecba36..16c4a2a 100644
--- a/dev/benchmarks/microbenchmarks/android/app/build.gradle
+++ b/dev/benchmarks/microbenchmarks/android/app/build.gradle
@@ -23,6 +23,10 @@
     }
 
     defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/dev/benchmarks/microbenchmarks/android/app/src/main/AndroidManifest.xml b/dev/benchmarks/microbenchmarks/android/app/src/main/AndroidManifest.xml
index 446489e..1c10c5a 100644
--- a/dev/benchmarks/microbenchmarks/android/app/src/main/AndroidManifest.xml
+++ b/dev/benchmarks/microbenchmarks/android/app/src/main/AndroidManifest.xml
@@ -1,9 +1,6 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.yourcompany.microbenchmarks"
-    android:versionCode="1"
-    android:versionName="0.0.1">
+    package="com.yourcompany.microbenchmarks">
 
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
     <uses-permission android:name="android.permission.INTERNET"/>
 
     <application android:name="io.flutter.app.FlutterApplication" android:label="microbenchmarks" android:icon="@mipmap/ic_launcher">
diff --git a/dev/benchmarks/microbenchmarks/android/build.gradle b/dev/benchmarks/microbenchmarks/android/build.gradle
index 14662e4..77cbd09 100644
--- a/dev/benchmarks/microbenchmarks/android/build.gradle
+++ b/dev/benchmarks/microbenchmarks/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -20,12 +23,9 @@
 rootProject.buildDir = '../build'
 subprojects {
     project.buildDir = "${rootProject.buildDir}/${project.name}"
+    project.evaluationDependsOn(':app')
 }
 
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/dev/benchmarks/microbenchmarks/android/gradle/wrapper/gradle-wrapper.properties b/dev/benchmarks/microbenchmarks/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/dev/benchmarks/microbenchmarks/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/dev/integration_tests/channels/android/.gitignore b/dev/integration_tests/channels/android/.gitignore
index 1fd9325..3caaa44 100644
--- a/dev/integration_tests/channels/android/.gitignore
+++ b/dev/integration_tests/channels/android/.gitignore
@@ -8,6 +8,6 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/dev/integration_tests/channels/android/app/build.gradle b/dev/integration_tests/channels/android/app/build.gradle
index 4b058ea..40c3dca 100644
--- a/dev/integration_tests/channels/android/app/build.gradle
+++ b/dev/integration_tests/channels/android/app/build.gradle
@@ -23,6 +23,10 @@
     }
 
     defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/dev/integration_tests/channels/android/app/src/main/AndroidManifest.xml b/dev/integration_tests/channels/android/app/src/main/AndroidManifest.xml
index b63cc17..199e25e 100644
--- a/dev/integration_tests/channels/android/app/src/main/AndroidManifest.xml
+++ b/dev/integration_tests/channels/android/app/src/main/AndroidManifest.xml
@@ -1,9 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.yourcompany.channels"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="com.yourcompany.channels">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/dev/integration_tests/channels/android/build.gradle b/dev/integration_tests/channels/android/build.gradle
index f5004b9..77cbd09 100644
--- a/dev/integration_tests/channels/android/build.gradle
+++ b/dev/integration_tests/channels/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/dev/integration_tests/channels/android/gradle/wrapper/gradle-wrapper.properties b/dev/integration_tests/channels/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000..45e7f14
--- /dev/null
+++ b/dev/integration_tests/channels/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/dev/integration_tests/ui/android/.gitignore b/dev/integration_tests/ui/android/.gitignore
index 1fd9325..3caaa44 100644
--- a/dev/integration_tests/ui/android/.gitignore
+++ b/dev/integration_tests/ui/android/.gitignore
@@ -8,6 +8,6 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/dev/integration_tests/ui/android/app/build.gradle b/dev/integration_tests/ui/android/app/build.gradle
index ef18a0c..134fe51 100644
--- a/dev/integration_tests/ui/android/app/build.gradle
+++ b/dev/integration_tests/ui/android/app/build.gradle
@@ -23,6 +23,10 @@
     }
 
     defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/dev/integration_tests/ui/android/app/src/main/AndroidManifest.xml b/dev/integration_tests/ui/android/app/src/main/AndroidManifest.xml
index 36315a0..5713077 100644
--- a/dev/integration_tests/ui/android/app/src/main/AndroidManifest.xml
+++ b/dev/integration_tests/ui/android/app/src/main/AndroidManifest.xml
@@ -3,11 +3,7 @@
      found in the LICENSE file.
  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.yourcompany.integration_ui"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="com.yourcompany.integration_ui">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/dev/integration_tests/ui/android/build.gradle b/dev/integration_tests/ui/android/build.gradle
index f5004b9..77cbd09 100644
--- a/dev/integration_tests/ui/android/build.gradle
+++ b/dev/integration_tests/ui/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/dev/integration_tests/ui/android/gradle/wrapper/gradle-wrapper.properties b/dev/integration_tests/ui/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/dev/integration_tests/ui/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/dev/manual_tests/android/.gitignore b/dev/manual_tests/android/.gitignore
index 1fd9325..3caaa44 100644
--- a/dev/manual_tests/android/.gitignore
+++ b/dev/manual_tests/android/.gitignore
@@ -8,6 +8,6 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/dev/manual_tests/android/app/src/main/AndroidManifest.xml b/dev/manual_tests/android/app/src/main/AndroidManifest.xml
index 1186722..03b88c4 100644
--- a/dev/manual_tests/android/app/src/main/AndroidManifest.xml
+++ b/dev/manual_tests/android/app/src/main/AndroidManifest.xml
@@ -4,11 +4,7 @@
      found in the LICENSE file.
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.manual_tests"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="io.flutter.examples.manual_tests">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/dev/manual_tests/android/build.gradle b/dev/manual_tests/android/build.gradle
index f5004b9..77cbd09 100644
--- a/dev/manual_tests/android/build.gradle
+++ b/dev/manual_tests/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/dev/manual_tests/android/gradle/wrapper/gradle-wrapper.properties b/dev/manual_tests/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000..45e7f14
--- /dev/null
+++ b/dev/manual_tests/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/README.md b/examples/README.md
index face684..cbbfb07 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -44,3 +44,12 @@
 
 - **Stocks** The [stocks](stocks) demo shows how one might structure
   an application with several screens.
+
+Note on Gradle wrapper files in `.gitignore`:
+
+Gradle wrapper files should normally be checked into source control.
+The example projects don't do that to avoid having several copies of the
+wrapper binary in the Flutter repo. Instead, the Gradle wrapper is
+injected by Flutter tooling, and the wrapper files are .gitignore'd to
+avoid making the Flutter repository dirty as a side effect of running
+the examples.
diff --git a/examples/catalog/android/.gitignore b/examples/catalog/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/catalog/android/.gitignore
+++ b/examples/catalog/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/catalog/android/app/build.gradle b/examples/catalog/android/app/build.gradle
index 7ecba36..0e54747 100644
--- a/examples/catalog/android/app/build.gradle
+++ b/examples/catalog/android/app/build.gradle
@@ -23,6 +23,11 @@
     }
 
     defaultConfig {
+        applicationId "io.flutter.examples.catalog"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/examples/catalog/android/app/src/main/AndroidManifest.xml b/examples/catalog/android/app/src/main/AndroidManifest.xml
index fe5d57a..d53f899 100644
--- a/examples/catalog/android/app/src/main/AndroidManifest.xml
+++ b/examples/catalog/android/app/src/main/AndroidManifest.xml
@@ -1,9 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.yourcompany.animated_list"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="com.yourcompany.animated_list">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/catalog/android/build.gradle b/examples/catalog/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/catalog/android/build.gradle
+++ b/examples/catalog/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/catalog/android/gradle/wrapper/gradle-wrapper.properties b/examples/catalog/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/catalog/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/flutter_gallery/android/.gitignore b/examples/flutter_gallery/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/flutter_gallery/android/.gitignore
+++ b/examples/flutter_gallery/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/flutter_gallery/android/app/build.gradle b/examples/flutter_gallery/android/app/build.gradle
index a478003..893cbbd 100644
--- a/examples/flutter_gallery/android/app/build.gradle
+++ b/examples/flutter_gallery/android/app/build.gradle
@@ -23,10 +23,12 @@
     }
 
     defaultConfig {
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
-        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "io.flutter.examples.gallery"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
diff --git a/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml b/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml
index c854b13..feb9111 100644
--- a/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml
+++ b/examples/flutter_gallery/android/app/src/main/AndroidManifest.xml
@@ -4,11 +4,7 @@
      found in the LICENSE file.
  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.gallery"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="io.flutter.examples.gallery">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/flutter_gallery/android/build.gradle b/examples/flutter_gallery/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/flutter_gallery/android/build.gradle
+++ b/examples/flutter_gallery/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/flutter_gallery/android/gradle/wrapper/gradle-wrapper.properties b/examples/flutter_gallery/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/flutter_gallery/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/flutter_view/android/.gitignore b/examples/flutter_view/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/flutter_view/android/.gitignore
+++ b/examples/flutter_view/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/flutter_view/android/app/build.gradle b/examples/flutter_view/android/app/build.gradle
index 1b738a4..e3d4c7a 100644
--- a/examples/flutter_view/android/app/build.gradle
+++ b/examples/flutter_view/android/app/build.gradle
@@ -23,6 +23,11 @@
     }
 
     defaultConfig {
+        applicationId "io.flutter.examples.flutter_view"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/examples/flutter_view/android/app/src/main/AndroidManifest.xml b/examples/flutter_view/android/app/src/main/AndroidManifest.xml
index 8ccf7b8..4b186df 100644
--- a/examples/flutter_view/android/app/src/main/AndroidManifest.xml
+++ b/examples/flutter_view/android/app/src/main/AndroidManifest.xml
@@ -1,9 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.view"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="com.example.view">
 
     <!-- The INTERNET permission is required for development. Specifically, flutter needs it to communicate with the running application
          to allow setting breakpoints, to provide hot reload, etc.
diff --git a/examples/flutter_view/android/build.gradle b/examples/flutter_view/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/flutter_view/android/build.gradle
+++ b/examples/flutter_view/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/flutter_view/android/gradle/wrapper/gradle-wrapper.properties b/examples/flutter_view/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/flutter_view/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/hello_world/android/.gitignore b/examples/hello_world/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/hello_world/android/.gitignore
+++ b/examples/hello_world/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/hello_world/android/app/build.gradle b/examples/hello_world/android/app/build.gradle
index dc36ce3..7b3edc8 100644
--- a/examples/hello_world/android/app/build.gradle
+++ b/examples/hello_world/android/app/build.gradle
@@ -23,10 +23,12 @@
     }
 
     defaultConfig {
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
-        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "io.flutter.examples.hello_world"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
diff --git a/examples/hello_world/android/app/src/main/AndroidManifest.xml b/examples/hello_world/android/app/src/main/AndroidManifest.xml
index 46ceb56..2ef9e89 100644
--- a/examples/hello_world/android/app/src/main/AndroidManifest.xml
+++ b/examples/hello_world/android/app/src/main/AndroidManifest.xml
@@ -4,11 +4,7 @@
      found in the LICENSE file.
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.hello_world"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="io.flutter.examples.hello_world">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/hello_world/android/build.gradle b/examples/hello_world/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/hello_world/android/build.gradle
+++ b/examples/hello_world/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/hello_world/android/gradle/wrapper/gradle-wrapper.properties b/examples/hello_world/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/hello_world/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/layers/android/.gitignore b/examples/layers/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/layers/android/.gitignore
+++ b/examples/layers/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/layers/android/app/build.gradle b/examples/layers/android/app/build.gradle
index 7ecba36..374a20a 100644
--- a/examples/layers/android/app/build.gradle
+++ b/examples/layers/android/app/build.gradle
@@ -23,6 +23,11 @@
     }
 
     defaultConfig {
+        applicationId "io.flutter.examples.layers"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
diff --git a/examples/layers/android/app/src/main/AndroidManifest.xml b/examples/layers/android/app/src/main/AndroidManifest.xml
index c4c3bc1..c629496 100644
--- a/examples/layers/android/app/src/main/AndroidManifest.xml
+++ b/examples/layers/android/app/src/main/AndroidManifest.xml
@@ -1,9 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.Layers"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="io.flutter.examples.Layers">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/layers/android/build.gradle b/examples/layers/android/build.gradle
index 14662e4..77cbd09 100644
--- a/examples/layers/android/build.gradle
+++ b/examples/layers/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -20,12 +23,9 @@
 rootProject.buildDir = '../build'
 subprojects {
     project.buildDir = "${rootProject.buildDir}/${project.name}"
+    project.evaluationDependsOn(':app')
 }
 
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/layers/android/gradle/wrapper/gradle-wrapper.properties b/examples/layers/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/layers/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/platform_channel/android/.gitignore b/examples/platform_channel/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/platform_channel/android/.gitignore
+++ b/examples/platform_channel/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/platform_channel/android/app/build.gradle b/examples/platform_channel/android/app/build.gradle
index e6b8313..409bbfb 100644
--- a/examples/platform_channel/android/app/build.gradle
+++ b/examples/platform_channel/android/app/build.gradle
@@ -23,8 +23,12 @@
     }
 
     defaultConfig {
+        applicationId "io.flutter.examples.platform_channel"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-        applicationId "com.example.platformchannel"
     }
 
     buildTypes {
diff --git a/examples/platform_channel/android/app/src/main/AndroidManifest.xml b/examples/platform_channel/android/app/src/main/AndroidManifest.xml
index 9af2839..290a6ce 100644
--- a/examples/platform_channel/android/app/src/main/AndroidManifest.xml
+++ b/examples/platform_channel/android/app/src/main/AndroidManifest.xml
@@ -1,10 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.platformchannel"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="com.example.platformchannel">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/platform_channel/android/build.gradle b/examples/platform_channel/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/platform_channel/android/build.gradle
+++ b/examples/platform_channel/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/platform_channel/android/gradle/wrapper/gradle-wrapper.properties b/examples/platform_channel/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/platform_channel/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/platform_view/android/.gitignore b/examples/platform_view/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/platform_view/android/.gitignore
+++ b/examples/platform_view/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/platform_view/android/app/build.gradle b/examples/platform_view/android/app/build.gradle
index b3cc1c9..e5f19bf 100644
--- a/examples/platform_view/android/app/build.gradle
+++ b/examples/platform_view/android/app/build.gradle
@@ -23,10 +23,12 @@
     }
 
     defaultConfig {
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
-        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "io.flutter.examples.platform_view"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
diff --git a/examples/platform_view/android/app/src/main/AndroidManifest.xml b/examples/platform_view/android/app/src/main/AndroidManifest.xml
index 770618b..3259eb2 100644
--- a/examples/platform_view/android/app/src/main/AndroidManifest.xml
+++ b/examples/platform_view/android/app/src/main/AndroidManifest.xml
@@ -1,11 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.platform_view"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk
-        android:minSdkVersion="16"
-        android:targetSdkVersion="21" />
+    package="io.flutter.examples.platform_view">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/platform_view/android/build.gradle b/examples/platform_view/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/platform_view/android/build.gradle
+++ b/examples/platform_view/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/platform_view/android/gradle/wrapper/gradle-wrapper.properties b/examples/platform_view/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..45e7f14
--- /dev/null
+++ b/examples/platform_view/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/examples/stocks/android/.gitignore b/examples/stocks/android/.gitignore
index 1fd9325..45cf572 100644
--- a/examples/stocks/android/.gitignore
+++ b/examples/stocks/android/.gitignore
@@ -8,6 +8,8 @@
 /captures
 GeneratedPluginRegistrant.java
 
-/gradle
+# Gradle wrapper files should normally be checked into source control.
+# See ../../README.md
+gradle-wrapper.jar
 /gradlew
 /gradlew.bat
diff --git a/examples/stocks/android/app/build.gradle b/examples/stocks/android/app/build.gradle
index 1b97167..78f362b 100644
--- a/examples/stocks/android/app/build.gradle
+++ b/examples/stocks/android/app/build.gradle
@@ -23,8 +23,12 @@
     }
 
     defaultConfig {
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         applicationId "io.flutter.examples.stocks"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "0.0.1"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
diff --git a/examples/stocks/android/app/src/main/AndroidManifest.xml b/examples/stocks/android/app/src/main/AndroidManifest.xml
index f259417..77ae740 100644
--- a/examples/stocks/android/app/src/main/AndroidManifest.xml
+++ b/examples/stocks/android/app/src/main/AndroidManifest.xml
@@ -4,11 +4,7 @@
      found in the LICENSE file.
  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.flutter.examples.stocks"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+    package="io.flutter.examples.stocks">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/examples/stocks/android/build.gradle b/examples/stocks/android/build.gradle
index f5004b9..77cbd09 100644
--- a/examples/stocks/android/build.gradle
+++ b/examples/stocks/android/build.gradle
@@ -1,10 +1,13 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.3'
+        classpath 'com.android.tools.build:gradle:2.3.3'
     }
 }
 
@@ -26,7 +29,3 @@
 task clean(type: Delete) {
     delete rootProject.buildDir
 }
-
-task wrapper(type: Wrapper) {
-    gradleVersion = '2.14.1'
-}
diff --git a/examples/stocks/android/gradle/wrapper/gradle-wrapper.properties b/examples/stocks/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100755
index 0000000..45e7f14
--- /dev/null
+++ b/examples/stocks/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Jun 23 08:50:38 CEST 2017
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
diff --git a/packages/flutter_tools/lib/src/android/android_studio.dart b/packages/flutter_tools/lib/src/android/android_studio.dart
index 7517a23..12c49d0 100644
--- a/packages/flutter_tools/lib/src/android/android_studio.dart
+++ b/packages/flutter_tools/lib/src/android/android_studio.dart
@@ -6,7 +6,6 @@
 import '../base/context.dart';
 import '../base/file_system.dart';
 import '../base/io.dart';
-import '../base/os.dart';
 import '../base/platform.dart';
 import '../base/process_manager.dart';
 import '../base/version.dart';
@@ -25,27 +24,9 @@
 // /Applications/Android Studio.app/Contents/
 // $HOME/Applications/Android Studio.app/Contents/
 
-// $STUDIO_HOME/gradle/gradle-X.Y.Z/bin/gradle
-
-final Version minGradleVersion = new Version(2, 14, 1);
-
 final RegExp _dotHomeStudioVersionMatcher =
     new RegExp(r'^\.AndroidStudio([^\d]*)([\d.]+)');
 
-/// Locate Gradle.
-String get gradleExecutable {
-  // See if the user has explicitly configured gradle-dir.
-  final String gradleDir = config.getValue('gradle-dir');
-  if (gradleDir != null) {
-    if (fs.isFileSync(gradleDir))
-      return gradleDir;
-    return fs.path.join(
-        gradleDir, 'bin', platform.isWindows ? 'gradle.bat' : 'gradle'
-    );
-  }
-  return androidStudio?.gradleExecutable ?? os.which('gradle')?.path;
-}
-
 String get javaPath => androidStudio?.javaPath;
 
 class AndroidStudio implements Comparable<AndroidStudio> {
@@ -58,7 +39,6 @@
   final Version version;
   final String configured;
 
-  String _gradlePath;
   String _javaPath;
   bool _isValid = false;
   final List<String> _validationMessages = <String>[];
@@ -98,11 +78,6 @@
     return null;
   }
 
-  String get gradlePath => _gradlePath;
-
-  String get gradleExecutable => fs.path
-      .join(_gradlePath, 'bin', platform.isWindows ? 'gradle.bat' : 'gradle');
-
   String get javaPath => _javaPath;
 
   bool get isValid => _isValid;
@@ -246,40 +221,6 @@
       return;
     }
 
-    Version latestGradleVersion;
-
-    List<FileSystemEntity> gradlePaths;
-    try {
-      gradlePaths = fs.directory(fs.path.join(directory, 'gradle')).listSync();
-      for (FileSystemEntity entry in gradlePaths.where((FileSystemEntity e) =>
-          e.basename.startsWith('gradle-') && e is Directory)) {
-        final Version version =
-            new Version.parse(entry.basename.substring('gradle-'.length)) ??
-                Version.unknown;
-        if (latestGradleVersion == null || version > latestGradleVersion) {
-          latestGradleVersion = version;
-          if (version >= minGradleVersion) {
-            _gradlePath = entry.path;
-          }
-        }
-      }
-    } catch (e) {
-      printTrace('Unable to determine Gradle version: $e');
-    }
-
-    if (latestGradleVersion == null) {
-      _validationMessages.add('Gradle not found.');
-    } else if (_gradlePath == null) {
-      _validationMessages.add('Gradle version $minGradleVersion required. '
-          'Found version $latestGradleVersion.');
-    } else if (processManager.canRun(gradleExecutable)) {
-      _isValid = true;
-      _validationMessages.add('Gradle version $latestGradleVersion');
-    } else {
-      _validationMessages.add(
-          'Gradle version $latestGradleVersion at $_gradlePath is not executable.');
-    }
-
     final String javaPath = platform.isMacOS ?
         fs.path.join(directory, 'jre', 'jdk', 'Contents', 'Home') :
         fs.path.join(directory, 'jre');
@@ -293,6 +234,7 @@
         final String javaVersion = versionLines.length >= 2 ? versionLines[1] : versionLines[0];
         _validationMessages.add('Java version $javaVersion');
         _javaPath = javaPath;
+        _isValid = true;
       } else {
         _validationMessages.add('Unable to determine bundled Java version.');
       }
diff --git a/packages/flutter_tools/lib/src/android/android_studio_validator.dart b/packages/flutter_tools/lib/src/android/android_studio_validator.dart
index 5a8da16..512ea49 100644
--- a/packages/flutter_tools/lib/src/android/android_studio_validator.dart
+++ b/packages/flutter_tools/lib/src/android/android_studio_validator.dart
@@ -4,10 +4,6 @@
 
 import 'dart:async';
 
-import '../base/file_system.dart';
-import '../base/io.dart';
-import '../base/platform.dart';
-import '../base/process_manager.dart';
 import '../base/version.dart';
 import '../doctor.dart';
 import '../globals.dart';
@@ -27,10 +23,6 @@
       validators.addAll(studios
           .map((AndroidStudio studio) => new AndroidStudioValidator(studio)));
     }
-    final String cfgGradleDir = config.getValue('gradle-dir');
-    if (cfgGradleDir != null) {
-      validators.add(new ConfiguredGradleValidator(cfgGradleDir));
-    }
     return validators;
   }
 
@@ -84,54 +76,3 @@
         statusInfo: 'not installed');
   }
 }
-
-class ConfiguredGradleValidator extends DoctorValidator {
-  final String cfgGradleDir;
-
-  ConfiguredGradleValidator(this.cfgGradleDir) : super('Gradle');
-
-  @override
-  Future<ValidationResult> validate() async {
-    ValidationType type = ValidationType.missing;
-    final List<ValidationMessage> messages = <ValidationMessage>[];
-
-    messages.add(new ValidationMessage('gradle-dir = $cfgGradleDir'));
-
-    String gradleExecutable = cfgGradleDir;
-    if (!fs.isFileSync(cfgGradleDir)) {
-      gradleExecutable = fs.path.join(
-          cfgGradleDir, 'bin', platform.isWindows ? 'gradle.bat' : 'gradle');
-    }
-    String versionString;
-    if (processManager.canRun(gradleExecutable)) {
-      type = ValidationType.partial;
-      final ProcessResult result =
-          processManager.runSync(<String>[gradleExecutable, '--version']);
-      if (result.exitCode == 0) {
-        versionString = result.stdout
-            .toString()
-            .split('\n')
-            .firstWhere((String s) => s.startsWith('Gradle '))
-            .substring('Gradle '.length);
-        final Version version = new Version.parse(versionString) ?? Version.unknown;
-        if (version >= minGradleVersion) {
-          type = ValidationType.installed;
-        } else {
-          messages.add(new ValidationMessage.error(
-              'Gradle version $minGradleVersion required. Found version $versionString.'));
-        }
-      } else {
-        messages
-            .add(new ValidationMessage('Unable to determine Gradle version.'));
-      }
-    } else {
-      messages
-          .add(new ValidationMessage('Gradle not found at $gradleExecutable'));
-    }
-
-    messages.add(new ValidationMessage(
-        'Flutter supports building with Gradle from Android Studio.\n'
-        'Consider removing your gradle-dir setting by running:\nflutter config --gradle-dir='));
-    return new ValidationResult(type, messages, statusInfo: versionString);
-  }
-}
diff --git a/packages/flutter_tools/lib/src/android/gradle.dart b/packages/flutter_tools/lib/src/android/gradle.dart
index b93e9ac..2310c83 100644
--- a/packages/flutter_tools/lib/src/android/gradle.dart
+++ b/packages/flutter_tools/lib/src/android/gradle.dart
@@ -22,6 +22,7 @@
 const String gradleManifestPath = 'android/app/src/main/AndroidManifest.xml';
 const String gradleAppOutV1 = 'android/app/build/outputs/apk/app-debug.apk';
 const String gradleAppOutDirV1 = 'android/app/build/outputs/apk';
+const String gradleVersion = '3.3';
 
 String _cachedGradleAppOutDirV2;
 
@@ -104,16 +105,6 @@
   return gradleAppOutDirV1;
 }
 
-String locateSystemGradle({ bool ensureExecutable: true }) {
-  final String gradle = gradleExecutable;
-  if (ensureExecutable && gradle != null) {
-    final File file = fs.file(gradle);
-    if (file.existsSync())
-      os.makeExecutable(file);
-  }
-  return gradle;
-}
-
 String locateProjectGradlew({ bool ensureExecutable: true }) {
   final String path = fs.path.join(
       'android', platform.isWindows ? 'gradlew.bat' : 'gradlew'
@@ -132,14 +123,27 @@
 String ensureGradle() {
   String gradle = locateProjectGradlew();
   if (gradle == null) {
-    gradle = locateSystemGradle();
-    if (gradle == null)
-      throwToolExit('Unable to locate gradle. Please install Android Studio.');
+    _injectGradleWrapper();
+    gradle = locateProjectGradlew();
   }
-  printTrace('Using gradle from $gradle.');
   return gradle;
 }
 
+void _injectGradleWrapper() {
+  copyDirectorySync(cache.getArtifactDirectory('gradle_wrapper'), fs.directory('android'));
+  final String propertiesPath = fs.path.join('android', 'gradle', 'wrapper', 'gradle-wrapper.properties');
+  if (!fs.file(propertiesPath).existsSync()) {
+    fs.file(propertiesPath).writeAsStringSync('''
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\\://services.gradle.org/distributions/gradle-$gradleVersion-all.zip
+''', flush: true,
+    );
+  }
+}
+
 /// Create android/local.properties if needed, and update Flutter settings.
 void updateLocalProperties({String projectPath, String buildMode}) {
   final File localProperties = (projectPath == null)
@@ -226,7 +230,7 @@
   final String assembleTask = "assemble${toTitleCase(buildModeName)}";
 
   // Run 'gradle assemble<BuildMode>'.
-  final Status status = logger.startProgress('Running \'gradle $assembleTask\'...', expectSlowOperation: true);
+  final Status status = logger.startProgress('Running \'gradlew $assembleTask\'...', expectSlowOperation: true);
   final String gradlePath = fs.file(gradle).absolute.path;
   final List<String> command = <String>[gradlePath];
   if (!logger.isVerbose) {
diff --git a/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl b/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl
index 35b0cba..2bd6c77 100644
--- a/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/create/android-java.tmpl/app/build.gradle.tmpl
@@ -23,10 +23,13 @@
     }
 
     defaultConfig {
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "{{androidIdentifier}}"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
diff --git a/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle b/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle
index 879b8ca..77cbd09 100644
--- a/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle
+++ b/packages/flutter_tools/templates/create/android-java.tmpl/build.gradle
@@ -1,6 +1,9 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
diff --git a/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl b/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl
index 1b96050..f72d9dd 100644
--- a/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/create/android-kotlin.tmpl/app/build.gradle.tmpl
@@ -28,10 +28,13 @@
     }
 
     defaultConfig {
-        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
-
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "{{androidIdentifier}}"
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
+        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
 
     buildTypes {
diff --git a/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle b/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle
index 27a170c..16bdc53 100644
--- a/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle
+++ b/packages/flutter_tools/templates/create/android-kotlin.tmpl/build.gradle
@@ -1,6 +1,9 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
diff --git a/packages/flutter_tools/templates/create/android.tmpl/app/src/main/AndroidManifest.xml.tmpl b/packages/flutter_tools/templates/create/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
index 592a869..640daac 100644
--- a/packages/flutter_tools/templates/create/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
+++ b/packages/flutter_tools/templates/create/android.tmpl/app/src/main/AndroidManifest.xml.tmpl
@@ -1,9 +1,5 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="{{androidIdentifier}}"
-    android:versionCode="1"
-    android:versionName="0.0.1">
-
-    <uses-sdk android:minSdkVersion="{{androidMinApiLevel}}" android:targetSdkVersion="21" />
+    package="{{androidIdentifier}}">
 
     <!-- The INTERNET permission is required for development. Specifically,
          flutter needs it to communicate with the running application
diff --git a/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl
index 5ad2e82..6bc1902 100644
--- a/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/plugin/android-java.tmpl/build.gradle.tmpl
@@ -4,6 +4,9 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
@@ -27,6 +30,10 @@
     buildToolsVersion '25.0.3'
 
     defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
     lintOptions {
diff --git a/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl b/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl
index 02514fd..3cc816a 100644
--- a/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl
+++ b/packages/flutter_tools/templates/plugin/android-kotlin.tmpl/build.gradle.tmpl
@@ -4,6 +4,9 @@
 buildscript {
     repositories {
         jcenter()
+        maven {
+            url "https://maven.google.com"
+        }
     }
 
     dependencies {
@@ -31,6 +34,10 @@
         main.java.srcDirs += 'src/main/kotlin'
     }
     defaultConfig {
+        minSdkVersion 16
+        targetSdkVersion 25
+        versionCode 1
+        versionName "1.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
     }
     lintOptions {
diff --git a/packages/flutter_tools/templates/plugin/android.tmpl/src/main/AndroidManifest.xml.tmpl b/packages/flutter_tools/templates/plugin/android.tmpl/src/main/AndroidManifest.xml.tmpl
index d976a6d..9d86092 100644
--- a/packages/flutter_tools/templates/plugin/android.tmpl/src/main/AndroidManifest.xml.tmpl
+++ b/packages/flutter_tools/templates/plugin/android.tmpl/src/main/AndroidManifest.xml.tmpl
@@ -1,7 +1,3 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-  package="{{androidIdentifier}}"
-  android:versionCode="1"
-  android:versionName="0.0.1">
-
-  <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="21" />
+  package="{{androidIdentifier}}">
 </manifest>