flutter / flutter

Flutter makes it easy and fast to build beautiful apps for mobile and beyond
https://flutter.dev
BSD 3-Clause "New" or "Revised" License
165.22k stars 27.26k forks source link

Android build fails on Windows when project is on non-NTFS drive #76668

Open manu-urba opened 3 years ago

manu-urba commented 3 years ago

Hi, right next a brand new flutter app creation, trying to run it I get the following error. This is some of the latest logs of flutter run --verbose

[        ] > Task :app:mergeDebugAssets
[+29997 ms] > Task :app:copyFlutterAssetsDebug
[+1399 ms] > Task :app:generateDebugResValues
[   +1 ms] > Task :app:generateDebugResources
[+10898 ms] > Task :app:createDebugCompatibleScreenManifests
[   +1 ms] > Task :app:extractDeepLinksDebug
[+1198 ms] > Task :app:processDebugMainManifest
[ +500 ms] > Task :app:mergeDebugResources
[ +200 ms] > Task :app:processDebugManifest
[  +99 ms] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
[   +1 ms] > Task :app:javaPreCompileDebug
[  +99 ms] > Task :app:processDebugJavaRes NO-SOURCE
[ +199 ms] > Task :app:compressDebugAssets FAILED
[ +899 ms] > Task :app:checkDebugDuplicateClasses
[   +1 ms] > Task :app:processDebugManifestForPackage
[  +99 ms] FAILURE: Build failed with an exception.
[   +1 ms] * What went wrong:
[        ] Execution failed for task ':app:compressDebugAssets'.
[        ] > A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
[        ]    > G:\git\flutter_app\build\app\intermediates\merged_assets\debug\out
[        ] * 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 4m 11s
[        ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[        ] Use '--warning-mode all' to show the individual deprecation warnings.
[        ] See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
[        ] 18 actionable tasks: 18 executed
[ +430 ms] Running Gradle task 'assembleDebug'... (completed in 252,7s)
[   +4 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +1 ms] "flutter run" took 253.418ms.
[   +3 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:12:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:655:9)
           <asynchronous suspension>
           #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1185:12)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1037:27)
           <asynchronous suspension>
           #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:152:19)
           <asynchronous suspension>
           #5      AppContext.run (package:flutter_tools/src/base/context.dart:151:12)
           <asynchronous suspension>
           #6      CommandRunner.runCommand (package:args/command_runner.dart:197:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:152:19)
           <asynchronous suspension>
           #9      AppContext.run (package:flutter_tools/src/base/context.dart:151:12)
           <asynchronous suspension>
           #10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:239:5)
           <asynchronous suspension>
           #11     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #12     run.<anonymous closure> (package:flutter_tools/runner.dart:60:12)
           <asynchronous suspension>
           #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:152:19)
           <asynchronous suspension>
           #14     AppContext.run (package:flutter_tools/src/base/context.dart:151:12)
           <asynchronous suspension>
           #15     runInContext (package:flutter_tools/src/context_runner.dart:77:10)
           <asynchronous suspension>
           #16     main (package:flutter_tools/executable.dart:92:3)
           <asynchronous suspension>

[ +254 ms] ensureAnalyticsSent: 251ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[   +4 ms] Shutdown hooks complete
[   +1 ms] exiting with code 1

Here's my flutter doctor -v output:

[√] Flutter (Channel dev, 1.27.0-4.0.pre, on Microsoft Windows [Versione 10.0.19042.804], locale it-IT)
    • Flutter version 1.27.0-4.0.pre at G:\SDKs\flutter
    • Framework revision f8cd24de95 (7 days ago), 2021-02-16 11:24:17 -0800
    • Engine revision 1d537824d6
    • Dart version 2.13.0 (build 2.13.0-30.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\Manuel\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2020.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2020.2
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin version 202.6397.47

[√] VS Code (version 1.53.2)
    • VS Code at C:\Users\Manuel\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.19.0

[√] Connected device (3 available)
    • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 88.0.4324.182
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 88.0.705.74

• No issues found!

I tried modifying gradle-wrapper.properties distributionUrl to https\://services.gradle.org/distributions/gradle-6.5.1-all.zip and classpath 'com.android.tools.build:gradle:4.1.0' under build.gradle. But nothing is helping it.

My output of ./gradlew -v:

------------------------------------------------------------
Gradle 6.5.1
------------------------------------------------------------

Build time:   2020-06-30 06:32:47 UTC
Revision:     66bc713f7169626a7f0134bf452abde51550ea0a

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_221 (Oracle Corporation 25.221-b11)
OS:           Windows 10 10.0 amd64
TahaTesser commented 3 years ago

Hi @manu-urba This looks like a local issue, Please clear Gradle cache and try again with flutter clean and then flutter run If the problem persists, please provide your build.gradle Thank you

manu-urba commented 3 years ago

No, that didn't help:

[   +1 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[        ] Use '--warning-mode all' to show the individual deprecation warnings.
[        ] See https://docs.gradle.org/6.5.1/userguide/command_line_interface.html#sec:command_line_warnings
[        ] 14 actionable tasks: 2 executed, 12 up-to-date
[        ] FAILURE: Build failed with an exception.
[   +1 ms] * What went wrong:
[        ] A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest').
[        ] > File 'G:\git\flutter_app\build\app\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist.
[        ] * 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
[   +1 ms] BUILD FAILED in 3m 39s
[+1061 ms] Running Gradle task 'assembleDebug'... (completed in 222,0s)
[   +4 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +1 ms] "flutter run" took 224.017ms.
[   +6 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:12:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:655:9)
           <asynchronous suspension>
           #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1185:12)
           <asynchronous suspension>
           #3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1037:27)
           <asynchronous suspension>
           #4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:152:19)
           <asynchronous suspension>
           #5      AppContext.run (package:flutter_tools/src/base/context.dart:151:12)
           <asynchronous suspension>
           #6      CommandRunner.runCommand (package:args/command_runner.dart:197:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:152:19)
           <asynchronous suspension>
           #9      AppContext.run (package:flutter_tools/src/base/context.dart:151:12)
           <asynchronous suspension>
           #10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:239:5)
           <asynchronous suspension>
           #11     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #12     run.<anonymous closure> (package:flutter_tools/runner.dart:60:12)
           <asynchronous suspension>
           #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:152:19)
           <asynchronous suspension>
           #14     AppContext.run (package:flutter_tools/src/base/context.dart:151:12)
           <asynchronous suspension>
           #15     runInContext (package:flutter_tools/src/context_runner.dart:77:10)
           <asynchronous suspension>
           #16     main (package:flutter_tools/executable.dart:92:3)
           <asynchronous suspension>

[ +226 ms] ensureAnalyticsSent: 223ms
[   +1 ms] Running shutdown hooks
[        ] Shutdown hook priority 4
[   +3 ms] Shutdown hooks complete
[   +2 ms] exiting with code 1

Here's my build.gradle under ./android/:

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Here's my build.gradle under ./android/app/:

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

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

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 30

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.flutter_app"
        minSdkVersion 16
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    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 {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
TahaTesser commented 3 years ago

Hi @manu-urba I can't reproduce with Gradle and target SDK, can you please make sure you've Android SDK Builds tools installed in your SDK manager, mine is 30.0.3

logs ```bash PS C:\Users\Taha\AndroidStudioProjects\dev_flutter> flutterd run -v [ +76 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +53 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] b7d4806243a4e906bf061f79a0e314ba28111aa6 [ +1 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ +39 ms] Exit code 0 from: git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] 1.27.0-8.0.pre [ +37 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git rev-parse --abbrev-ref --symbolic @{u} [ +28 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/dev [ ] executing: [C:\Users\Taha\Code\flutter_dev/] git ls-remote --get-url origin [ +25 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +57 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git rev-parse --abbrev-ref HEAD [ +25 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] dev [ +67 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +51 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe devices -l [ +39 ms] List of devices attached emulator-5554 device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:7 [ +7 ms] C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell getprop [ +37 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +5 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +76 ms] Skipping pub get: version match. [ +101 ms] Generating C:\Users\Taha\AndroidStudioProjects\dev_flutter\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.j ava [ +59 ms] ro.hardware = ranchu [ +12 ms] Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". [ +28 ms] Initializing file store [ +8 ms] Skipping target: gen_localizations [ +8 ms] complete [ +4 ms] Launching lib\main.dart on Android SDK built for x86 in debug mode... [ +4 ms] C:\Users\Taha\Code\flutter_dev\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\Taha\Code\flutter_dev\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\Users\Taha\Code\flutter_dev\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\Taha\AppData\Local\Temp\flutter_tools.4c00e017\flutter_tool.4e8e097d\app.dill --packages C:\Users\Taha\AndroidStudioProjects\dev_flutter\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\c075001b96339384a97db4862b8ab8db.cache.dill.track.dill [ +15 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1 [ +11 ms] <- compile package:dev_flutter/main.dart [ +35 ms] --------- beginning of main 02-26 15:51:49.534 I/MicroDetectionWorker( 4358): #onError(false) [ +10 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe version [ +21 ms] Android Debug Bridge version 1.0.41 Version 31.0.0-7110759 Installed as C:\Users\Taha\Code\SDK\platform-tools\adb.exe [ +2 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe start-server [ +30 ms] Building APK [ +22 ms] Running Gradle task 'assembleDebug'... [ +4 ms] Using gradle from C:\Users\Taha\AndroidStudioProjects\dev_flutter\android\gradlew.bat. [ +8 ms] executing: C:\Users\Taha\Code\android-studio\jre\bin\java -version [ +89 ms] Exit code 0 from: C:\Users\Taha\Code\android-studio\jre\bin\java -version [ ] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +2 ms] executing: [C:\Users\Taha\AndroidStudioProjects\dev_flutter\android/] C:\Users\Taha\AndroidStudioProjects\dev_flutter\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-x86 -Ptarget=C:\Users\Taha\AndroidStudioProjects\dev_flutter\lib\main.dart -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug [+4419 ms] > Task :app:compileFlutterBuildDebug [ ] [ +91 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +8 ms] [ +74 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] [ ] b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] [ ] executing: [C:\Users\Taha\Code\flutter_dev/] git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] [ +50 ms] Exit code 0 from: git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] [ ] 1.27.0-8.0.pre [ ] [ +54 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git rev-parse --abbrev-ref --symbolic @{u} [ ] [ +32 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] [ ] origin/dev [ ] [ ] executing: [C:\Users\Taha\Code\flutter_dev/] git ls-remote --get-url origin [ ] [ +30 ms] Exit code 0 from: git ls-remote --get-url origin [ ] [ ] https://github.com/flutter/flutter.git [ ] [ +72 ms] executing: [C:\Users\Taha\Code\flutter_dev/] git rev-parse --abbrev-ref HEAD [ ] [ +29 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] [ ] dev [ ] [ +61 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ +69 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ +1 ms] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ ] [ +77 ms] Initializing file store [ ] [ +21 ms] Skipping target: gen_localizations [ ] [ +12 ms] kernel_snapshot: Starting due to {} [ +1 ms] [ +55 ms] C:\Users\Taha\Code\flutter_dev\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\Users\Taha\Code\flutter_dev\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\Users\Taha\Code\flutter_dev\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages C:\Users\Taha\AndroidStudioProjects\dev_flutter\.dart_tool\package_config.json --output-dill C:\Users\Taha\AndroidStudioProjects\dev_flutter\.dart_tool\flutter_build\07586abb987670492596df8415ab7cc7\app.dill --depfile C:\Users\Taha\AndroidStudioProjects\dev_flutter\.dart_tool\flutter_build\07586abb987670492596df8415ab7cc7\kernel_snapsho t.d package:dev_flutter/main.dart [+7948 ms] [+8482 ms] kernel_snapshot: Complete [ +499 ms] [ +528 ms] debug_android_application: Starting due to {} [ +200 ms] [ +175 ms] debug_android_application: Complete [ +594 ms] [ +584 ms] Persisting file store [ +1 ms] [ +15 ms] Done persisting file store [ ] [ +13 ms] build succeeded. [ +107 ms] [ +17 ms] "flutter assemble" took 10,072ms. [ +92 ms] [ +132 ms] ensureAnalyticsSent: 128ms [ ] [ +1 ms] Running shutdown hooks [ ] [ ] Shutdown hooks complete [ ] [ ] exiting with code 0 [ +201 ms] > Task :app:packLibsflutterBuildDebug [ +1 ms] > Task :app:preBuild UP-TO-DATE [ ] > Task :app:preDebugBuild UP-TO-DATE [ ] > Task :app:compileDebugAidl NO-SOURCE [ ] > Task :app:compileDebugRenderscript NO-SOURCE [ ] > Task :app:generateDebugBuildConfig [ +790 ms] > Task :app:checkDebugAarMetadata [ ] > Task :app:cleanMergeDebugAssets UP-TO-DATE [ ] > Task :app:mergeDebugShaders [ ] > Task :app:compileDebugShaders NO-SOURCE [ ] > Task :app:generateDebugAssets UP-TO-DATE [ ] > Task :app:mergeDebugAssets [ +293 ms] > Task :app:copyFlutterAssetsDebug [ ] > Task :app:generateDebugResValues [ ] > Task :app:generateDebugResources [ +309 ms] > Task :app:createDebugCompatibleScreenManifests [ ] > Task :app:extractDeepLinksDebug [ +92 ms] > Task :app:processDebugMainManifest [ ] > Task :app:processDebugManifest [ +108 ms] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE [ ] > Task :app:javaPreCompileDebug [ ] > Task :app:processDebugJavaRes NO-SOURCE [ +787 ms] > Task :app:compressDebugAssets [ +399 ms] > Task :app:mergeDebugResources [+2106 ms] > Task :app:checkDebugDuplicateClasses [ +593 ms] > Task :app:mergeDebugJniLibFolders [ ] > Task :app:desugarDebugFileDependencies [+2397 ms] > Task :app:mergeDebugNativeLibs [ ] > Task :app:validateSigningDebug [ +307 ms] > Task :app:mergeExtDexDebug [ ] > Task :app:stripDebugDebugSymbols [ ] Unable to strip the following libraries, packaging them as they are: libflutter.so. [ ] > Task :app:processDebugManifestForPackage [ +390 ms] > Task :app:processDebugResources [+4408 ms] > Task :app:compileDebugKotlin [ +700 ms] > Task :app:compileDebugJavaWithJavac [ ] > Task :app:compileDebugSources [ +199 ms] > Task :app:dexBuilderDebug [ +499 ms] > Task :app:mergeDexDebug [ +704 ms] > Task :app:mergeDebugJavaResource [+1496 ms] > Task :app:packageDebug [ +93 ms] > Task :app:assembleDebug [ +1 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. [ +1 ms] Use '--warning-mode all' to show the individual deprecation warnings. [ ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings [ ] BUILD SUCCESSFUL in 30s [ ] 32 actionable tasks: 31 executed, 1 up-to-date [ +533 ms] Running Gradle task 'assembleDebug'... (completed in 31.4s) [ +27 ms] calculateSha: LocalDirectory: 'C:\Users\Taha\AndroidStudioProjects\dev_flutter\build\app\outputs\flutter-apk'/app.apk [ +500 ms] ✓ Built build\app\outputs\flutter-apk\app-debug.apk. [ +7 ms] executing: C:\Users\Taha\Code\SDK\build-tools\30.0.3\aapt dump xmltree C:\Users\Taha\AndroidStudioProjects\dev_flutter\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml [ +17 ms] Exit code 0 from: C:\Users\Taha\Code\SDK\build-tools\30.0.3\aapt dump xmltree C:\Users\Taha\AndroidStudioProjects\dev_flutter\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml [ ] N: android=http://schemas.android.com/apk/res/android E: manifest (line=2) A: android:versionCode(0x0101021b)=(type 0x10)0x1 A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0") A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11") A: package="com.example.dev_flutter" (Raw: "com.example.dev_flutter") A: platformBuildVersionCode=(type 0x10)0x1e A: platformBuildVersionName=(type 0x10)0xb E: uses-sdk (line=7) A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e E: uses-permission (line=14) A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET") E: application (line=16) A: android:label(0x01010001)="dev_flutter" (Raw: "dev_flutter") A: android:icon(0x01010002)=@0x7f080000 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory") E: activity (line=21) A: android:theme(0x01010000)=@0x7f0a0000 A: android:name(0x01010003)="com.example.dev_flutter.MainActivity" (Raw: "com.example.dev_flutter.MainActivity") A: android:launchMode(0x0101001d)=(type 0x10)0x1 A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4 A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10 A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff E: meta-data (line=35) A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme") A: android:resource(0x01010025)=@0x7f0a0001 E: meta-data (line=45) A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable") A: android:resource(0x01010025)=@0x7f040000 E: intent-filter (line=49) E: action (line=50) A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN") E: category (line=52) A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER") E: meta-data (line=59) A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding") A: android:value(0x01010024)=(type 0x10)0x2 [ +6 ms] Stopping app 'app.apk' on Android SDK built for x86. [ +1 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell am force-stop com.example.dev_flutter [ +45 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell pm list packages com.example.dev_flutter [ +266 ms] Installing APK. [ +1 ms] Installing build\app\outputs\flutter-apk\app.apk... [ +1 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 install -t -r C:\Users\Taha\AndroidStudioProjects\dev_flutter\build\app\outputs\flutter-apk\app.apk [+2869 ms] Performing Streamed Install Success [ +3 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 2,870ms) [ +1 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell echo -n 2eadd60d2661fe1c163bd580eb201e5c0570d5a6 > /data/local/tmp/sky.com.example.dev_flutter.sha1 [ +28 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1 [ +49 ms] --------- beginning of main 02-26 15:52:26.748 W/GCM ( 1987): Unexpected forwarded intent: Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.example.dev_flutter flg=0x4000010 pkg=com.google.android.gms cmp=com.google.android.gms/.chimera.PersistentIntentOperationService (has extras) } [ +10 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true com.example.dev_flutter/com.example.dev_flutter.MainActivity [ +83 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.dev_flutter/.MainActivity (has extras) } [ +1 ms] Waiting for observatory port to be available... [ +896 ms] Observatory URL on device: http://127.0.0.1:38292/NThkeu7120E=/ [ +1 ms] executing: C:\Users\Taha\Code\SDK\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:38292 [ +28 ms] 56767 [ ] Forwarded host port 56767 to device port 38292 for Observatory [ +7 ms] Caching compiled dill [ +25 ms] Connecting to service protocol: http://127.0.0.1:56767/NThkeu7120E=/ [ +324 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at http://127.0.0.1:56767/NThkeu7120E=/. [ +109 ms] DDS is listening at http://127.0.0.1:56770/17nXAdQz8cI=/. [ +98 ms] Successfully connected to service protocol: http://127.0.0.1:56767/NThkeu7120E=/ [ +26 ms] DevFS: Creating new filesystem on the device (null) [ +62 ms] DevFS: Created new filesystem on the device (file:///data/user/0/com.example.dev_flutter/code_cache/dev_flutterZLQLBS/dev_flutter/) [ +1 ms] Updating assets [ +64 ms] Syncing files to device Android SDK built for x86... [ +2 ms] <- reset [ ] Compiling dart to kernel with 0 updated files [ +2 ms] <- recompile package:dev_flutter/main.dart cd532936-50fa-4d2c-be19-7aa7f07ec397 [ ] <- cd532936-50fa-4d2c-be19-7aa7f07ec397 [ +54 ms] D/EGL_emulation( 6335): eglMakeCurrent: 0x98a74480: ver 2 0 (tinfo 0x8661c750) [ +23 ms] Updating files. [ ] DevFS: Sync finished [ ] Syncing files to device Android SDK built for x86... (completed in 84ms) [ +1 ms] Synced 0.0MB. [ +1 ms] <- accept [ +14 ms] Connected to _flutterView/0x987ffc10. [ +2 ms] Flutter run key commands. [ +1 ms] r Hot reload. 🔥🔥🔥 [ +1 ms] R Hot restart. [ +1 ms] h Repeat this help message. [ ] d Detach (terminate "flutter run" but leave application running). [ ] c Clear the screen [ ] q Quit (terminate the application on the device). [ ] Running with unsound null safety [ ] For more information see https://dart.dev/null-safety/unsound-null-safety [ ] An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:56770/17nXAdQz8cI=/ [+4707 ms] The Flutter DevTools debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9101?uri=http%3A%2F%2F127.0.0.1%3A56770%2F17nXAdQz8cI%3D%2F [+10622 ms] D/EGL_emulation( 6335): eglMakeCurrent: 0x9b405240: ver 2 0 (tinfo 0x9b403980) [+8533 ms] D/EGL_emulation( 6335): eglMakeCurrent: 0x98a74480: ver 2 0 (tinfo 0x8661c750) [ +29 ms] D/EGL_emulation( 6335): eglMakeCurrent: 0x9b405240: ver 2 0 (tinfo 0x9b403980) [ +20 ```
flutter doctor -v ```bash [✓] Flutter (Channel dev, 1.27.0-8.0.pre, on Microsoft Windows [Version 10.0.19042.804], locale en-US) • Flutter version 1.27.0-8.0.pre at C:\Users\Taha\Code\flutter_dev • Framework revision b7d4806243 (7 days ago), 2021-02-19 09:22:45 -0800 • Engine revision 6993cb229b • Dart version 2.13.0 (build 2.13.0-30.0.dev) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Users\Taha\Code\SDK • Platform android-30, build-tools 30.0.3 • ANDROID_HOME = C:\Users\Taha\Code\SDK • Java binary at: C:\Users\Taha\Code\android-studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [✓] Chrome - develop for the web • Chrome at C:\Users\Taha\AppData\Local\Google\Chrome\Application\chrome.exe [✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.5) • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community • Visual Studio Community 2019 version 16.8.31005.135 • Windows 10 SDK version 10.0.18362.0 [✓] Android Studio (version 4.1.0) • Android Studio at C:\Users\Taha\Code\android-studio • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [✓] VS Code (version 1.53.2) • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.19.0 [✓] Connected device (4 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 8.0.0 (API 26) (emulator) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19042.804] • Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.182 • Edge (web) • edge • web-javascript • Microsoft Edge 88.0.705.74 • No issues found! ```

Please try with a new project flutter create mydemo Thank you

manu-urba commented 3 years ago

I updated everything. Now this is the output of

flutter doctor -v

``` [√] Flutter (Channel dev, 1.27.0-8.0.pre, on Microsoft Windows [Versione 10.0.19042.804], locale it-IT) • Flutter version 1.27.0-8.0.pre at G:\SDKs\flutter • Framework revision b7d4806243 (9 days ago), 2021-02-19 09:22:45 -0800 • Engine revision 6993cb229b • Dart version 2.13.0 (build 2.13.0-30.0.dev) [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at C:\Android\Sdk • Platform android-30, build-tools 30.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [√] Android Studio (version 4.1.0) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) [√] IntelliJ IDEA Ultimate Edition (version 2020.2) • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2020.2 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin version 202.6397.47 [√] VS Code (version 1.53.2) • VS Code at C:\Users\Manuel\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.19.0 [√] Connected device (3 available) • Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator) • Chrome (web) • chrome • web-javascript • Google Chrome 88.0.4324.190 • Edge (web) • edge • web-javascript • Microsoft Edge 88.0.705.74 • No issues found! ```

After a fresh install of all the tools, I run flutter create myapp cd myapp flutter run -v lib\main.dart This is the full output log:

Logs

``` G:\git\myapp>flutter run -v lib\main.dart [ +71 ms] executing: [G:\SDKs\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +59 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] executing: [G:\SDKs\flutter/] git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ +45 ms] Exit code 0 from: git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] 1.27.0-8.0.pre [ +46 ms] executing: [G:\SDKs\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +37 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/dev [ ] executing: [G:\SDKs\flutter/] git ls-remote --get-url origin [ +32 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ +71 ms] executing: [G:\SDKs\flutter/] git rev-parse --abbrev-ref HEAD [ +33 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] dev [ +67 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ +1 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +68 ms] executing: C:\Android\Sdk\platform-tools\adb.exe devices -l [ +35 ms] List of devices attached emulator-5554 device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:4 [ +5 ms] C:\Android\Sdk\platform-tools\adb.exe -s emulator-5554 shell getprop [ +37 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ +90 ms] Skipping pub get: version match. [ +98 ms] Generating G:\git\myapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java [ +182 ms] ro.hardware = ranchu [ +13 ms] Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering". [ +24 ms] Initializing file store [ +8 ms] Skipping target: gen_localizations [ +16 ms] complete [ +4 ms] Launching lib\main.dart on Android SDK built for x86 in debug mode... [ +4 ms] G:\SDKs\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev G:\SDKs\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root G:\SDKs\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\ANTONI~1\AppData\Local\Temp\flutter_tools.c2a19730\flutter_tool.287bc043\app.dill --packages G:\git\myapp\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\c075001b96339384a97db4862b8ab8db.cache.dill.track.dill [ +18 ms] executing: C:\Android\Sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1 [ +11 ms] <- compile package:myapp/main.dart [ +35 ms] --------- beginning of main 02-28 19:36:36.779 E/GnssHAL_GnssInterface( 1793): gnssSvStatusCb: b: input svInfo.flags is 8 [ +25 ms] executing: C:\Android\Sdk\platform-tools\adb.exe version [ +33 ms] Android Debug Bridge version 1.0.41 Version 31.0.0-7110759 Installed as C:\Android\Sdk\platform-tools\adb.exe [ +4 ms] executing: C:\Android\Sdk\platform-tools\adb.exe start-server [ +25 ms] Building APK [ +20 ms] Running Gradle task 'assembleDebug'... [ +7 ms] Using gradle from G:\git\myapp\android\gradlew.bat. [ +12 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +75 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version [ ] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +3 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version [ +78 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version [ ] openjdk version "1.8.0_242-release" OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01) OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode) [ +1 ms] executing: [G:\git\myapp\android/] G:\git\myapp\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-x86 -Ptarget=G:\git\myapp\lib\main.dart -Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug [+3717 ms] > Task :app:compileFlutterBuildDebug [ +1 ms] [ +70 ms] executing: [G:\SDKs\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] [ +67 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H [ ] [ ] b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] [ ] executing: [G:\SDKs\flutter/] git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] [ +54 ms] Exit code 0 from: git tag --points-at b7d4806243a4e906bf061f79a0e314ba28111aa6 [ ] [ ] 1.27.0-8.0.pre [ +187 ms] [ +925 ms] executing: [G:\SDKs\flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +1 ms] [ +42 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] [ ] origin/dev [ ] [ ] executing: [G:\SDKs\flutter/] git ls-remote --get-url origin [ +96 ms] [ +34 ms] Exit code 0 from: git ls-remote --get-url origin [ +3 ms] [ ] https://github.com/flutter/flutter.git [ ] [ +68 ms] executing: [G:\SDKs\flutter/] git rev-parse --abbrev-ref HEAD [ +96 ms] [ +37 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ +1 ms] [ ] dev [ +98 ms] [ +84 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ +1 ms] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ +1 ms] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ +65 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update. [ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update. [ +1 ms] [ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update. [ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ +2 ms] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update. [ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update. [ +75 ms] [ +66 ms] Initializing file store [ +1 ms] [ +13 ms] Done initializing file store [ ] [ +37 ms] Skipping target: gen_localizations [ +498 ms] [ +429 ms] Skipping target: kernel_snapshot [ +1 ms] [ +21 ms] debug_android_application: Starting due to {InvalidatedReason.outputMissing} [+4198 ms] [+4231 ms] debug_android_application: Complete [+1400 ms] [+1408 ms] Persisting file store [ +100 ms] [ +35 ms] Done persisting file store [ +1 ms] [ +24 ms] build succeeded. [ +96 ms] [ +138 ms] "flutter assemble" took 6.515ms. [ +300 ms] [ +223 ms] ensureAnalyticsSent: 220ms [ +2 ms] [ +1 ms] Running shutdown hooks [ ] [ ] Shutdown hooks complete [ ] [ ] exiting with code 0 [ ] > Task :app:packLibsflutterBuildDebug UP-TO-DATE [ ] > Task :app:preBuild UP-TO-DATE [ ] > Task :app:preDebugBuild UP-TO-DATE [ +1 ms] > Task :app:compileDebugAidl NO-SOURCE [ +1 ms] > Task :app:compileDebugRenderscript NO-SOURCE [ ] > Task :app:generateDebugBuildConfig UP-TO-DATE [ +89 ms] > Task :app:checkDebugAarMetadata UP-TO-DATE [ +100 ms] > Task :app:cleanMergeDebugAssets [ +1 ms] > Task :app:mergeDebugShaders UP-TO-DATE [ ] > Task :app:compileDebugShaders NO-SOURCE [ ] > Task :app:generateDebugAssets UP-TO-DATE [ ] > Task :app:mergeDebugAssets UP-TO-DATE [ ] > Task :app:copyFlutterAssetsDebug UP-TO-DATE [ ] > Task :app:generateDebugResValues UP-TO-DATE [ ] > Task :app:generateDebugResources UP-TO-DATE [ +95 ms] > Task :app:mergeDebugResources UP-TO-DATE [ +2 ms] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE [ ] > Task :app:extractDeepLinksDebug UP-TO-DATE [ ] > Task :app:processDebugMainManifest UP-TO-DATE [ +1 ms] > Task :app:processDebugManifest FAILED [ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. [ ] Use '--warning-mode all' to show the individual deprecation warnings. [ ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings [ ] 14 actionable tasks: 3 executed, 11 up-to-date [ +1 ms] FAILURE: Build failed with an exception. [ +2 ms] * What went wrong: [ ] A problem was found with the configuration of task ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest'). [ ] > File 'G:\git\myapp\build\app\intermediates\merged_manifest\debug\out\AndroidManifest.xml' specified for property 'mainMergedManifest' does not exist. [ ] * 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 11s [ +377 ms] Running Gradle task 'assembleDebug'... (completed in 11,8s) [ +4 ms] Exception: Gradle task assembleDebug failed with exit code 1 [ +1 ms] "flutter run" took 12.599ms. [ +3 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:12:3) #1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:655:9) #2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1186:12) #3 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1037:27) #4 AppContext.run. (package:flutter_tools/src/base/context.dart:152:19) #5 AppContext.run (package:flutter_tools/src/base/context.dart:151:12) #6 CommandRunner.runCommand (package:args/command_runner.dart:197:13) #7 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:283:9) #8 AppContext.run. (package:flutter_tools/src/base/context.dart:152:19) #9 AppContext.run (package:flutter_tools/src/base/context.dart:151:12) #10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:239:5) #11 run.. (package:flutter_tools/runner.dart:62:9) #12 run. (package:flutter_tools/runner.dart:60:12) #13 AppContext.run. (package:flutter_tools/src/base/context.dart:152:19) #14 AppContext.run (package:flutter_tools/src/base/context.dart:151:12) #15 runInContext (package:flutter_tools/src/context_runner.dart:77:10) #16 main (package:flutter_tools/executable.dart:92:3) [ +93 ms] ensureAnalyticsSent: 91ms [ +1 ms] Running shutdown hooks [ ] Shutdown hook priority 4 [ +3 ms] Shutdown hooks complete [ +1 ms] exiting with code 1 ```

it is saying that the propriety mainMergedManifest on G:\git\myapp\build\app\intermediates\merged_manifest\debug\out\AndroidManifest.xml doesn't exist, is it normal that I don't have AndroidManifest.xml in the specified path? image

manu-urba commented 3 years ago

Apparently the app runs only if its location is in C: disk. Otherwise it won't run, why so?

PreSwift commented 3 years ago

The same issue!

iapicca commented 3 years ago

@manu-urba @PreSwift please note this comment

Seems like clearing out .gradle and creating a fresh project from scratch cleared it up

manu-urba commented 3 years ago

That didn't help with my issue, I'm reporting that I can't run any app outside C disk, I still have the issue after reinstalling everything, clearing cache, and changing computer. Can you maybe try to do the same to confirm it's somehow a problem of mine please?

peterlobster commented 3 years ago

@manu-urba It's true! Good observation!

Currently, Flutter is only building when it's on the C drive on Windows. To be fair, I haven't tried any other platforms lately but I'm sure that in the past it's worked (on macOS) when a project has been stored in different drive than the startup drive. So either this is a bug as of late, or a bug only on Windows, or both.

>flutter doctor -v
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19042.928], locale en-US)
    • Flutter version 2.0.5 at C:\src\flutter
    • Framework revision adc687823a (12 days ago), 2021-04-16 09:40:20 -0700
    • Engine revision b09f014e96
    • Dart version 2.12.3

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\<user>\AppData\Local\Android\Sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Users\<user>\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.55.2)
    • VS Code at C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.85
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 90.0.818.49

• No issues found!
peterlobster commented 3 years ago

FWIW It seems to be working on my colleague's computer that has an older version of Flutter. To be fair though, he wasn't using an emulator but a physical phone, but the project was still not located on C.

>flutter doctor -v
[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.18362.418], locale en-US)
    • Flutter version 1.22.4 at C:\src\flutter
    • Framework revision 1aafb3a8b9 (6 months ago), 2020-11-13 09:59:28 -0800
    • Engine revision 2c956a31c0
    • Dart version 2.10.4

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
    • Android SDK at C:\Users\<user>\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[!] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.55.2)
    • VS Code at C:\Users\<user>\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.
