Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android studio 颤振-无法解析配置的所有任务依赖项';:app:debugCompileClasspath'; 复制步骤 运行flatter创建第一个应用程序 先运行cd\u应用程序 运行flatter运行_Android Studio_Flutter - Fatal编程技术网

Android studio 颤振-无法解析配置的所有任务依赖项';:app:debugCompileClasspath'; 复制步骤 运行flatter创建第一个应用程序 先运行cd\u应用程序 运行flatter运行

Android studio 颤振-无法解析配置的所有任务依赖项';:app:debugCompileClasspath'; 复制步骤 运行flatter创建第一个应用程序 先运行cd\u应用程序 运行flatter运行,android-studio,flutter,Android Studio,Flutter,我使用了我从flattercreate 预期结果: 要在插入式android设备上启动的应用程序 实际结果: 错误生成失败 $ flutter run Launching lib/main.dart on SAMSUNG SM G930A in debug mode... FAILURE: Build failed with an exception.

我使用了我从
flattercreate

预期结果:

要在插入式android设备上启动的应用程序

实际结果:

错误生成失败

$ flutter run
Launching lib/main.dart on SAMSUNG SM G930A in debug mode...
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e.
     Required by:                                                       
         project :app                                                   
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
   > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e.
     Required by:                                                       
         project :app                                                   
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
      > Skipped due to earlier error                                    
                                                                        
* 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 1m 37s                                                  
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        98.0s
Exception: Gradle task assembleDebug failed with exit code 1
日志 一些额外信息:

我是新来的颤振和刚刚测试创建和运行的模板应用程序时,我得到了这个错误。我试着在Android Studio中运行它(使用插件),但同样的问题。昨天我在谷歌上搜索了一整天,一点运气都没有。发现了两个标题类似的问题并尝试了解决方案,但没有任何帮助[颤振清理;颤振升级;颤振发布缓存修复;等等]。我使用的是旧版本的MacMini;奥斯卡皮坦(10.11.6)。我不知道这是否是问题的一部分,但不应该是,因为我正在尝试在android设备上运行它,而不是在苹果设备上运行它(这也是为什么旧版本的xcode不重要)。颤振医生说颤振和飞镖插件没有安装,但它们确实安装了,我已经看到这是一个bug,但不应该影响构建。此外,我正在使用插入式galaxy s7来运行。谢谢你的帮助

