<p dir="auto">Help me, i dont know whats wrong with this. (note : i can run aplication well if i create app on android studio project but when i create flutter on android studio, i got this error logs.)</p>
<h2 dir="auto">Steps to Reproduce</h2>

<ol dir="auto">
<li>created an app flutter in android studio</li>
<li>when it done, i try to run it on my real device</li>
<li>and i got this error logs</li>
</ol>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Resolving dependencies...
* Error running Gradle:
Exit code 1 from: D:\Flutter Dev\venue_loka\android\gradlew.bat app:properties:
Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Program Files (x86)\Android\android-sdk\licenses
License for package Android SDK Build-Tools 27.0.3 accepted.
Preparing &quot;Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)&quot;.
Warning: Failed to read or create install properties file.


FAILURE: Build failed with an exception.

Finished with error: Please review your Gradle project setup in the android/ folder.
* Where:
Build file 'D:\Flutter Dev\venue_loka\android\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating root project 'android'.
&gt; A problem occurred configuring project ':app'.
   &gt; Failed to install the following SDK components:
         build-tools;27.0.3 Android SDK Build-Tools 27.0.3
     The SDK directory is not writable (C:\Program Files (x86)\Android\android-sdk)


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s"><pre class="notranslate"><code class="notranslate">Resolving dependencies...
* Error running Gradle:
Exit code 1 from: D:\Flutter Dev\venue_loka\android\gradlew.bat app:properties:
Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Program Files (x86)\Android\android-sdk\licenses
License for package Android SDK Build-Tools 27.0.3 accepted.
Preparing "Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)".
Warning: Failed to read or create install properties file.


FAILURE: Build failed with an exception.

Finished with error: Please review your Gradle project setup in the android/ folder.
* Where:
Build file 'D:\Flutter Dev\venue_loka\android\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating root project 'android'.
&gt; A problem occurred configuring project ':app'.
   &gt; Failed to install the following SDK components:
         build-tools;27.0.3 Android SDK Build-Tools 27.0.3
     The SDK directory is not writable (C:\Program Files (x86)\Android\android-sdk)


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
</code></pre></div>
<p dir="auto">i receive an error when i run flutter run</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter run
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                0.7s
Resolving dependencies...                             0.9s
Running 'gradlew assembleDebug'...                        
Configuration 'debugCompile' in project ':app' is deprecated. Use 'debugImplementation' instead.
Configuration 'profileCompile' in project ':app' is deprecated. Use 'profileImplementation' instead.
Configuration 'releaseCompile' in project ':app' is deprecated. Use 'releaseImplementation' instead.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Configuration 'debugProvided' in project ':apn_fb_login' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':apn_fb_login' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':firebase_messaging' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':firebase_messaging' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':google_sign_in' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':google_sign_in' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':image_picker' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':image_picker' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':share' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':share' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':shared_preferences' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':shared_preferences' is deprecated. Use 'releaseCompileOnly' instead.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
&gt; Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
Gradle build failed: 1
"><pre class="notranslate"><code class="notranslate">flutter run
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                0.7s
Resolving dependencies...                             0.9s
Running 'gradlew assembleDebug'...                        
Configuration 'debugCompile' in project ':app' is deprecated. Use 'debugImplementation' instead.
Configuration 'profileCompile' in project ':app' is deprecated. Use 'profileImplementation' instead.
Configuration 'releaseCompile' in project ':app' is deprecated. Use 'releaseImplementation' instead.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Configuration 'debugProvided' in project ':apn_fb_login' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':apn_fb_login' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':firebase_messaging' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':firebase_messaging' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':google_sign_in' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':google_sign_in' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':image_picker' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':image_picker' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':share' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':share' is deprecated. Use 'releaseCompileOnly' instead.
Configuration 'debugProvided' in project ':shared_preferences' is deprecated. Use 'debugCompileOnly' instead.
Configuration 'releaseProvided' in project ':shared_preferences' is deprecated. Use 'releaseCompileOnly' instead.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
&gt; Android dependency 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
Gradle build failed: 1

</code></pre></div>
<p dir="auto">My gradle.build file is:</p>
<div class="highlight highlight-source-groovy-gradle notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withInputStream { stream -&gt;
        localProperties.load(stream)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException(&quot;Flutter SDK not found. Define location with flutter.sdk in the local.properties file.&quot;)
}

apply plugin: 'com.android.application'
apply from: &quot;$flutterRoot/packages/flutter_tools/gradle/flutter.gradle&quot;

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.3'

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId &quot;com.shuttertop.app&quot;
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName &quot;1.0&quot;
        testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

apply plugin: 'com.google.gms.google-services'"><pre class="notranslate"><span class="pl-k">def</span> localProperties <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-k">Properties</span>()
<span class="pl-k">def</span> localPropertiesFile <span class="pl-k">=</span> rootProject<span class="pl-k">.</span>file(<span class="pl-s"><span class="pl-pds">'</span>local.properties<span class="pl-pds">'</span></span>)
<span class="pl-k">if</span> (localPropertiesFile<span class="pl-k">.</span>exists()) {
    localPropertiesFile<span class="pl-k">.</span>withInputStream { <span class="pl-v">stream</span> <span class="pl-k">-&gt;</span>
        localProperties<span class="pl-k">.</span>load(stream)
    }
}

<span class="pl-k">def</span> flutterRoot <span class="pl-k">=</span> localProperties<span class="pl-k">.</span>getProperty(<span class="pl-s"><span class="pl-pds">'</span>flutter.sdk<span class="pl-pds">'</span></span>)
<span class="pl-k">if</span> (flutterRoot <span class="pl-k">==</span> <span class="pl-c1">null</span>) {
    <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-k">GradleException</span>(<span class="pl-s"><span class="pl-pds">"</span>Flutter SDK not found. Define location with flutter.sdk in the local.properties file.<span class="pl-pds">"</span></span>)
}

apply <span class="pl-c1">plugin</span>: <span class="pl-s"><span class="pl-pds">'</span>com.android.application<span class="pl-pds">'</span></span>
apply <span class="pl-c1">from</span>: <span class="pl-s"><span class="pl-pds">"</span><span class="pl-smi">$f<span class="pl-smi">lutterRoot</span></span>/packages/flutter_tools/gradle/flutter.gradle<span class="pl-pds">"</span></span>

<span class="pl-en">android</span> {
    compileSdkVersion 26
    buildToolsVersion <span class="pl-s"><span class="pl-pds">'</span>26.0.3<span class="pl-pds">'</span></span>

    lintOptions {
        disable <span class="pl-s"><span class="pl-pds">'</span>InvalidPackage<span class="pl-pds">'</span></span>
    }

    defaultConfig {
        <span class="pl-c"><span class="pl-c">//</span> TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).</span>
        applicationId <span class="pl-s"><span class="pl-pds">"</span>com.shuttertop.app<span class="pl-pds">"</span></span>
        minSdkVersion <span class="pl-c1">16</span>
        targetSdkVersion <span class="pl-c1">26</span>
        versionCode <span class="pl-c1">1</span>
        versionName <span class="pl-s"><span class="pl-pds">"</span>1.0<span class="pl-pds">"</span></span>
        testInstrumentationRunner <span class="pl-s"><span class="pl-pds">"</span>android.support.test.runner.AndroidJUnitRunner<span class="pl-pds">"</span></span>
    }

    buildTypes {
        release {
            <span class="pl-c"><span class="pl-c">//</span> TODO: Add your own signing config for the release build.</span>
            <span class="pl-c"><span class="pl-c">//</span> Signing with the debug keys for now, so `flutter run --release` works.</span>
            signingConfig signingConfigs<span class="pl-k">.</span>debug
        }
    }
}

<span class="pl-en">flutter</span> {
    source <span class="pl-s"><span class="pl-pds">'</span>../..<span class="pl-pds">'</span></span>
}

<span class="pl-en">dependencies</span> {
    testImplementation <span class="pl-s"><span class="pl-pds">'</span>junit:junit:4.12<span class="pl-pds">'</span></span>
    androidTestImplementation <span class="pl-s"><span class="pl-pds">'</span>com.android.support.test:runner:1.0.1<span class="pl-pds">'</span></span>
    androidTestImplementation <span class="pl-s"><span class="pl-pds">'</span>com.android.support.test.espresso:espresso-core:3.0.1<span class="pl-pds">'</span></span>
}

apply <span class="pl-c1">plugin</span>: <span class="pl-s"><span class="pl-pds">'</span>com.google.gms.google-services<span class="pl-pds">'</span></span></pre></div>
<p dir="auto">flutter doctor:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Linux, locale en_US.UTF-8, channel alpha)
    • Flutter at /home/luca/Programs/flutter
    • Framework revision 8f65fec5f5 (4 weeks ago), 2017-12-12 09:50:14 -0800
    • Engine revision edaecdc8b8
    • Tools Dart version 1.25.0-dev.11.0
    • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
    • Android SDK at /home/luca/Android/Sdk
    • Android NDK at /home/luca/Android/Sdk/ndk-bundle
    • Platform android-26, build-tools 26.0.3
    • ANDROID_HOME = /home/luca/Android/Sdk
    • Java binary at: /home/luca/Programs/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Android Studio (version 3.0)
    • Android Studio at /home/luca/Programs/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Connected devices
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)
"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Linux, locale en_US.UTF-8, channel alpha)
    • Flutter at /home/luca/Programs/flutter
    • Framework revision 8f65fec5f5 (4 weeks ago), 2017-12-12 09:50:14 -0800
    • Engine revision edaecdc8b8
    • Tools Dart version 1.25.0-dev.11.0
    • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e

[✓] Android toolchain - develop for Android devices (Android SDK 26.0.3)
    • Android SDK at /home/luca/Android/Sdk
    • Android NDK at /home/luca/Android/Sdk/ndk-bundle
    • Platform android-26, build-tools 26.0.3
    • ANDROID_HOME = /home/luca/Android/Sdk
    • Java binary at: /home/luca/Programs/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Android Studio (version 3.0)
    • Android Studio at /home/luca/Programs/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Connected devices
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator)

</code></pre></div>