manu-urba commented 3 years ago

However, either phisical phone and emulator wouldn't build for me

peterlobster commented 3 years ago

However, either phisical phone and emulator wouldn't build for me

@manu-urba ...then it would seem that something changed in the last couple months that broke it and needs to be fixed.

sebcline commented 3 years ago

I appear to have the same issue. I have a project (call it P1) on a separate Windows drive (F drive, that I seem to recall working fine in February). No luck with full new installs (android, flutter, and gradle all cleared and new). Copied crashing project (P1) to C drive and still got the same error. Built a new project (P2) in C drive, worked fine. Copied the lib folder from the old project (P1) to this new project (P2) and then it worked (all on C drive). Copied this new working project (P2.1) back to external drive and it crashed back to the same error code. flutter clean + run did not correct. Then copied this now broken project (P2.2) back to C drive, it still crashed (even after flutter clean + run). Anyone have any luck repeating that copy-paste process and getting the error?

Interestingly there has been no issue on C or F drive project running in Chrome, regardless of copy-paste stage (P1 - P2.2). Unfortunately I was working on the web version for this whole time (it is a hobby project, so more not working than working to be honest) so I am not sure when the F drive project stopped building to Android.

I did this whole copy paste method again (repeat steps P2 - P2.2) with a default flutter new project with no lib copy and got the same issue. I can post more logs/files if that would help!