$ flutter -v run
[ +204 ms] executing: [/Users/eliper3/tools/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +66 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 1aafb3a8b9b0c36241c5f5b34ee914770f015818
[   +1 ms] executing: [/Users/eliper3/tools/flutter/] git tag --points-at HEAD
[  +17 ms] Exit code 0 from: git tag --points-at HEAD
[   +1 ms] 1.22.4
[  +19 ms] executing: [/Users/eliper3/tools/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +9 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/Users/eliper3/tools/flutter/] git ls-remote --get-url origin
[   +7 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +67 ms] executing: [/Users/eliper3/tools/flutter/] git rev-parse --abbrev-ref HEAD
[   +9 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[   +8 ms] executing: sw_vers -productName
[  +14 ms] Exit code 0 from: sw_vers -productName
[        ] Mac OS X
[        ] executing: sw_vers -productVersion
[  +16 ms] Exit code 0 from: sw_vers -productVersion
[        ] 10.11.6
[        ] executing: sw_vers -buildVersion
[  +14 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 15G31
[   +1 ms] executing: sysctl hw.optional.arm64
[   +6 ms] Exit code 1 from: sysctl hw.optional.arm64
[        ] sysctl: unknown oid 'hw.optional.arm64'
[  +69 ms] Artifact Instance of 'AndroidMavenArtifacts' 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.
[   +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.
[  +16 ms] executing: /Users/eliper3/Library/Android/sdk/platform-tools/adb devices -l
[  +24 ms] executing: /usr/bin/xcode-select --print-path
[   +9 ms] Exit code 0 from: /usr/bin/xcode-select --print-path
[        ] /Applications/Xcode.app/Contents/Developer
[   +1 ms] executing: /usr/bin/xcodebuild -version
[  +76 ms] Exit code 0 from: /usr/bin/xcodebuild -version
[        ] Xcode 8.2
           Build version 8C38
[   +3 ms] Xcode not found. Run 'flutter doctor' for more information.
[  +55 ms] List of devices attached
           d7c1f780               device usb:4245880832X product:heroqlteuc model:SAMSUNG_SM_G930A device:heroqlteatt transport_id:1
[  +14 ms] /Users/eliper3/Library/Android/sdk/platform-tools/adb -s d7c1f780 shell getprop
[  +84 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +4 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.
[   +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.
[ +376 ms] Generating /Users/eliper3/flutter/first_app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +40 ms] ro.hardware = qcom
[  +80 ms] Starting incremental build...
[   +3 ms] Initializing file store
[  +19 ms] Skipping target: gen_localizations
[  +19 ms] complete
[  +11 ms] Launching lib/main.dart on SAMSUNG SM G930A in debug mode...
[  +10 ms] /Users/eliper3/tools/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /Users/eliper3/tools/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/eliper3/tools/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -Ddart.developer.causal_async_stacks=true --output-dill
/var/folders/q8/j0xfpkkj4dz7961y2vvylwxm0000gn/T/flutter_tools.rduERF/flutter_tool.Ftyzx8/app.dill --packages .packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build/cache.dill.track.dill
[  +43 ms] executing: /Users/eliper3/Library/Android/sdk/platform-tools/adb -s d7c1f780 shell -x logcat -v time -t 1
[ +241 ms] Exit code 0 from: /Users/eliper3/Library/Android/sdk/platform-tools/adb -s d7c1f780 shell -x logcat -v time -t 1
[   +1 ms] --------- beginning of main
           11-23 15:10:16.863 D/UsageManagerWidgetProvider( 4756): cycledatausagesummary updated
[   +3 ms] executing: /Users/eliper3/Library/Android/sdk/platform-tools/adb -s d7c1f780 shell -x logcat -v time -t 1
[ +234 ms] Exit code 0 from: /Users/eliper3/Library/Android/sdk/platform-tools/adb -s d7c1f780 shell -x logcat -v time -t 1
[   +1 ms] --------- beginning of main
           11-23 15:10:16.863 D/UsageManagerWidgetProvider( 4756): cycledatausagesummary updated
[  +22 ms] <- compile package:first_app/main.dart
[  +23 ms] executing: /Users/eliper3/Library/Android/sdk/platform-tools/adb version
[  +41 ms] Android Debug Bridge version 1.0.41
           Version 30.0.5-6877874
           Installed as /Users/eliper3/Library/Android/sdk/platform-tools/adb
[   +5 ms] executing: /Users/eliper3/Library/Android/sdk/platform-tools/adb start-server
[  +19 ms] Building APK
[  +56 ms] Running Gradle task 'assembleDebug'...
[  +15 ms] gradle.properties already sets `android.enableR8`
[  +15 ms] Using gradle from /Users/eliper3/flutter/first_app/android/gradlew.
[   +1 ms] /Users/eliper3/flutter/first_app/android/gradlew mode: 33261 rwxr-xr-x.
[  +22 ms] executing: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[  +18 ms] Exit code 0 from: /usr/bin/plutil -convert json -o - /Applications/Android Studio.app/Contents/Info.plist
[        ] {"CFBundleName":"Android
Studio","JVMOptions":{"MainClass":"com.intellij.idea.Main","ClassPath":"$APP_PACKAGE\/Contents\/lib\/bootstrap.jar:$APP_PACKAGE\/Contents\/lib\/extensions.jar:$APP_PACKAGE\/Contents\/lib\/util.jar:$APP_PACKAGE\/Contents\/lib\/jdom.jar:$APP_PACKAGE\/Contents\/lib\/log4j.
jar:$APP_PACKAGE\/Contents\/lib\/trove4j.jar:$APP_PACKAGE\/Contents\/lib\/jna.jar","JVMVersion":"1.8*,1.8+","Properties":{"idea.home.path":"$APP_PACKAGE\/Contents","idea.executable":"studio","idea.platform.prefix":"AndroidStudio","idea.paths.selector":"AndroidStudio4.1"
,"idea.vendor.name":"Google"}},"NSDesktopFolderUsageDescription":"An application in Android Studio requests access to the user's Desktop
folder.","LSArchitecturePriority":["x86_64"],"CFBundleVersion":"AI-201.8743.12.41.6953283","CFBundleDevelopmentRegion":"English","NSCameraUsageDescription":"An application in Android Studio requests access to the device's
camera.","CFBundleDocumentTypes":[{"CFBundleTypeExtensions":["ipr"],"CFBundleTypeName":"Android Studio Project
File","CFBundleTypeIconFile":"studio.icns","CFBundleTypeRole":"Editor"},{"CFBundleTypeExtensions":["*"],"CFBundleTypeOSTypes":["****"],"LSTypeIsPackage":false,"CFBundleTypeName":"All
documents","CFBundleTypeRole":"Editor"}],"NSSupportsAutomaticGraphicsSwitching":true,"CFBundlePackageType":"APPL","CFBundleIconFile":"studio.icns","NSHighResolutionCapable":true,"CFBundleShortVersionString":"4.1","NSMicrophoneUsageDescription":"An application in Android
Studio requests access to the device's microphone.","CFBundleInfoDictionaryVersion":"6.0","CFBundleExecutable":"studio","NSLocationUsageDescription":"An application in Android Studio requests access to the user's location
information.","LSRequiresNativeExecution":"YES","CFBundleURLTypes":[{"CFBundleURLName":"Stacktrace","CFBundleURLSchemes":["idea"],"CFBundleTypeRole":"Editor"}],"CFBundleIdentifier":"com.google.android.studio","LSApplicationCategoryType":"public.app-category.developer-to
ols","CFBundleSignature":"????","LSMinimumSystemVersion":"10.8","NSDocumentsFolderUsageDescription":"An application in Android Studio requests access to the user's Documents folder.","NSDownloadsFolderUsageDescription":"An application in Android Studio requests access
to the user's Downloads folder.","NSNetworkVolumesUsageDescription":"An application in Android Studio requests access to files on a network volume.","CFBundleGetInfoString":"Android Studio 4.1, build AI-201.8743.12.41.6953283. Copyright JetBrains s.r.o., (c)
2000-2020","NSRemovableVolumesUsageDescription":"An application in Android Studio requests access to files on a removable volume."}
[  +29 ms] executing: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[ +156 ms] Exit code 0 from: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java -version
[        ] openjdk version "1.8.0_242-release"
           OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
           OpenJDK 64-Bit Server VM (build 25.242-b3-6915495, mixed mode)
[   +3 ms] executing: [/Users/eliper3/flutter/first_app/android/] /Users/eliper3/flutter/first_app/android/gradlew -Pverbose=true -Ptarget-platform=android-arm64 -Ptarget=/Users/eliper3/flutter/first_app/lib/main.dart -Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root assembleDebug
[+1221 ms] Starting a Gradle Daemon, 1 busy and 1 incompatible Daemons could not be reused, use --status for details
[+111977 ms] FAILURE: Build failed with an exception.
[   +4 ms] * What went wrong:
[        ] Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
[        ] > Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
[        ]    > Could not resolve io.flutter:flutter_embedding_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e.
[        ]      Required by:
[        ]          project :app
[        ]       > Skipped due to earlier error
[        ]       > Skipped due to earlier error
[        ]       > Skipped due to earlier error
[        ]       > Skipped due to earlier error
[        ]    > Could not resolve io.flutter:arm64_v8a_debug:1.0.0-2c956a31c0a3d350827aee6c56bb63337c5b4e6e.
[        ]      Required by:
[        ]          project :app
[        ]       > Skipped due to earlier error
[        ]       > Skipped due to earlier error
[        ]       > Skipped due to earlier error
[        ]       > Skipped due to earlier error
[        ] * 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 1m 53s
[ +608 ms] Running Gradle task 'assembleDebug'... (completed in 114.1s)
[   +8 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +3 ms] "flutter run" took 115,681ms.
[  +12 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:607:7)
           <asynchronous suspension>
           #2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:977:18)
           #3      _rootRunUnary (dart:async/zone.dart:1198:47)
           #4      _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #5      _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #6      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #7      Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #8      Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #9      _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
           #10     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
           #11     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
           #12     _rootRunUnary (dart:async/zone.dart:1198:47)
           #13     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #14     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #15     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #16     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #17     Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #18     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:40:15)
           #19     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:311:13)
           #20     AndroidDevice.isLocalEmulator (package:flutter_tools/src/android/android_device.dart)
           #21     _rootRunUnary (dart:async/zone.dart:1198:47)
           #22     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
           #23     _FutureListener.handleValue (dart:async/future_impl.dart:143:18)
           #24     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:696:45)
           #25     Future._propagateToListeners (dart:async/future_impl.dart:725:32)
           #26     Future._completeWithValue (dart:async/future_impl.dart:529:5)
           #27     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:567:7)
           #28     _rootRun (dart:async/zone.dart:1190:13)
           #29     _CustomZone.run (dart:async/zone.dart:1093:19)
           #30     _CustomZone.runGuarded (dart:async/zone.dart:997:7)
           #31     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1037:23)
           #32     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
           #33     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
           #34     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
           #35     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

$ flutter analyze
Analyzing first_app...                                                  
No issues found! (ran in 3.5s)
$ flutter doctor -v
[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.11.6 15G31 darwin-x64, locale en)
    • Flutter version 1.22.4 at /Users/eliper3/tools/flutter
    • Framework revision 1aafb3a8b9 (10 days 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.3)
    • Android SDK at /Users/eliper3/Library/Android/sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS (Xcode 8.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.2, Build version 8C38
    ✗ Flutter requires a minimum Xcode version of 11.0.0.
      Download the latest version or update via the Mac App Store.
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] Connected device (1 available)
    • SAMSUNG SM G930A (mobile) • d7c1f780 • android-arm64 • Android 7.0 (API 24)