For some reason template system was getting caught up with different
template xml files in some projects. Reverted them, then reset them
back to changes and refresh works properly now. Trevor pointed out
sometimes system gets confused when template file is differet. :/

Please note, the gradle files are ignored and recreated but template
system needs there otherwise it was getting tripped up.

Bug: 63932741
Test: Manually tested samples on physical devices.
Change-Id: If99fecbfebbcafdbfcd740a465535e91af8f6479
diff --git a/wearable/wear/SpeedTracker/Wearable/build.gradle b/wearable/wear/SpeedTracker/Wearable/build.gradle
new file mode 100644
index 0000000..472738b
--- /dev/null
+++ b/wearable/wear/SpeedTracker/Wearable/build.gradle
@@ -0,0 +1,76 @@
+
+buildscript {
+    repositories {
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:2.3.3'
+    }
+}
+
+apply plugin: 'com.android.application'
+
+repositories {
+    jcenter()
+    maven {
+        url 'https://maven.google.com'
+    }
+}
+
+dependencies {
+    compile 'com.android.support:wear:26.0.0'
+    compile 'com.google.android.gms:play-services-location:10.2.4'
+    compile 'com.google.android.gms:play-services-wearable:10.2.4'
+    compile 'com.android.support:support-v13:25.3.1'
+
+    provided 'com.google.android.wearable:wearable:2.0.3'
+
+    compile 'com.google.android.support:wearable:2.0.3'
+
+    compile project(':Shared')
+}
+
+// The sample build uses multiple directories to
+// keep boilerplate and common code separate from
+// the main sample code.
+List<String> dirs = [
+    'main',     // main sample code; look here for the interesting stuff.
+    'common',   // components that are reused by multiple samples
+    'template'] // boilerplate code that is generated by the sample template process
+
+android {
+
+        compileSdkVersion 26
+
+    buildToolsVersion "25.0.3"
+
+    defaultConfig {
+        versionCode 1
+        versionName "1.0"
+
+        minSdkVersion 23
+
+        targetSdkVersion 26
+
+         multiDexEnabled true
+
+    }
+
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_7
+        targetCompatibility JavaVersion.VERSION_1_7
+    }
+
+    sourceSets {
+        main {
+            dirs.each { dir ->
+                java.srcDirs "src/${dir}/java"
+                res.srcDirs "src/${dir}/res"
+            }
+        }
+        androidTest.setRoot('tests')
+        androidTest.java.srcDirs = ['tests/src']
+
+    }
+}
diff --git a/wearable/wear/WearHighBandwidthNetworking/Wearable/build.gradle b/wearable/wear/WearHighBandwidthNetworking/Wearable/build.gradle
index fa46e54..45663ff 100644
--- a/wearable/wear/WearHighBandwidthNetworking/Wearable/build.gradle
+++ b/wearable/wear/WearHighBandwidthNetworking/Wearable/build.gradle
@@ -18,13 +18,15 @@
     }
 }
 
+
+
 dependencies {
 
     compile 'com.android.support:wear:26.0.0'
 
 
     compile 'com.google.android.gms:play-services-wearable:10.2.4'
-    compile 'com.android.support:support-v13:26.0.0'
+    compile 'com.android.support:support-v13:25.3.1'
 
     provided 'com.google.android.wearable:wearable:2.0.3'
 
@@ -41,7 +43,8 @@
     'template'] // boilerplate code that is generated by the sample template process
 
 android {
-    compileSdkVersion 26
+
+        compileSdkVersion 26
 
     buildToolsVersion "25.0.3"
 
@@ -52,6 +55,9 @@
         minSdkVersion 24
 
         targetSdkVersion 26
+
+        multiDexEnabled true
+
     }
 
     compileOptions {
diff --git a/wearable/wear/WearHighBandwidthNetworking/template-params.xml b/wearable/wear/WearHighBandwidthNetworking/template-params.xml
index 060ea4c..e50f539 100644
--- a/wearable/wear/WearHighBandwidthNetworking/template-params.xml
+++ b/wearable/wear/WearHighBandwidthNetworking/template-params.xml
@@ -24,11 +24,9 @@
     <!-- change minSdk if needed-->
     <minSdk>24</minSdk>
     <minSdkVersionWear>24</minSdkVersionWear>
-    <targetSdkVersion>25</targetSdkVersion>
-
-    <minSdkVersionWear>23</minSdkVersionWear>
-    <compileSdkVersionWear>26</compileSdkVersionWear>
+    <targetSdkVersion>26</targetSdkVersion>
     <targetSdkVersionWear>26</targetSdkVersionWear>
+    <compileSdkVersionWear>26</compileSdkVersionWear>
     <multiDexEnabled>true</multiDexEnabled>
 
     <!-- Include additional dependencies here.-->
@@ -38,7 +36,7 @@
 
     <strings>
         <intro>
-<![CDATA[
+            <![CDATA[
 Sample demonstrates how to determine if a high-bandwidth network is available for use cases that
 require a minimum network bandwidth, such as streaming media or downloading large files. In
 addition, the sample demonstrates best practices for asking a user to add a new Wi-Fi network for
@@ -100,7 +98,7 @@
             Avoid simply rearranging the sample's title. What does this sample actually
             accomplish, and how does it do it? -->
         <description>
-<![CDATA[
+            <![CDATA[
 Sample demonstrates how to determine if a high-bandwidth network is available for use cases that
 require a minimum network bandwidth, such as streaming media or downloading large files. In
 addition, the sample demonstrates best practices for asking a user to add a new Wi-Fi network for
@@ -112,7 +110,7 @@
         Makrdown formatting allowed. This will be used to generate a mini-article for the
         sample on DAC. -->
         <intro>
-<![CDATA[
+            <![CDATA[
 On Android Wear, a high-bandwidth network is not always available, as the platform manages network
 connectivity with the goal of providing the best overall user experience, balancing network
 bandwidth and maximizing device battery life. For use cases that require high-bandwidth network
diff --git a/wearable/wear/WearVerifyRemoteApp/Wearable/build.gradle b/wearable/wear/WearVerifyRemoteApp/Wearable/build.gradle
index 3c1289e..fc4aaa4 100644
--- a/wearable/wear/WearVerifyRemoteApp/Wearable/build.gradle
+++ b/wearable/wear/WearVerifyRemoteApp/Wearable/build.gradle
@@ -42,7 +42,8 @@
     'template'] // boilerplate code that is generated by the sample template process
 
 android {
-    compileSdkVersion 25
+
+        compileSdkVersion 25
 
     buildToolsVersion "25.0.3"