>flutter doctor -v
[√] Flutter (Channel stable, 2.0.6, on Microsoft Windows [Version 10.0.19042.985], locale en-CA)
    • Flutter version 2.0.6 at C:\src\flutter
    • Framework revision 1d9032c7e1 (2 weeks ago), 2021-04-29 17:37:58 -0700
    • Engine revision 05e680e202
    • Dart version 2.12.3

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Users\cline\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] VS Code (version 1.56.2)
    • VS Code at C:\Users\cline\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.22.0

[√] Connected device (3 available)
    • AOSP on IA Emulator (mobile) • emulator-5554 • android-x86    • Android 9 (API 28) (emulator)
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 90.0.4430.212
    • Edge (web)                   • edge          • web-javascript • Microsoft Edge 90.0.818.51

• No issues found!
peterlobster commented 3 years ago

I've been starting to suspect it has to do with the drive's filesystem. I reformatted the original drive that gave me issues from ExFat to NTFS, and now I don't have any issues anymore. I also run both Windows and macOS (using Paragon) on my daily computer and it works on both now too.

@sebcline You pose an interesting situation. I had a similar problem but it was pretty cut and dry for me, cause when I built the project on C:\ I didn't have issues, but when I copied it to D:\ it had the issue. So I'm kind of thinking there might be something else in your situation, as I really can't think of anything that would cause your specific issue.

