Swiper( itemBuilder: (BuildContext context,int index){ returnnew Image.network("http://via.placeholder.com/350x150",fit: BoxFit.fill,); }, itemCount: 3, pagination: new SwiperPagination(), control: new SwiperControl(), ),
1 2 3 4 5 6 7 8 9
════════ Exception caught by rendering library ═════════════════════════════════ RenderBox was not laid out: RenderViewport#3e1ad NEEDS-PAINT 'package:flutter/src/rendering/box.dart': package:flutter/…/rendering/box.dart:1 Failed assertion: line 1927 pos 12: 'hasSize'
The relevant error-causing widget was Swiper lib/home/home.dart:70
Launching lib/main.dart on Android SDK built for x86 in debug mode... lib/main.dart:1 e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors e: /Users/guanguan/.gradle/caches/transforms-2/files-2.1/0464082e81de712709b8918eac577657/jetified-kotlin-stdlib-jdk7-1.6.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.1.15.
...(一系列和上面一样的报错)
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':fluttertoast:compileDebugKotlin'. > Compilation error. See logfor more details
* 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 33s [!] Your project requires a newer version of the Kotlin Gradle plugin. Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update /Users/guanguan/Downloads/Github/app/android/build.gradle: ext.kotlin_version = '<latest-version>' Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
: Error: Expected named argument. lib/mine/userinfo.dart:162 _sample == null ? _buildOpeningImage() : _buildCroppingImage(), ^ : Error: No named parameter with the name '#1'. lib/mine/userinfo.dart:153 title: Container( ^^... : Context: Found this candidate, but the arguments don't match. ../…/widgets/container.dart:253 Container({ ^^^^^^^^^ Restarted application in 804ms.
════════ Exception caught by image resource service ════════════════════════════ The following HttpException was thrown resolving an image codec: Connection closed while receiving data, uri = http://www.bobdy.com/pic/app/2021/12/163982066976162464.jpg ...
#flutter doctor -v Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.10.3, on macOS 12.3 21E230 darwin-x64, locale zh-Hans-CN) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 13.3) [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] IntelliJ IDEA Ultimate Edition (version 2021.1.1) [✓] VS Code (version 1.65.2) [✓] Connected device (2 available) [!] HTTP Host Availability ✗ HTTP host https://maven.google.com/ is not reachable. Reason: An error occurred while checking the HTTP host: Operation timed out
Running "flutter pub get"in app... Launching lib/main.dart on Android SDK built for x86 in debug mode... lib/main.dart:1 Warning: The plugin flutter_plugin_android_lifecycle requires Android SDK version 31. Warning: The plugin image_picker requires Android SDK version 31. Warning: The plugin path_provider_android requires Android SDK version 31. Warning: The plugin video_player_android requires Android SDK version 31. One or more plugins require a higher Android SDK version. Fix this issue by adding the following to /Users/guanguan/Downloads/Github/app/android/app/build.gradle: android { compileSdkVersion 31 ... }
FAILURE: Build failed with an exception.
* What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > Multiple task action failures occurred: > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-30). Dependency: androidx.window:window-java:1.0.0-beta04. AAR metadata file: /Users/guanguan/.gradle/caches/transforms-2/files-2.1/ad201fac15a88598107ec645f351f5b4/jetified-window-java-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > The minCompileSdk (31) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-30). Dependency: androidx.window:window:1.0.0-beta04. AAR metadata file: /Users/guanguan/.gradle/caches/transforms-2/files-2.1/03c633e46d75bfb21f082f0417f55161/jetified-window-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties.
* 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 14s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)