Steps to Reproduce
Create a Flutter project.
Make a list of containers.
run .map() function on it which returns Positioned() widget.
Use a list of these positioned widgets inside a Stack.
If you use paraments like top, left etc., no output will be given.
If these are ignored, it works like a charm.
Execute flutter run on the code sample
Expected results:
After removing top parameter. Even just using top: 25 gives no output.
Actual results:
Code sample
import "package:flutter/material.dart";
class StackedList extends StatefulWidget {
const StackedList({
required this.children,
this.activeItemCount = 3,
super.key,
});
//List containing all the widgets to be showed as part of stacked UI
final List<Widget> children;
//number of items shown
final int activeItemCount;
#override
State<StackedList> createState() => _StackedListState();
}
class _StackedListState extends State<StackedList> {
#override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: Stack(
children:
widget.children.map((element) {
final index = widget.children.indexOf(element);
return Positioned(
top: 200 + (index * 10),
child: Transform.scale(
scale: 1 - (index / 20),
child: element,
),
);
}).toList()
),
));
}
}
final childrens = <Widget>[
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.green,
),
),
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.greenAccent,
),
),
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.grey,
),
),
Container(
height: 75,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16),
color: Colors.brown,
),
)
],
Logs
No error logs
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with
ExtractAarTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with AarTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with JetifyTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with
ExtractAarTransform
[ ] Transforming lifecycle-runtime-2.2.0.aar (androidx.lifecycle:lifecycle-runtime:2.2.0) with AarTransform
[ ] Transforming savedstate-1.0.0.aar (androidx.savedstate:savedstate:1.0.0) with JetifyTransform
[ ] Transforming savedstate-1.0.0.aar (androidx.savedstate:savedstate:1.0.0) with ExtractAarTransform
[ ] Transforming savedstate-1.0.0.aar (androidx.savedstate:savedstate:1.0.0) with AarTransform
[ ] Transforming lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) with
JetifyTransform
[ ] Transforming lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) with
ExtractAarTransform
[ ] Transforming lifecycle-livedata-2.0.0.aar (androidx.lifecycle:lifecycle-livedata:2.0.0) with AarTransform
[ ] Transforming lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) with
JetifyTransform
[ ] Transforming lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) with
ExtractAarTransform
[ ] Transforming lifecycle-livedata-core-2.0.0.aar (androidx.lifecycle:lifecycle-livedata-core:2.0.0) with
AarTransform
[ ] Transforming lifecycle-common-2.2.0.jar (androidx.lifecycle:lifecycle-common:2.2.0) with JetifyTransform
[ ] Transforming lifecycle-common-2.2.0.jar (androidx.lifecycle:lifecycle-common:2.2.0) with
ExtractJniTransform
[ ] Transforming tracing-1.0.0.aar (androidx.tracing:tracing:1.0.0) with JetifyTransform
[ ] Transforming tracing-1.0.0.aar (androidx.tracing:tracing:1.0.0) with ExtractAarTransform
[ ] Transforming tracing-1.0.0.aar (androidx.tracing:tracing:1.0.0) with AarTransform
[ ] Transforming core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) with JetifyTransform
[ ] Transforming core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) with ExtractAarTransform
[ ] Transforming core-runtime-2.0.0.aar (androidx.arch.core:core-runtime:2.0.0) with AarTransform
[ ] Transforming core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) with JetifyTransform
[ ] Transforming core-common-2.1.0.jar (androidx.arch.core:core-common:2.1.0) with ExtractJniTransform
[ ] Transforming versionedparcelable-1.1.1.aar (androidx.versionedparcelable:versionedparcelable:1.1.1) with
JetifyTransform
[ ] Transforming versionedparcelable-1.1.1.aar (androidx.versionedparcelable:versionedparcelable:1.1.1) with
ExtractAarTransform
[ ] Transforming versionedparcelable-1.1.1.aar (androidx.versionedparcelable:versionedparcelable:1.1.1) with
AarTransform
[ ] Transforming collection-1.1.0.jar (androidx.collection:collection:1.1.0) with JetifyTransform
[ ] Transforming collection-1.1.0.jar (androidx.collection:collection:1.1.0) with ExtractJniTransform
[ ] Transforming lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) with
JetifyTransform
[ ] Transforming lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) with
ExtractAarTransform
[ ] Transforming lifecycle-viewmodel-2.1.0.aar (androidx.lifecycle:lifecycle-viewmodel:2.1.0) with AarTransform[ ] Transforming annotation-1.2.0.jar (androidx.annotation:annotation:1.2.0) with JetifyTransform
[ ] Transforming annotation-1.2.0.jar (androidx.annotation:annotation:1.2.0) with ExtractJniTransform
[ ] Transforming kotlin-stdlib-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib:1.7.10) with JetifyTransform
[ ] Transforming kotlin-stdlib-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib:1.7.10) with ExtractJniTransform
[ ] Transforming annotation-experimental-1.1.0.aar (androidx.annotation:annotation-experimental:1.1.0) with
JetifyTransform
[ ] Transforming annotation-experimental-1.1.0.aar (androidx.annotation:annotation-experimental:1.1.0) with
ExtractAarTransform
[ ] Transforming annotation-experimental-1.1.0.aar (androidx.annotation:annotation-experimental:1.1.0) with
AarTransform
[ ] Transforming kotlin-stdlib-common-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10) with
JetifyTransform
[ ] Transforming kotlin-stdlib-common-1.7.10.jar (org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10) with
ExtractJniTransform
[ ] Transforming annotations-13.0.jar (org.jetbrains:annotations:13.0) with JetifyTransform
[ ] Transforming annotations-13.0.jar (org.jetbrains:annotations:13.0) with ExtractJniTransform
[ ] Caching disabled for task ':app:mergeDebugNativeLibs' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:mergeDebugNativeLibs' as it is up-to-date.
[ ] :app:mergeDebugNativeLibs (Thread[Execution worker Thread 4,5,main]) completed. Took 0.007 secs.
[ ] Resolve mutations for :app:stripDebugDebugSymbols (Thread[Execution worker Thread 5,5,main]) started.
[ ] Resolve mutations for :app:stripDebugDebugSymbols (Thread[Execution worker Thread 5,5,main]) completed.
Took 0.0 secs.
[ ] :app:stripDebugDebugSymbols (Thread[Execution worker Thread 4,5,main]) started.
[ ] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[ ] Caching disabled for task ':app:stripDebugDebugSymbols' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:stripDebugDebugSymbols' as it is up-to-date.
[ ] :app:stripDebugDebugSymbols (Thread[Execution worker Thread 4,5,main]) completed. Took 0.001 secs.
[ ] Resolve mutations for :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) started.
[ ] Resolve mutations for :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) completed. Took
0.0 secs.
[ ] :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) started.
[ ] > Task :app:validateSigningDebug UP-TO-DATE
[ ] Caching disabled for task ':app:validateSigningDebug' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:validateSigningDebug' as it is up-to-date.
[ ] :app:validateSigningDebug (Thread[Execution worker Thread 5,5,main]) completed. Took 0.0 secs.
[ ] Resolve mutations for :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) started.
[ ] Resolve mutations for :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) completed. Took0.0 secs.
[ ] :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) started.
[ ] > Task :app:writeDebugAppMetadata UP-TO-DATE
[ ] Caching disabled for task ':app:writeDebugAppMetadata' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:writeDebugAppMetadata' as it is up-to-date.
[ ] Resolve mutations for :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main])
started.
[ ] Resolve mutations for :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main])
completed. Took 0.0 secs.
[ ] :app:writeDebugAppMetadata (Thread[Execution worker Thread 4,5,main]) completed. Took 0.001 secs.
[ ] :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main]) started.
[ ] > Task :app:writeDebugSigningConfigVersions UP-TO-DATE
[ ] Caching disabled for task ':app:writeDebugSigningConfigVersions' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:writeDebugSigningConfigVersions' as it is up-to-date.
[ ] :app:writeDebugSigningConfigVersions (Thread[Execution worker Thread 5,5,main]) completed. Took 0.002 secs.[ ] > Task :app:compressDebugAssets
[ ] Execution optimizations have been disabled for task ':app:compressDebugAssets' to ensure correctness due tothe following reasons:
[ ] - Gradle detected a problem with the following location: 'C:\Code
Projects\amazon_echo_page\build\app\intermediates\assets\debug\mergeDebugAssets'. Reason: Task
':app:compressDebugAssets' uses this output of task ':app:copyFlutterAssetsDebug' without declaring an explicit or
implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are
executed. Please refer to https://docs.gradle.org/7.5/userguide/validation_problems.html#implicit_dependency for more
details about this problem.
[ ] Invalidating VFS because task ':app:compressDebugAssets' failed validation
[ ] Not watching anything anymore
[ ] Watching 0 directory hierarchies to track changes
[ ] Caching disabled for task ':app:compressDebugAssets' because:
[ ] Build cache is disabled
[ ] Task ':app:compressDebugAssets' is not up-to-date because:
[ ] Incremental execution has been disabled to ensure correctness. Please consult deprecation warnings for
more details.
[ ] The input changes require a full rebuild for incremental task ':app:compressDebugAssets'.
[ ] :app:compressDebugAssets (Thread[Execution worker Thread 6,5,main]) completed. Took 0.681 secs.
[ ] Resolve mutations for :app:packageDebug (Thread[Execution worker Thread 5,5,main]) started.
[ +23 ms] Resolve mutations for :app:packageDebug (Thread[Execution worker Thread 5,5,main]) completed. Took 0.0
secs.
[ ] :app:packageDebug (Thread[Execution worker Thread 6,5,main]) started.
[ ] > Task :app:packageDebug UP-TO-DATE
[ ] Caching disabled for task ':app:packageDebug' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:packageDebug' as it is up-to-date.
[ ] :app:packageDebug (Thread[Execution worker Thread 6,5,main]) completed. Took 0.007 secs.
[ ] Resolve mutations for :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main])
started.
[ ] Resolve mutations for :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main])
completed. Took 0.0 secs.
[ ] :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main]) started.
[ ] producer locations for task group 0 (Thread[Execution worker,5,main]) started.
[ ] producer locations for task group 0 (Thread[Execution worker,5,main]) completed. Took 0.0 secs.
[ ] > Task :app:createDebugApkListingFileRedirect UP-TO-DATE
[ ] Caching disabled for task ':app:createDebugApkListingFileRedirect' because:
[ ] Build cache is disabled
[ ] Skipping task ':app:createDebugApkListingFileRedirect' as it is up-to-date.
[ ] :app:createDebugApkListingFileRedirect (Thread[Execution worker Thread 6,5,main]) completed. Took 0.001
secs.
[ ] Resolve mutations for :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) started.
[ ] Resolve mutations for :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) completed. Took 0.0
secs.
[ ] :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) started.
[ +25 ms] > Task :app:assembleDebug
[ ] Caching disabled for task ':app:assembleDebug' because:
[ ] Build cache is disabled
[ ] Task ':app:assembleDebug' is not up-to-date because:
[ ] Task has not declared any outputs despite executing actions.
[ ] :app:assembleDebug (Thread[Execution worker Thread 6,5,main]) completed. Took 0.104 secs.
[ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[ ] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come
from your own scripts or plugins.
[ ] See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings
[ ] Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure
correctness.
[ ] Please consult deprecation warnings for more details.
[ ] BUILD SUCCESSFUL in 5s
[ ] 36 actionable tasks: 6 executed, 30 up-to-date
[ ] Watched directory hierarchies: []
[ +529 ms] Running Gradle task 'assembleDebug'... (completed in 6.5s)
[ +2 ms] Calculate SHA1: LocalDirectory: 'C:\Code
Projects\amazon_echo_page\build\app\outputs\flutter-apk'/app-debug.apk
[ +597 ms] √ Built build\app\outputs\flutter-apk\app-debug.apk.
[ +2 ms] executing: C:\src\Android\SDK\build-tools\33.0.1\aapt dump xmltree C:\Code
Projects\amazon_echo_page\build\app\outputs\flutter-apk\app-debug.apk AndroidManifest.xml
[ +24 ms] Exit code 0 from: C:\src\Android\SDK\build-tools\33.0.1\aapt dump xmltree C:\Code
Projects\amazon_echo_page\build\app\outputs\flutter-apk\app-debug.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)0x21
A: android:compileSdkVersionCodename(0x01010573)="13" (Raw: "13")
A: package="com.example.amazon_echo_page" (Raw: "com.example.amazon_echo_page")
A: platformBuildVersionCode=(type 0x10)0x21
A: platformBuildVersionName=(type 0x10)0xd
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x21
E: uses-permission (line=15)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
E: application (line=17)
A: android:label(0x01010001)="amazon_echo_page" (Raw: "amazon_echo_page")
A: android:icon(0x01010002)=#0x7f080000
A: android:name(0x01010003)="android.app.Application" (Raw: "android.app.Application")
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
"androidx.core.app.CoreComponentFactory")
E: activity (line=23)
A: android:theme(0x01010000)=#0x7f0a0000
A: android:name(0x01010003)="com.example.amazon_echo_page.MainActivity" (Raw:
"com.example.amazon_echo_page.MainActivity")
A: android:exported(0x01010010)=(type 0x12)0xffffffff
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=38)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
"io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=#0x7f0a0001
E: intent-filter (line=42)
E: action (line=43)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=45)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
"android.intent.category.LAUNCHER")
E: meta-data (line=52)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2
E: uses-library (line=56)
A: android:name(0x01010003)="androidx.window.extensions" (Raw: "androidx.window.extensions")
A: android:required(0x0101028e)=(type 0x12)0x0
E: uses-library (line=59)
A: android:name(0x01010003)="androidx.window.sidecar" (Raw: "androidx.window.sidecar")
A: android:required(0x0101028e)=(type 0x12)0x0
[ +6 ms] Stopping app 'app-debug.apk' on sdk gphone64 x86 64.
[ ] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell am force-stop
com.example.amazon_echo_page
[ +65 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell pm list packages
com.example.amazon_echo_page
[ +97 ms] package:com.example.amazon_echo_page
[ +1 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell cat
/data/local/tmp/sky.com.example.amazon_echo_page.sha1
[ +47 ms] 3a2dbb94e641ceb1c011256a71b600fb6d6342f3
[ +1 ms] Latest build already installed.
[ ] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
[ +51 ms] --------- beginning of main
02-14 21:13:59.045 D/CarrierSvcBindHelper( 921): No carrier app for: 0
[ +4 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell am start -a
android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x20000000 --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true
com.example.amazon_echo_page/com.example.amazon_echo_page.MainActivity
[ +70 ms] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x20000000
cmp=com.example.amazon_echo_page/.MainActivity (has extras) }
[ +1 ms] Waiting for observatory port to be available...
[ +559 ms] Observatory URL on device: http://127.0.0.1:36213/YB2WX5_tTgw=/
[ +1 ms] executing: C:\src\Android\SDK\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:36213
[ +40 ms] 60200
[ ] Forwarded host port 60200 to device port 36213 for Observatory
[ +4 ms] Caching compiled dill
[ +31 ms] Connecting to service protocol: http://127.0.0.1:60200/YB2WX5_tTgw=/
[ +262 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:60200/YB2WX5_tTgw=/.
[ +171 ms] DDS is listening at http://127.0.0.1:60203/WwK9SPk9WF0=/.
[ +53 ms] Successfully connected to service protocol: http://127.0.0.1:60200/YB2WX5_tTgw=/
[ +71 ms] DevFS: Creating new filesystem on the device (null)
[ +31 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/com.example.amazon_echo_page/code_cache/amazon_echo_pageNQVHSV/amazon_echo_page/)
[ +3 ms] Updating assets
[ +107 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more
information see #56466.
[ +5 ms] Syncing files to device sdk gphone64 x86 64...
[ +3 ms] Compiling dart to kernel with 0 updated files
[ ] Processing bundle.
[ +1 ms] <- recompile package:amazon_echo_page/main.dart 06fa5efe-3a35-4146-8cc0-5480b01cce6b
[ ] <- 06fa5efe-3a35-4146-8cc0-5480b01cce6b
[ +2 ms] Bundle processing done.
[ +87 ms] Updating files.
[ ] DevFS: Sync finished
[ +2 ms] Syncing files to device sdk gphone64 x86 64... (completed in 97ms)
[ +1 ms] Synced 0.0MB.
[ +4 ms] <- accept
[ +8 ms] Connected to _flutterView/0x72f67ca58530.
[ +2 ms] Flutter run key commands.
[ +1 ms] r Hot reload.
[ +4 ms] R Hot restart.
[ +1 ms] h List all available interactive commands.
[ +1 ms] d Detach (terminate "flutter run" but leave application running).
[ ] c Clear the screen
[ ] q Quit (terminate the application on the device).
[ ] Running with sound null safety
[ ] An Observatory debugger and profiler on sdk gphone64 x86 64 is available at:
http://127.0.0.1:60203/WwK9SPk9WF0=/
[ +582 ms] The Flutter DevTools debugger and profiler on sdk gphone64 x86 64 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:60203/WwK9SPk9WF0=/
No issues found! (ran in 1.5s)
[√] Flutter (Channel stable, 3.7.0, on Microsoft Windows [Version 10.0.19045.2546], locale en-US)
• Flutter version 3.7.0 on channel stable at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b06b8b2710 (3 weeks ago), 2023-01-23 16:55:55 -0800
• Engine revision b24591ed32
• Dart version 2.19.0
• DevTools version 2.20.1
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
• Android SDK at C:\src\Android\SDK
• Platform android-33, build-tools 33.0.1
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2022 17.4.0)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools
• Visual Studio Build Tools 2022 version 17.4.33103.184
• Windows 10 SDK version 10.0.22621.0
[√] Android Studio (version 2022.1)
• 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 11.0.15+0-b2043.56-8887301)
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 12 (API 32) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2546]
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.120
• Edge (web) • edge • web-javascript • Microsoft Edge 109.0.1518.70
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
You can use Align widget for this case, else provide width or left and right value.
final index = widget.children.indexOf(element);
return Positioned(
top: 200 + (index * 10),
left: 0,
right: 0,
child: Transform.scale(
scale: 1,
child: element,
),
);
Related
I am trying to build my flutter app, everything was fine before upgrading Flutter to version 3.0.5
Now I am getting the following error
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\FlutterFirebaseCorePlugin.java:16: error: package io.flutter.embedding.engine.plugins does not exist
[ +271 ms] import io.flutter.embedding.engine.plugins.FlutterPlugin;
[ +290 ms] ^
[ +6 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\FlutterFirebaseCorePlugin.java:26: error: cannot find symbol
[ +180 ms] implements FlutterPlugin,
[ +8 ms] ^
[ +5 ms] symbol: class FlutterPlugin
[ +339 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:9: error: package io.flutter.plugin.common does not exist
[ +23 ms] import io.flutter.plugin.common.BasicMessageChannel;
[ +10 ms] ^
[ +6 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:10: error: package io.flutter.plugin.common does not exist
[ +31 ms] import io.flutter.plugin.common.BinaryMessenger;
[ +22 ms] ^
[ +4 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:11: error: package io.flutter.plugin.common does not exist
[ +7 ms] import io.flutter.plugin.common.MessageCodec;
[ +5 ms] ^
[ +13 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:12: error: package io.flutter.plugin.common does not exist
[ +14 ms] import io.flutter.plugin.common.StandardMessageCodec;
[ +15 ms] ^
[ +6 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\FlutterFirebaseCorePlugin.java:33: error: cannot find symbol
[ +16 ms] public void onAttachedToEngine(FlutterPluginBinding binding) {
[ +12 ms] ^
[ +18 ms] symbol: class FlutterPluginBinding
[ +13 ms] location: class FlutterFirebaseCorePlugin
[ +19 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\FlutterFirebaseCorePlugin.java:40: error: cannot find symbol
[ +67 ms] public void onDetachedFromEngine(#NonNull FlutterPluginBinding binding) {
[ +5 ms] ^
[ +89 ms] symbol: class FlutterPluginBinding
[ +127 ms] location: class FlutterFirebaseCorePlugin
[ +70 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:523: error: cannot find symbol
[ +192 ms] static MessageCodec<Object> getCodec() {
[ +60 ms] ^
[ +79 ms] symbol: class MessageCodec
[ +78 ms] location: interface FirebaseCoreHostApi
[ +5 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:531: error: cannot find symbol
[ +5 ms] static void setup(BinaryMessenger binaryMessenger, FirebaseCoreHostApi api) {
[ +7 ms] ^
[ +8 ms] symbol: class BinaryMessenger
[ +34 ms] location: interface FirebaseCoreHostApi
[ +32 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:664: error: cannot find symbol
[ +8 ms] static MessageCodec<Object> getCodec() {
[ +11 ms] ^
[ +29 ms] symbol: class MessageCodec
[ +12 ms] location: interface FirebaseAppHostApi
[ +5 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:671: error: cannot find symbol
[ +25 ms] static void setup(BinaryMessenger binaryMessenger, FirebaseAppHostApi api) {
[ +31 ms] ^
[ +15 ms] symbol: class BinaryMessenger
[ +19 ms] location: interface FirebaseAppHostApi
[ +28 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:478: error: cannot find symbol
[ +24 ms] private static class FirebaseCoreHostApiCodec extends StandardMessageCodec {
[ +7 ms] ^
[ +14 ms] symbol: class StandardMessageCodec
[ +6 ms] location: class GeneratedAndroidFirebaseCore
[ +3 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:647: error: cannot find symbol
[ +10 ms] private static class FirebaseAppHostApiCodec extends StandardMessageCodec {
[ +28 ms] ^
[ +11 ms] symbol: class StandardMessageCodec
[ +8 ms] location: class GeneratedAndroidFirebaseCore
[ +18 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\FlutterFirebaseCorePlugin.java:32: error: method does not override or implement a method from a supertype
[ +27 ms] #Override
[ +30 ms] ^
[ +30 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\FlutterFirebaseCorePlugin.java:39: error: method does not override or implement a method from a supertype
[ +10 ms] #Override
[ +33 ms] ^
[ +18 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:483: error: method does not override or implement a method from a supertype
[ +15 ms] #Override
[ +26 ms] ^
[ +11 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:487: error: cannot find symbol
[ +8 ms] return PigeonFirebaseOptions.fromMap((Map<String, Object>) readValue(buffer));
[ +8 ms] ^
[ +5 ms] symbol: method readValue(ByteBuffer)
[ +2 ms] location: class FirebaseCoreHostApiCodec
[ +5 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:490: error: cannot find symbol
[ +20 ms] return PigeonInitializeResponse.fromMap((Map<String, Object>) readValue(buffer));
[ +5 ms] ^
[ +4 ms] symbol: method readValue(ByteBuffer)
[ +2 ms] location: class FirebaseCoreHostApiCodec
[ +3 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:493: error: non-static variable super cannot be referenced from a static context
[ +8 ms] return super.readValueOfType(type, buffer);
[ +15 ms] ^
[ +4 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:493: error: cannot find symbol
[ +12 ms] return super.readValueOfType(type, buffer);
[ +4 ms] ^
[ +4 ms] symbol: method readValueOfType(byte,ByteBuffer)
[ +5 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:497: error: method does not override or implement a method from a supertype
[ +5 ms] #Override
[ +4 ms] ^
[ +4 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:506: error: non-static variable super cannot be referenced from a static context
[ +8 ms] super.writeValue(stream, value);
[ +9 ms] ^
[ +5 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:506: error: cannot find symbol
[ +5 ms] super.writeValue(stream, value);
[ +5 ms] ^
[ +2 ms] symbol: method writeValue(ByteArrayOutputStream,Object)
[ +2 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:533: error: cannot find symbol
[ +6 ms] BasicMessageChannel<Object> channel =
[ +6 ms] ^
[ +3 ms] symbol: class BasicMessageChannel
[ +3 ms] location: interface FirebaseCoreHostApi
[ +6 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:534: error: cannot find symbol
[ +6 ms] new BasicMessageChannel<>(
[ +5 ms] ^
[ +4 ms] symbol: class BasicMessageChannel
[ +3 ms] location: interface FirebaseCoreHostApi
[ +2 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:577: error: cannot find symbol
[ +7 ms] BasicMessageChannel<Object> channel =
[ +3 ms] ^
[ +3 ms] symbol: class BasicMessageChannel
[ +5 ms] location: interface FirebaseCoreHostApi
[ +7 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:578: error: cannot find symbol
[ +9 ms] new BasicMessageChannel<>(
[ +8 ms] ^
[ +3 ms] symbol: class BasicMessageChannel
[ +6 ms] location: interface FirebaseCoreHostApi
[ +4 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:611: error: cannot find symbol
[ +7 ms] BasicMessageChannel<Object> channel =
[ +9 ms] ^
[ +6 ms] symbol: class BasicMessageChannel
[ +9 ms] location: interface FirebaseCoreHostApi
[ +6 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:612: error: cannot find symbol
[ +11 ms] new BasicMessageChannel<>(
[ +5 ms] ^
[ +15 ms] symbol: class BasicMessageChannel
[ +6 ms] location: interface FirebaseCoreHostApi
[ +6 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:673: error: cannot find symbol
[ +13 ms] BasicMessageChannel<Object> channel =
[ +6 ms] ^
[ +13 ms] symbol: class BasicMessageChannel
[ +22 ms] location: interface FirebaseAppHostApi
[ +7 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:674: error: cannot find symbol
[ +11 ms] new BasicMessageChannel<>(
[ +7 ms] ^
[ +7 ms] symbol: class BasicMessageChannel
[ +7 ms] location: interface FirebaseAppHostApi
[ +5 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:716: error: cannot find symbol
[ +12 ms] BasicMessageChannel<Object> channel =
[ +16 ms] ^
[ +23 ms] symbol: class BasicMessageChannel
[ +10 ms] location: interface FirebaseAppHostApi
[ +9 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:717: error: cannot find symbol
[ +10 ms] new BasicMessageChannel<>(
[ +29 ms] ^
[ +18 ms] symbol: class BasicMessageChannel
[ +4 ms] location: interface FirebaseAppHostApi
[ +7 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:759: error: cannot find symbol
[ +16 ms] BasicMessageChannel<Object> channel =
[ +26 ms] ^
[ +39 ms] symbol: class BasicMessageChannel
[ +10 ms] location: interface FirebaseAppHostApi
[ +9 ms]
C:\Users\ASUS\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-1.21.1\android\src\main\java\io\flutter\plugins\fireba
se\core\GeneratedAndroidFirebaseCore.java:760: error: cannot find symbol
[ +12 ms] new BasicMessageChannel<>(
[ +11 ms] ^
[ +20 ms] symbol: class BasicMessageChannel
[ +8 ms] location: interface FirebaseAppHostApi
[ +8 ms] 36 errors
[ +25 ms] FAILURE: Build failed with an exception.
[ +13 ms] * What went wrong:
[ +8 ms] Execution failed for task ':firebase_core:compileDebugJavaWithJavac'.
[ +11 ms] > Compilation failed; see the compiler error output for details.
[ +12 ms] * Try:
[ +4 ms] > Run with --stacktrace option to get the stack trace.
[ +3 ms] > Run with --info or --debug option to get more log output.
[ +10 ms] > Run with --scan to get full insights.
[ +5 ms] * Get more help at https://help.gradle.org
[ +8 ms] BUILD FAILED in 25s
[ +20 ms] > Task :firebase_core:compileDebugJavaWithJavac FAILED
[ +3 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[ +7 ms] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own
scripts or plugins.
[ +18 ms] See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings
[ +9 ms] 10 actionable tasks: 1 executed, 9 up-to-date
[ +427 ms] Running Gradle task 'assembleDebug'... (completed in 33.1s)
[+40014 ms] Exception: Gradle task assembleDebug failed with exit code 1
[ +7 ms] "flutter run" took 92,318ms.
[ +15 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:699:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1183:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:94:3)
<asynchronous suspension>
This is flutter doctor log
[√] Flutter (Channel stable, 3.0.5, on Microsoft Windows [Version 10.0.22000.675], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
X cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[!] Visual Studio - develop for Windows (Visual Studio Community 2019 16.10.2)
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop development with C++"
workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.70.2)
[√] Connected device (4 available)
[√] HTTP Host Availability
! Doctor found issues in 2 categories.
pubspec.yaml dependencies:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.4
http: ^0.13.3
intl: ^0.17.0
get: ^4.5.0
shimmer: ^2.0.0
url_launcher: ^6.0.18
auto_size_text: ^3.0.0
shared_preferences: ^2.0.12
sqflite: ^2.0.1
badges: ^2.0.2
share_plus: ^4.0.3
fluttertoast: ^8.0.8
data_connection_checker: ^0.3.4
package_info_plus: ^1.3.0
webview_flutter: ^3.0.0
cached_network_image: ^3.2.0
font_awesome_flutter: ^10.1.0
geolocator: ^8.0.3
google_maps_flutter: ^2.1.1
firebase_messaging: ^13.0.0
firebase_core: ^1.21.1
flutter_local_notifications: ^9.1.5
dio: ^4.0.4
flutter_svg: ^1.0.0
pin_code_fields: ^7.3.0
flutter_easyloading: ^3.0.3
firebase_crashlytics: ^2.8.9
build.gradle file
buildscript {
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
gradlePluginPortal()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.8'
}
}
allprojects {
repositories {
google()
jcenter()
gradlePluginPortal()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
What I tried to do:
flutter clean
flutter pub cache repair
invalidate cashes + restart
change kotlin version
change firebase core, messaging, crashlytics versions
All in vain, and no clue about how to fix
The project was working fine before the upgrade
Any help would be appreciated
I have a mystery padding above the keyboard when TimeDilation > 1.0 and I come to the screen with my keyboard on, from another screen.
Screenshot
The padding seems to be proportional to the time dilation when timeDilation >1.0 and < 3.0. It seems to be constant at the same height for timeDilation values >= 3.0.
If I change the routing so that FirstScreen never gets generated, the bug is avoided. Similarly, the bug can be worked around by forcing a screen redraw.
What is the cause and how do I need to change my code, to fix this bug?
MRTC:
import 'package:flutter/material.dart';
import 'package:flutter/scheduler.dart' show timeDilation;
import 'package:keyboard_actions/keyboard_actions.dart';
void main() async {
// set the system top-level property [timeDilation] to control the animation speed
timeDilation = 3.0;
WidgetsFlutterBinding.ensureInitialized();
runApp(
MyApp(),
);
}
class MyApp extends StatefulWidget {
MyApp({Key? key}) : super(key: key);
#override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
#override
Widget build(BuildContext context) {
return MaterialApp(
initialRoute: '/',
onGenerateRoute: (RouteSettings settings) {
final routes = <String, WidgetBuilder?>{
'/': (_) => FirstScreen(),
'/screen2': (_) => SecondScreen(),
};
final builder = routes[settings.name]!;
return MaterialPageRoute(
builder: builder,
settings: settings,
);
},
);
}
}
// ----------------------------------------------------------
class FirstScreen extends StatefulWidget {
FirstScreen({Key? key}) : super(key: key);
#override
_FirstScreenState createState() => _FirstScreenState();
}
class _FirstScreenState extends State<FirstScreen> {
#override
void initState() {
WidgetsBinding.instance?.addPostFrameCallback((_) {
Navigator.of(context).pushNamed('/screen2');
});
super.initState();
}
#override
Widget build(BuildContext context) {
return Scaffold();
}
}
// ----------------------------------------------------------
class SecondScreen extends StatefulWidget {
#override
_SecondScreenState createState() => _SecondScreenState();
}
class _SecondScreenState extends State<SecondScreen>
with RouteAware, WidgetsBindingObserver {
FocusNode? focusNode;
ValueNotifier<String>? _stringValueNotifier;
#override
void initState() {
super.initState();
WidgetsBinding.instance!.addObserver(this);
this._stringValueNotifier = ValueNotifier<String>('');
this._stringValueNotifier!.addListener(() {});
}
#override
void dispose() {
_stringValueNotifier?.dispose();
WidgetsBinding.instance!.removeObserver(this);
super.dispose();
}
#override
Widget build(BuildContext context) {
this.focusNode = FocusNode();
return Scaffold(
body: KeyboardContent(
focusNode: this.focusNode!,
stringValueNotifier: this._stringValueNotifier!,
),
);
}
}
// ----------------------------------------------------------
class KeyboardContent extends StatelessWidget {
final FocusNode focusNode;
final ValueNotifier<String> stringValueNotifier;
/// A container for an on-screen keyboard
/// The widget automatically gets rebuilt on value change, triggered
/// when a keyboard button is pressed.
KeyboardContent({
required this.focusNode,
required this.stringValueNotifier,
});
KeyboardActionsConfig _buildConfig(BuildContext context) {
List<Widget Function(FocusNode)> toolbarButtons = [];
return KeyboardActionsConfig(
keyboardActionsPlatform: KeyboardActionsPlatform.ALL,
keyboardBarColor: Colors.grey[200]!,
//nextFocus: false,
actions: [
KeyboardActionsItem(
focusNode: focusNode,
displayActionBar: false,
displayDoneButton: false,
toolbarButtons: toolbarButtons,
footerBuilder: (_) => CueKeyboard(),
)
]);
}
#override
Widget build(BuildContext context) {
if (!focusNode.hasPrimaryFocus) focusNode.requestFocus();
return Container(
decoration: BoxDecoration(color: Colors.blue),
child: KeyboardActions(
config: _buildConfig(context),
child: Container(
padding: EdgeInsets.only(left: 15, right: 15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
KeyboardCustomInput<String>(
focusNode: focusNode,
notifier: stringValueNotifier,
builder: (context, keyboardTapVal, hasFocus) {
return Container(
margin: EdgeInsets.only(top: 100),
height: 800,
width: 100,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(32.0),
color: Colors.green));
},
),
],
),
),
),
);
}
}
class CueKeyboard extends StatefulWidget implements PreferredSizeWidget {
static final double _keyboardHeight = 184.0;
CueKeyboard({
Key? key,
}) : super(key: key);
#override
_CueKeyboardState createState() => _CueKeyboardState();
#override
Size get preferredSize => Size.fromHeight(CueKeyboard._keyboardHeight);
}
class _CueKeyboardState extends State<CueKeyboard> {
dispose() {
super.dispose();
}
#override
Widget build(BuildContext context) {
return Wrap(
children: [
Column(
children: [Text("Keyboard")],
),
],
);
}
}
flutter doctor
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.19044.1466], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] VS Code (version 1.63.2)
[√] Connected device (4 available)
• No issues found!
flutter run --verbose
$ flutter run --verbose
[ +53 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +84 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ ] 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[ ] executing: [C:\flutter/] git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[ +24 ms] Exit code 0 from: git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[ ] 2.8.1
[ +6 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic #{u}
[ +15 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic #{u}
[ ] origin/stable
[ ] executing: [C:\flutter/] git ls-remote --get-url origin
[ +11 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +70 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
[ +14 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] stable
[ +47 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.
[ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'WindowsUwpEngineArtifacts' 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.
[ +48 ms] executing: C:\Users\md844\Android\SDK\platform-tools\adb.exe devices -l
[ +40 ms] List of devices attached
emulator-5554 device product:sdk_phone_x86 model:Android_SDK_built_for_x86 device:generic_x86 transport_id:11
[ +6 ms] C:\Users\md844\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell getprop
[ +33 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 'WindowsUwpEngineArtifacts' 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.
[ +66 ms] Skipping pub get: version match.
[ +40 ms] Found plugin integration_test at C:\flutter\packages\integration_test\
[ +82 ms] Found plugin integration_test at C:\flutter\packages\integration_test\
[ +6 ms] Generating C:\Users\md844\source\repos\ucue_keyboard_bug\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +41 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
[ +9 ms] Skipping target: gen_localizations
[ +4 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents:
C:\Users\md844\source\repos\ucue_keyboard_bug\.dart_tool\package_config_subset}
[ +23 ms] Found plugin integration_test at C:\flutter\packages\integration_test\
[ +2 ms] gen_dart_plugin_registrant: Complete
[ +1 ms] Skipping target: _composite
[ +2 ms] complete
[ +4 ms] Launching lib\main.dart on Android SDK built for x86 in debug mode...
[ +3 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\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\md844\AppData\Local\Temp\flutter_tools.f728f2b7\flutter_tool.9d976d\app.dill --packages
C:\Users\md844\source\repos\ucue_keyboard_bug\.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 --enable-experiment=alternative-invalidation-strategy
[ +7 ms] executing: C:\Users\md844\Android\SDK\build-tools\32.0.0\aapt dump xmltree C:\Users\md844\source\repos\ucue_keyboard_bug\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml
[ +8 ms] Exit code 0 from: C:\Users\md844\Android\SDK\build-tools\32.0.0\aapt dump xmltree C:\Users\md844\source\repos\ucue_keyboard_bug\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)="0.0.1" (Raw: "0.0.1")
A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1d
A: android:compileSdkVersionCodename(0x01010573)="10" (Raw: "10")
A: package="uk.co.cuedspeech.ucue.debug" (Raw: "uk.co.cuedspeech.ucue.debug")
A: platformBuildVersionCode=(type 0x10)0x1d
A: platformBuildVersionName=(type 0x10)0xa
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x17
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=22)
A: android:label(0x01010001)="uCUE" (Raw: "uCUE")
A: android:icon(0x01010002)=#0x7f080000
A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw: "io.flutter.app.FlutterApplication")
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:extractNativeLibs(0x010104ea)=(type 0x12)0x0
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
E: activity (line=29)
A: android:theme(0x01010000)=#0x7f0a0000
A: android:name(0x01010003)="uk.co.cuedspeech.ucue.MainActivity" (Raw: "uk.co.cuedspeech.ucue.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=43)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=#0x7f0a0001
E: meta-data (line=53)
A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
A: android:resource(0x01010025)=#0x7f040002
E: intent-filter (line=57)
E: action (line=58)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
E: category (line=60)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
E: meta-data (line=67)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2
[ +8 ms] executing: C:\Users\md844\Android\SDK\platform-tools\adb.exe -s emulator-5554 shell -x logcat -v time -t 1
[ +13 ms] <- compile package:ucue_keyboard_bug/main.dart
[ +55 ms] --------- beginning of main
[...]
[ +49 ms] --------- beginning of main
01-30 13:39:27.586 I/cmd (25596): oneway function results will be dropped but finished with status OK and parcel size 4
[ +6 ms] executing: C:\Users\md844\Android\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
uk.co.cuedspeech.ucue.debug/uk.co.cuedspeech.ucue.MainActivity
[ +34 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=uk.co.cuedspeech.ucue.debug/uk.co.cuedspeech.ucue.MainActivity (has extras) }
[ +1 ms] Waiting for observatory port to be available...
[ +360 ms] W/FlutterActivityAndFragmentDelegate(25618): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration
steps.
[ +21 ms] Observatory URL on device: http://127.0.0.1:39329/Bg_xE12sSvQ=/
[ ] executing: C:\Users\md844\Android\SDK\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:39329
[ +16 ms] 60159
[ ] Forwarded host port 60159 to device port 39329 for Observatory
[ +4 ms] Caching compiled dill
[ +24 ms] Connecting to service protocol: http://127.0.0.1:60159/Bg_xE12sSvQ=/
[ +252 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:60159/Bg_xE12sSvQ=/.
[ +116 ms] DDS is listening at http://127.0.0.1:60162/57G22rjDLdI=/.
[ +43 ms] Successfully connected to service protocol: http://127.0.0.1:60159/Bg_xE12sSvQ=/
[ +56 ms] DevFS: Creating new filesystem on the device (null)
[ +32 ms] DevFS: Created new filesystem on the device (file:///data/user/0/uk.co.cuedspeech.ucue.debug/code_cache/ucue_keyboard_bugULKJZB/ucue_keyboard_bug/)
[ +2 ms] Updating assets
[ +67 ms] Syncing files to device Android SDK built for x86...
[ +1 ms] <- reset
[ ] Compiling dart to kernel with 0 updated files
[ +2 ms] <- recompile package:ucue_keyboard_bug/main.dart 027f4494-050d-4ec8-becc-6f960203b371
[ ] <- 027f4494-050d-4ec8-becc-6f960203b371
[ +114 ms] Updating files.
[ ] DevFS: Sync finished
[ ] Syncing files to device Android SDK built for x86... (completed in 120ms)
[ ] Synced 0.0MB.
[ +1 ms] <- accept
[ +3 ms] Connected to _flutterView/0xe290b860.
[ +2 ms] Flutter run key commands.
[ +1 ms] r Hot reload.
[ ] R Hot restart.
[ ] h List all available interactive commands.
[ ] d Detach (terminate "flutter run" but leave application running).
[ ] c Clear the screen
[ ] q Quit (terminate the application on the device).
[ ] Running with sound null safety
[ ] An Observatory debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:60162/57G22rjDLdI=/
[ +491 ms] I/eech.ucue.debu(25618): Waiting for a blocking GC ProfileSaver
[ +242 ms] The Flutter DevTools debugger and profiler on Android SDK built for x86 is available at: http://127.0.0.1:9101?uri=http://127.0.0.1:60162/57G22rjDLdI=/
pubspec.yaml
name: ucue_keyboard_bug
description: Demo app showing the keyboard bug when time dialation=3
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.0.1+1
environment:
sdk: '>=2.12.0-0 <3.0.0'
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
keyboard_actions: ^3.4.0
pedantic:
uuid: ^3.0.1
# Temporary dependencies
dependency_overrides:
dev_dependencies:
flutter_test:
sdk: flutter
integration_test:
sdk: flutter
analyzer:
strong-mode: true
language:
enableSuperMixins: true
# The following section is specific to Flutter.
flutter:
uses-material-design: true
I built a plugin which uses Dart FFI and a shared lib and published to pub.dev. Whenever I try using the plugin in my app, it always fails with a file not found error and I don't know where the error is coming from.
Error:
[ ] [ ] origin/stable
[ ] [ ] executing: [/home/francis/Development/flutter/] git ls-remote --get-url origin
[ ] [ +10 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] [ ] https://github.com/flutter/flutter.git
[ ] [ +160 ms] executing: [/home/francis/Development/flutter/] git rev-parse --abbrev-ref HEAD
[ ] [ +12 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] [ ] stable
[ ] [ +139 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.
[ ] [ +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' 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.
[ ] [ +212 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.
[ +9 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.
[ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] [ +3 ms] 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.
[ ] [ ] 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.
[ +1 ms] [ +96 ms] Initializing file store
[ ] [ +28 ms] Done initializing file store
[ ] [ +96 ms] Skipping target: gen_localizations
[ ] [ +16 ms] Skipping target: gen_dart_plugin_registrant
[ ] [+1046 ms] Skipping target: unpack_linux
[ ] [ +989 ms] Skipping target: kernel_snapshot
[ ] [ +391 ms] Skipping target: debug_bundle_linux-x64_assets
[ ] [ ] Persisting file store
[ ] [ +19 ms] Done persisting file store
[ ] [ +7 ms] build succeeded.
[ ] [ +11 ms] "flutter assemble" took 2,983ms.
[ ] [ +260 ms] ensureAnalyticsSent: 255ms
[ ] [ +2 ms] Running shutdown hooks
[ ] [ ] Shutdown hooks complete
[ ] [ +1 ms] exiting with code 0
[ +922 ms] [2/5] Building CXX object CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o
[ +1 ms] FAILED: CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o
[ +5 ms] /usr/bin/clang++ -DAPPLICATION_ID=\"com.example.dspace\"
-I/home/francis/AndroidStudioProjects/dspace/linux/flutter/ephemeral
-I/home/francis/AndroidStudioProjects/dspace/linux/flutter/ephemeral/.plugin_symlinks/size/linux/src -isystem
/usr/include/gtk-3.0 -isystem /usr/include/pango-1.0 -isystem /usr/include/glib-2.0 -isystem
/usr/lib/glib-2.0/include -isystem /usr/include/harfbuzz -isystem /usr/include/freetype2 -isystem
/usr/include/libpng16 -isystem /usr/include/libmount -isystem /usr/include/blkid -isystem
/usr/include/fribidi -isystem /usr/include/cairo -isystem /usr/include/lzo -isystem /usr/include/pixman-1
-isystem /usr/include/gdk-pixbuf-2.0 -isystem /usr/include/gio-unix-2.0 -isystem /usr/include/cloudproviders
-isystem /usr/include/atk-1.0 -isystem /usr/include/at-spi2-atk/2.0 -isystem /usr/include/dbus-1.0 -isystem
/usr/lib/dbus-1.0/include -isystem /usr/include/at-spi-2.0 -g -Wall -Werror -pthread -std=gnu++17 -MD -MT
CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o -MF
CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o.d -o
CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o -c
/home/francis/AndroidStudioProjects/dspace/linux/flutter/generated_plugin_registrant.cc
[ +14 ms] /home/francis/AndroidStudioProjects/dspace/linux/flutter/generated_plugin_registrant.cc:9:10:
fatal error: 'size/size_plugin.h' file not found
[ +1 ms] #include <size/size_plugin.h>
[ ] ^~~~~~~~~~~~~~~~~~~~
[ ] 1 error generated.
[ +417 ms] [3/5] Building CXX object CMakeFiles/dspace.dir/my_application.cc.o
[ +2 ms] ninja: build stopped: subcommand failed.
[ +42 ms] Building Linux application... (completed in 6.8s)
[+6533 ms] Exception: Build process failed
[ +4 ms] "flutter run" took 13,967ms.
[ +18 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +260 ms] ensureAnalyticsSent: 254ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
I've modified my cmake file severally to fix this and tried various include methods but to no avail.
Current cmake:
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 17) # Use C++17 lib
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS 1)
#set(CMAKE_BUILD_TYPE RELEASE)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})
project(size_plugin VERSION 1.0.0 LANGUAGES CXX)
set(PLUGIN_NAME "size_plugin")
set(HEADER_FILES "src/size_plugin.h")
set(SOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/size_plugin.cc")
message(${FLUTTER_MANAGED_DIR})
message(${HEADER_FILES} ${CMAKE_SOURCE_DIR})
#add_library(size SHARED src/fsize.cpp)
add_library(${PLUGIN_NAME} SHARED
${HEADER_FILES}
${SOURCE_FILES}
)
apply_standard_settings(${PLUGIN_NAME})
#target_include_directories(${PLUGIN_NAME} INTERFACE ${HEADER_FILES})
target_include_directories(${PLUGIN_NAME} INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(${PLUGIN_NAME} PRIVATE flutter)
target_link_libraries(${PLUGIN_NAME} PRIVATE PkgConfig::GTK)
#add_executable(size_test src/fsize.cpp)
My pubspec
name: size
description: A simple plugin that can display disk size on desktop.
version: 1.0.3
repository: https://github.com/Clashkid155/size
issue_tracker: https://github.com/Clashkid155/size/issues
# homepage: https://www.example.com
environment:
sdk: '>=2.14.3 <3.0.0'
flutter: '>=1.20.0 '
flutter:
plugin:
platforms:
linux:
pluginClass: SizePlugin
windows:
pluginClass: SizePlugin
dependencies:
ffi: ^1.1.2
path: ^1.8.0
Every info provided is from my plugin and not the flutter app am trying to build cause the whole issue started when i add that plugin
I've been using this as reference.
My only option now is to rebuild the plugin using method channel as that was the first iteration of the plugin but i didn't what to depend on flutter and dart FFI was easier with less code needed.
Update:
I've solved the above error by regenerating the plugin as a flutter plugin which added the missing file.
Now I've another build error
[ +71 ms] [4/7] Building CXX object CMakeFiles/dspace.dir/my_application.cc.o
[ +91 ms] [5/7] Linking CXX shared library plugins/size/libsize_plugin.so
[ +255 ms] [6/7] Linking CXX executable intermediates_do_not_run/dspace
[ ] FAILED: intermediates_do_not_run/dspace
[ +2 ms] : && /usr/bin/clang++ -g CMakeFiles/dspace.dir/main.cc.o
CMakeFiles/dspace.dir/my_application.cc.o CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o -o
intermediates_do_not_run/dspace
-Wl,-rpath,/home/francis/AndroidStudioProjects/dspace/build/linux/x64/debug/plugins/size:/home/francis/Androi
dStudioProjects/dspace/linux/flutter/ephemeral: plugins/size/libsize_plugin.so
/home/francis/AndroidStudioProjects/dspace/linux/flutter/ephemeral/libflutter_linux_gtk.so
/usr/lib/libgtk-3.so /usr/lib/libgdk-3.so /usr/lib/libz.so /usr/lib/libpangocairo-1.0.so
/usr/lib/libpango-1.0.so /usr/lib/libharfbuzz.so /usr/lib/libatk-1.0.so /usr/lib/libcairo-gobject.so
/usr/lib/libcairo.so /usr/lib/libgdk_pixbuf-2.0.so /usr/lib/libgio-2.0.so /usr/lib/libgobject-2.0.so
/usr/lib/libglib-2.0.so && :
[ +1 ms] /usr/bin/ld: CMakeFiles/dspace.dir/flutter/generated_plugin_registrant.cc.o: in function
`fl_register_plugins(_FlPluginRegistry*)':
[ ] /home/francis/AndroidStudioProjects/dspace/linux/flutter/generated_plugin_registrant.cc:14:
undefined reference to `size_plugin_register_with_registrar'
[ +1 ms] clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
[ +4 ms] ninja: build stopped: subcommand failed.
[ +26 ms] Building Linux application... (completed in 26.1s)
[ +1 ms] Exception: Build process failed
[ +2 ms] "flutter run" took 26,807ms.
[ +6 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure>
(package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand
(package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +257 ms] ensureAnalyticsSent: 253ms
[ +2 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
Content of generated_plugin_registrant.cc
//
// Generated file. Do not edit.
//
// clang-format off
#include "generated_plugin_registrant.h"
#include <size/size_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) size_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "SizePlugin");
size_plugin_register_with_registrar(size_registrar);
}
Content of size_plugin.h
#ifndef FLUTTER_PLUGIN_SIZE_PLUGIN_H_
#define FLUTTER_PLUGIN_SIZE_PLUGIN_H_
#include <flutter_linux/flutter_linux.h>
G_BEGIN_DECLS
#ifdef FLUTTER_PLUGIN_IMPL
#define FLUTTER_PLUGIN_EXPORT __attribute__((visibility("default")))
#else
#define FLUTTER_PLUGIN_EXPORT
#endif
typedef struct _SizePlugin SizePlugin;
typedef struct {
GObjectClass parent_class;
} SizePluginClass;
FLUTTER_PLUGIN_EXPORT GType size_plugin_get_type();
FLUTTER_PLUGIN_EXPORT void size_plugin_register_with_registrar(
FlPluginRegistrar* registrar);
G_END_DECLS
#endif // FLUTTER_PLUGIN_SIZE_PLUGIN_H_
Content of generated_plugin_registrant.h
//
// Generated file. Do not edit.
//
// clang-format off
#ifndef GENERATED_PLUGIN_REGISTRANT_
#define GENERATED_PLUGIN_REGISTRANT_
#include <flutter_linux/flutter_linux.h>
// Registers Flutter plugins.
void fl_register_plugins(FlPluginRegistry* registry);
#endif // GENERATED_PLUGIN_REGISTRANT_
Flutter plugins follow a very specific format, and the tooling requires core elements of that format to exist. That includes the public header file with the correct path, as you have discovered, and also the plugin registration, which is the second issues you have (it sounds like you have restored the declaration, but not the implementation).
If your goal is to build your own FFI library code by piggy-backing on the plugin template, you need to leave those core elements in place. Your registration method doesn't need to do anything, but it must exist because the flutter tool will generate a call to it.
It's likely that in the future there will be tooling support for FFI-specific builds, but until then you need to make your library follow the required elements of the plugin structure.
I create a demo app in flutter , trying to run app after built on Android device, APK can't be installed, Android device gave (unfortunately , demo has stopped.)
Flutter 2.0.6 • channel stable
Flutter doctor • No issues found!
flutter run -v
- [ +112 ms] E/AndroidRuntime(26009): FATAL EXCEPTION: main
[ +2 ms] E/AndroidRuntime(26009): Process: com.example.demo, PID: 26009
[ +2 ms] E/AndroidRuntime(26009): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.demo/com.example.demo.MainActivity}:
android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID #0x7f040000
[ +3 ms] E/AndroidRuntime(26009): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2656)
[ +3 ms] E/AndroidRuntime(26009): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2721)
[ +1 ms] E/AndroidRuntime(26009): at android.app.ActivityThread.access$900(ActivityThread.java:168)
[ +1 ms] E/AndroidRuntime(26009): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1393)
[ +1 ms] E/AndroidRuntime(26009): at android.os.Handler.dispatchMessage(Handler.java:102)
[ +1 ms] E/AndroidRuntime(26009): at android.os.Looper.loop(Looper.java:135)
[ +1 ms] E/AndroidRuntime(26009): at android.app.ActivityThread.main(ActivityThread.java:5753)
[ +1 ms] E/AndroidRuntime(26009): at java.lang.reflect.Method.invoke(Native Method)
[ +7 ms] E/AndroidRuntime(26009): at java.lang.reflect.Method.invoke(Method.java:372)
[ +1 ms] E/AndroidRuntime(26009): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
[ +1 ms] E/AndroidRuntime(26009): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
[ +1 ms] E/AndroidRuntime(26009): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v21/launch_background.xml from drawable resource ID
#0x7f040000
[ +1 ms] E/AndroidRuntime(26009): at android.content.res.Resources.loadDrawableForCookie(Resources.java:2890)
[ +1 ms] E/AndroidRuntime(26009): at android.content.res.Resources.loadDrawable(Resources.java:2765)
[ +4 ms] E/AndroidRuntime(26009): at android.content.res.Resources.getDrawable(Resources.java:1012)
[ +5 ms] E/AndroidRuntime(26009): at android.content.res.Resources.getDrawable(Resources.java:978)
[ +2 ms] E/AndroidRuntime(26009): at io.flutter.embedding.android.FlutterActivity.getSplashScreenFromManifest(FlutterActivity.java:493)
[ +1 ms] E/AndroidRuntime(26009): at io.flutter.embedding.android.FlutterActivity.provideSplashScreen(FlutterActivity.java:469)
[ +1 ms] E/AndroidRuntime(26009): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onCreateView(FlutterActivityAndFragmentDelegate.java:301)
[ +4 ms] E/AndroidRuntime(26009): at io.flutter.embedding.android.FlutterActivity.createFlutterView(FlutterActivity.java:518)
[ +1 ms] E/AndroidRuntime(26009): at io.flutter.embedding.android.FlutterActivity.onCreate(FlutterActivity.java:415)
[ +2 ms] E/AndroidRuntime(26009): at android.app.Activity.performCreate(Activity.java:6112)
[ +2 ms] E/AndroidRuntime(26009): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117)
[ +1 ms] E/AndroidRuntime(26009): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2609)
[ +2 ms] E/AndroidRuntime(26009): ... 10 more
[ +1 ms] E/AndroidRuntime(26009): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #4: <item> tag requires a 'drawable' attribute or child tag
defining a drawable
[ +6 ms] E/AndroidRuntime(26009): at android.graphics.drawable.LayerDrawable.inflateLayers(LayerDrawable.java:202)
[ +1 ms] E/AndroidRuntime(26009): at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:147)
[ +1 ms] E/AndroidRuntime(26009): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:1095)
[ +1 ms] E/AndroidRuntime(26009): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:1017)
[ +1 ms] E/AndroidRuntime(26009): at android.content.res.Resources.loadDrawableForCookie(Resources.java:2880)
[ +1 ms] E/AndroidRuntime(26009): ... 21 more
....
[ +11 ms] Installing build\app\outputs\flutter-apk\app.apk...
[ +4 ms] executing: C:\Users\Adi KANSO\AppData\Local\Android\sdk\platform-tools\adb.exe -s ea88b045 install -t -r C:\demo\build\app\outputs\flutter-apk\app.apk
[+35426 ms] Performing Push Install
C:\demo\build\app\outputs\flutter-apk\app.apk: 1 file pushed, 0 skipped. 5.5 MB/s (50970196 bytes in 8.905s)
pkg: /data/local/tmp/app.apk
Success
[ +4 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 35.4s)
[ +6 ms] executing: C:\Users\Adi KANSO\AppData\Local\Android\sdk\platform-tools\adb.exe -s ea88b045 shell echo -n 224dbc5d94c46ece2ee3d1ef273b59c4eac1c401 >
/data/local/tmp/sky.com.example.demo.sha1
[ +67 ms] executing: C:\Users\Adi KANSO\AppData\Local\Android\sdk\platform-tools\adb.exe -s ea88b045 shell -x logcat -v time -t 1
[ +153 ms] --------- beginning of main
05-10 17:45:05.756 E/lights ( 995): write_int failed to open -1
[ +23 ms] executing: C:\Users\Adi KANSO\AppData\Local\Android\sdk\platform-tools\adb.exe -s ea88b045 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.demo/com.example.demo.MainActivity
[+1390 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.demo/.MainActivity (has extras) }
[ +6 ms] Waiting for observatory port to be available...
[ +19 ms] Observatory URL on device: http://127.0.0.1:34736/hleZMml4hFQ=/
[ +4 ms] executing: C:\Users\Adi KANSO\AppData\Local\Android\sdk\platform-tools\adb.exe -s ea88b045 forward tcp:0 tcp:34736
[ +48 ms] 60889
[ +1 ms] Forwarded host port 60889 to device port 34736 for Observatory
[ +10 ms] Caching compiled dill
[ +44 ms] Connecting to service protocol: http://127.0.0.1:60889/hleZMml4hFQ=/
[ +18 ms] Fail to connect to service protocol: http://127.0.0.1:60889/hleZMml4hFQ=/: HttpException: Connection closed before full header was received, uri =
http://127.0.0.1:60889/hleZMml4hFQ=/ws
[+1407 ms] Error connecting to the service protocol: failed to connect to http://127.0.0.1:60889/hleZMml4hFQ=/
please any help!!
Pls uncomment following in manifest file
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="#drawable/launch_background" />
i download a new project using "flutter create" command, but when i run the flutter run command , it never finished and gets stuck . Below is the log:
PS C:\Users\Tufail\Documents\myflutterprojects\myapp> flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [√]
Flutter (Channel stable, 1.20.2, on Microsoft Windows [Version
10.0.17134.1667], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK
version 30.0.2) [√] Android Studio (version 4.0) [√] VS Code (version
1.48.1) [√] Connected device (1 available)
• No issues found!
PS C:\Users\Tufail\Documents\myflutterprojects\myapp> flutter run -v [
+130 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H [ +72 ms] Exit code 0 from: git -c
log.showSignature=false log -n 1 --pretty=format:%H [ ]
bbfbf1770cca2da7c82e887e4e4af910034800b6 [ +1 ms] executing:
[C:\src\flutter/] git tag --contains HEAD [ +271 ms] Exit code 0 from:
git tag --contains HEAD [ ] 1.20.2 [ +12 ms] executing:
[C:\src\flutter/] git rev-parse --abbrev-ref --symbolic #{u} [ +42
ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic #{u} [
] origin/stable [ ] executing: [C:\src\flutter/] git ls-remote
--get-url origin [ +40 ms] Exit code 0 from: git ls-remote --get-url origin [ +1 ms] https://github.com/flutter/flutter.git [ +87 ms]
executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD [ +43
ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ]
stable [ +56 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. [ +23
ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe
devices -l [ +68 ms] List of devices attached
7f287a21 device product:beryllium model:POCO_F1 device:beryllium transport_id:1 [ +9 ms]
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell getprop [ +117 ms] Artifact Instance of
'AndroidMavenArtifacts' is not required, skipping update. [ +7 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.
[ +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. [ +251
ms] Generating
C:\Users\Tufail\Documents\myflutterprojects\myapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[ +63 ms] ro.hardware = qcom [ +72 ms] Starting incremental build...
[ +3 ms] Initializing file store [ +20 ms] Skipping target:
gen_localizations [ +23 ms] complete [ +5 ms] Launching
lib\main.dart on POCO F1 in debug mode... [ +7 ms]
C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot
--sdk-root C:\src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/
--incremental --target=flutter --debugger-module-names
-Ddart.developer.causal_async_stacks=true --output-dill C:\Users\Tufail\AppData\Local\Temp\flutter_tools.d3293e14\flutter_tool.795dece2\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 [
+19 ms] executing: C:\Users\Tufail\AppData\Local\Android\sdk\build-tools\30.0.2\aapt dump
xmltree
C:\Users\Tufail\Documents\myflutterprojects\myapp\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml [ +79 ms] Exit code 0 from:
C:\Users\Tufail\AppData\Local\Android\sdk\build-tools\30.0.2\aapt dump
xmltree
C:\Users\Tufail\Documents\myflutterprojects\myapp\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml [ +1 ms] 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)0x1c
A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
A: package="com.example.myapp" (Raw: "com.example.myapp")
A: platformBuildVersionCode=(type 0x10)0x1c
A: platformBuildVersionName=(type 0x10)0x9
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
E: uses-permission (line=14)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw:
"android.permission.INTERNET")
E: application (line=22)
A: android:label(0x01010001)="myapp" (Raw: "myapp")
A: android:icon(0x01010002)=#0x7f080000
A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw:
"io.flutter.app.FlutterApplication")
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory"
(Raw:
"androidx.core.app.CoreComponentFactory")
E: activity (line=28)
A: android:theme(0x01010000)=#0x7f0a0000
A: android:name(0x01010003)="com.example.myapp.MainActivity" (Raw:
"com.example.myapp.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=42)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme"
(Raw:
"io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=#0x7f0a0001
E: meta-data (line=52)
A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable"
(Raw:
"io.flutter.embedding.android.SplashScreenDrawable")
A: android:resource(0x01010025)=#0x7f040000
E: intent-filter (line=56)
E: action (line=57)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw:
"android.intent.action.MAIN")
E: category (line=59)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
"android.intent.category.LAUNCHER")
E: meta-data (line=66)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2 [ +8 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell -x logcat -v time -t 1 [ +279 ms] Exit code 0 from:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell -x logcat -v time-t 1 [ ] --------- beginning of
main
08-25 09:34:24.574 D/MiuiFastConnectService(18094): handleMessage: what: 9, msg.arg1: 0, msg.arg2: 0 [ +1 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell -x logcat -v time -t 1 [ +274 ms] Exit code 0 from:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell -x logcat -v time-t 1 [ +1 ms] --------- beginning of
main
08-25 09:34:25.056 D/NetworkController.MobileSignalController(2)( 2345): 4G level = 4 [
+15 ms] <- compile package:myapp/main.dart [ +16 ms] executing: C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe
version [ +80 ms] Android Debug Bridge version 1.0.41
Version 30.0.4-6686687
Installed as C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe [
+2 ms] executing: C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe
start-server [ +50 ms] Building APK [ +27 ms] Running Gradle task
'assembleDebug'... [ +3 ms] gradle.properties already sets
android.enableR8 [ +7 ms] Using gradle from
C:\Users\Tufail\Documents\myflutterprojects\myapp\android\gradlew.bat.
[ +2 ms]
C:\Users\Tufail\Documents\myflutterprojects\myapp\android\gradlew.bat
mode: 33279 rwxrwxrwx. [ +12 ms] executing: C:\Program
Files\Android\Android Studio\jre\bin\java -version [ +389 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) [ +4 ms] executing: [C:\Users\Tufail\Documents\myflutterprojects\myapp\android/]
C:\Users\Tufail\Documents\myflutterprojects\myapp\android\gradlew.bat
-Pverbose=true -Ptarget-platform=android-arm64
-Ptarget=C:\Users\Tufail\Documents\myflutterprojects\myapp\lib\main.dart
-Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root assembleDebug [+4085 ms] > Task :app:compileFlutterBuildDebug UP-TO-DATE [ +1 ms] > Task
:app:packLibsflutterBuildDebug UP-TO-DATE [ +1 ms] > Task
:app:preBuild UP-TO-DATE [ ] > Task :app:preDebugBuild
UP-TO-DATE [ ] > Task :app:compileDebugAidl NO-SOURCE [ +189
ms] > Task :app:checkDebugManifest UP-TO-DATE [ +5 ms] > Task
:app:generateDebugBuildConfig UP-TO-DATE [ ] > Task
:app:compileDebugRenderscript NO-SOURCE [ +87 ms] > Task
:app:cleanMergeDebugAssets [ +1 ms] > Task :app:mergeDebugShaders
UP-TO-DATE [ ] > Task :app:compileDebugShaders UP-TO-DATE [
] > Task :app:generateDebugAssets UP-TO-DATE [ ] > Task
:app:mergeDebugAssets [+1695 ms] > Task :app:copyFlutterAssetsDebug [
+1 ms] > Task :app:mainApkListPersistenceDebug UP-TO-DATE [ +1 ms] > Task :app:generateDebugResValues UP-TO-DATE [ ] > Task
:app:generateDebugResources UP-TO-DATE [ +97 ms] > Task
:app:mergeDebugResources UP-TO-DATE [ +99 ms] > Task
:app:createDebugCompatibleScreenManifests UP-TO-DATE [ ] > Task
:app:processDebugManifest UP-TO-DATE [ ] > Task
:app:processDebugResources UP-TO-DATE [ ] > Task
:app:compileDebugKotlin UP-TO-DATE [ ] > Task
:app:javaPreCompileDebug UP-TO-DATE [ +96 ms] > Task
:app:compileDebugJavaWithJavac UP-TO-DATE [ ] > Task
:app:compileDebugSources UP-TO-DATE [ +101 ms] > Task
:app:processDebugJavaRes NO-SOURCE [ +1 ms] > Task
:app:mergeDebugJavaResource UP-TO-DATE [ ] > Task
:app:checkDebugDuplicateClasses UP-TO-DATE [ +197 ms] > Task
:app:desugarDebugFileDependencies UP-TO-DATE [ +398 ms] > Task
:app:transformClassesWithDexBuilderForDebug UP-TO-DATE [ +1 ms] >
Task :app:mergeExtDexDebug UP-TO-DATE [ ] > Task
:app:mergeDexDebug UP-TO-DATE [ ] > Task
:app:validateSigningDebug UP-TO-DATE [ ] > Task
:app:signingConfigWriterDebug UP-TO-DATE [ ] > Task
:app:mergeDebugJniLibFolders UP-TO-DATE [ +95 ms] > Task
:app:mergeDebugNativeLibs UP-TO-DATE [ +1 ms] > Task
:app:stripDebugDebugSymbols UP-TO-DATE [ ] Compatible side by
side NDK version was not found. [ +1 ms] > Task :app:packageDebug
UP-TO-DATE [+1197 ms] > Task :app:assembleDebug [ +1 ms] BUILD
SUCCESSFUL in 8s [ +1 ms] 31 actionable tasks: 4 executed, 27
up-to-date [ +512 ms] Running Gradle task 'assembleDebug'...
(completed in 9.3s) [ +60 ms] calculateSha: LocalDirectory:
'C:\Users\Tufail\Documents\myflutterprojects\myapp\build\app\outputs\flutter-apk'/app.apk
[ +82 ms] calculateSha: reading file took 81us [ +679 ms]
calculateSha: computing sha took 679us [ +180 ms] ✓ Built
build\app\outputs\flutter-apk\app-debug.apk. [ +78 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\build-tools\30.0.2\aapt dump
xmltree
C:\Users\Tufail\Documents\myflutterprojects\myapp\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml [ +22 ms] Exit code 0 from:
C:\Users\Tufail\AppData\Local\Android\sdk\build-tools\30.0.2\aapt dump
xmltree
C:\Users\Tufail\Documents\myflutterprojects\myapp\build\app\outputs\flutter-apk\app.apk
AndroidManifest.xml [ +1 ms] 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)0x1c
A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
A: package="com.example.myapp" (Raw: "com.example.myapp")
A: platformBuildVersionCode=(type 0x10)0x1c
A: platformBuildVersionName=(type 0x10)0x9
E: uses-sdk (line=7)
A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
E: uses-permission (line=14)
A: android:name(0x01010003)="android.permission.INTERNET" (Raw:
"android.permission.INTERNET")
E: application (line=22)
A: android:label(0x01010001)="myapp" (Raw: "myapp")
A: android:icon(0x01010002)=#0x7f080000
A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw:
"io.flutter.app.FlutterApplication")
A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory"
(Raw:
"androidx.core.app.CoreComponentFactory")
E: activity (line=28)
A: android:theme(0x01010000)=#0x7f0a0000
A: android:name(0x01010003)="com.example.myapp.MainActivity" (Raw:
"com.example.myapp.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=42)
A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme"
(Raw:
"io.flutter.embedding.android.NormalTheme")
A: android:resource(0x01010025)=#0x7f0a0001
E: meta-data (line=52)
A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable"
(Raw:
"io.flutter.embedding.android.SplashScreenDrawable")
A: android:resource(0x01010025)=#0x7f040000
E: intent-filter (line=56)
E: action (line=57)
A: android:name(0x01010003)="android.intent.action.MAIN" (Raw:
"android.intent.action.MAIN")
E: category (line=59)
A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
"android.intent.category.LAUNCHER")
E: meta-data (line=66)
A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
A: android:value(0x01010024)=(type 0x10)0x2 [ +2 ms] Stopping app 'app.apk' on POCO F1. [ +1 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell am force-stop com.example.myapp [ +161 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell pm list packages com.example.myapp [ +105 ms]
package:com.example.myapp [ +225 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 shell cat /data/local/tmp/sky.com.example.myapp.sha1 [ +86
ms] 8d52b697e19d3cbeb0dc056848c3bb54663b3b70 [ +1 ms] Latest build
already installed. [ ] POCO F1 startApp [ +3 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 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.myapp/com.example.myapp.MainActivity [ +113 ms] Starting:
Intent { act=android.intent.action.RUN flg=0x20000000
cmp=com.example.myapp/.MainActivity (has extras) } [ +1 ms] Waiting
for observatory port to be available... [ +628 ms] Observatory URL on
device: http://127.0.0.1:37417/9Qbx9A-mVyg=/ [ +2 ms] executing:
C:\Users\Tufail\AppData\Local\Android\sdk\platform-tools\adb.exe -s
7f287a21 forward tcp:0 tcp:37417 [ +30 ms] 60549 [ ] Forwarded
host port 60549 to device port 37417 for Observatory [ +7 ms]
Caching compiled dill [ +31 ms] Connecting to service protocol: http://127.0.0.1:60549/9Qbx9A-mVyg=/
Looks like problems in starting your virtual device. Are your virtual device working? Also check that ports not blocked by antivirus or windows defender.