sebcline commented 3 years ago

@peterlobster you are a miracle worker!

I split my F:\ into an NTFS and an ExFat partition, ran the same copy-paste test as my previous comment. NTFS worked perfectly at all stages, ExFat failed the exact same way. It would be good to know if there were more broad implications, but it seems from this narrow test that Gradle (at least in Flutter) needs the project on an NTFS drive filesystem to run? Would be interesting if this could be explored further, but at the very least this format option seems like reliable solution (for our two cases at least).

@manu-urba is this an option for you? If so, did it work?

sm00nie commented 3 years ago

I'm new to flutter (or mobile development for that matter) and I ran into the same issue. It will build fine on NTFS, but not on exFat. The solution that worked for me on exFat was to downgrade the gradle versions found in build.gradle, on line 9, to: classpath 'com.android.tools.build:gradle:4.0.2' and in gradle-wrapper.properties, on line 6, to: distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip

SaujanyaP17 commented 3 years ago

That didn't help with my issue, I'm reporting that I can't run any app outside C disk, I still have the issue after reinstalling everything, clearing cache, and changing computer. Can you maybe try to do the same to confirm it's somehow a problem of mine please?

I am also having same problem.

zegevlier commented 3 years ago

I have the exact same issue, I can't build a flutter app for Android if it's not on my C drive.

tahamv commented 3 years ago

@peterlobster you are a miracle worker!

I split my F:\ into an NTFS and an ExFat partition, ran the same copy-paste test as my previous comment. NTFS worked perfectly at all stages, ExFat failed the exact same way. It would be good to know if there were more broad implications, but it seems from this narrow test that Gradle (at least in Flutter) needs the project on an NTFS drive filesystem to run? Would be interesting if this could be explored further, but at the very least this format option seems like reliable solution (for our two cases at least).

@manu-urba is this an option for you? If so, did it work?

this worked for me Thank you

Burrell932 commented 2 years ago

You can try this Go to the root of your project in your terminal ,next you enter in the folder called android (cd android) and run the command ./gradlew clean after you run the command ./gradlew build

lucasjinreal commented 2 years ago

I came into same issue, same code copied into my standalone hardisk, built upon it will fail, but on my C:\ everything works. ubuntu doesn't have such issue.

chazgps commented 2 years ago

I spent hours trying to figuring out what the problem source e only worked move my project from drive B: (FAT32) to C: (NTFS).