Open manu-urba opened 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
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"
}
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
Please try with a new project flutter create mydemo
Thank you
I updated everything. Now this is the output of
``` [√] 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:
```
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)
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?
Apparently the app runs only if its location is in C: disk. Otherwise it won't run, why so?
The same issue!
@manu-urba @PreSwift please note this comment
Seems like clearing out .gradle and creating a fresh project from scratch cleared it up
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?
@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!
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.
However, either phisical phone and emulator wouldn't build for me
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.
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!
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.
@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?
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
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.
I have the exact same issue, I can't build a flutter app for Android if it's not on my C drive.
@peterlobster you are a miracle worker!
I split my
F:\
into anNTFS
and anExFat
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 anNTFS
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
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
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.
I spent hours trying to figuring out what the problem source e only worked move my project from drive B: (FAT32) to C: (NTFS).
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
Here's my
flutter doctor -v
output:I tried modifying
gradle-wrapper.properties
distributionUrl
tohttps\://services.gradle.org/distributions/gradle-6.5.1-all.zip
andclasspath 'com.android.tools.build:gradle:4.1.0'
underbuild.gradle
. But nothing is helping it.My output of
./gradlew -v
: