Repository navigation
Description
Steps to Reproduce
I change hello_service project buildMode to debug mode but it cannot start.
Flutter Doctor
[✓] Flutter (on Mac OS, channel master)
• Flutter at /Users/paul/flutter-workspace/flutter
• Framework revision 9c0c022 (24 hours ago), engine revision bb98655
[✓] Android toolchain - develop for Android devices (Android SDK 23.0.2)
• Android SDK at /Users/paul/Library/Android/sdk
• Platform android-23, build-tools 23.0.2
• Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
[✓] iOS toolchain - develop for iOS devices (Xcode 7.0.1)
• XCode at /Applications/Xcode.app/Contents/Developer
• Xcode 7.0.1, Build version 7A1001
x ideviceinstaller not available; this is used to discover connected iOS devices.
Install via 'brew install ideviceinstaller'.
x ios-deploy not available; this is used to deploy to connected iOS devices.
Install via 'brew install ios-deploy'.
[✓] Atom - a lightweight development environment for Flutter
• flutter plugin version 0.2.3
• dartlang plugin version 0.6.28
Logs and Crash Reports
E/System: Uncaught exception thrown by finalizer
E/System: java.lang.IllegalStateException: Warning: Router objects should be explicitly closed when no longer required otherwise you may leak handles.
at org.chromium.mojo.bindings.AutoCloseableRouter.finalize(AutoCloseableRouter.java:113)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:194)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:177)
at java.lang.Thread.run(Thread.java:818)
I/cr.library_loader: Time to load native libraries: 21 ms (timestamps 7870-7891)
I/cr.library_loader: Expected native library version number "", actual native library version number ""
E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
W/art: Attempt to remove local handle scope entry from IRT, ignoring
I/OpenGLRenderer: Initialized EGL, version 1.4
I/flutter: Observatory listening on http://127.0.0.1:34821
E/flutter: [ERROR:dart_error.cc(17)] Unhandled exception:
No top-level getter 'main' declared.
NoSuchMethodError: method not found: 'main'
Receiver: top-level
Arguments: [...]
#0 NoSuchMethodError._throwNew (dart:core-patch/errors_patch.dart:178)
#1 _getMainClosure (file:///b/build/slave/Linux_Engine/build/src/out/android_debug/gen/sky/bindings/dart_ui/natives.dart:38)
I/flutter: Diagnostic server listening on http://127.0.0.1:37671
W/ActivityThread: Application com.example.flutter is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
I/art: Debugger is active
I/System.out: Debugger has connected
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8605', transport: 'socket'
I/System.out: waiting for debugger to settle...
Activity
abarth commentedon Jun 26, 2016
Interesting. Does it work if you do a clean build?
tain335 commentedon Jun 26, 2016
Oh, I clean the project and it work.But it still has error log:
)
I/cr.library_loader: Time to load native libraries: 35 ms (timestamps 5381-5416)
I/cr.library_loader: Expected native library version number "", actual native library version number ""
E/ApkAssets: Error while loading asset assets/icudtl.dat: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
W/art: Attempt to remove local handle scope entry from IRT, ignoring
I/OpenGLRenderer: Initialized EGL, version 1.4
E/flutter: [ERROR:dart_error.cc(17)] Unhandled exception:
No top-level getter 'main' declared.
Can resolve it?
abarth commentedon Jun 26, 2016
When you say "it works" do you mean that the project builds cleanly or that the app runs properly? The error in the log usually means that the app doesn't run properly. If the app is running properly, perhaps the error is left over in the log from a previous run.
tain335 commentedon Jun 26, 2016
Sorry, I didn't clean the log.
eseidelGoogle commentedon Jun 27, 2016
Is this something our gradel plugin could/should detect or help Android
Studio to detect and cause a rebuild?
On Sat, Jun 25, 2016 at 10:31 PM, tain335 [email protected] wrote:
abarth commentedon Jun 27, 2016
Yes, the gradle build is missing a dependency somewhere.
[-]FlutterView buildMode debug not work[/-][+]Gradle build doesn't notice when you switch buildMode[/+]abarth commentedon Aug 12, 2016
@tvolkert saw something similar today.
Hixie commentedon Nov 1, 2017
It's not clear what this is referring to.
Roll engine to 9a98143.
Roll engine to b6df7a6.
Roll engine to b6df7a6. (#15444)
[async] Update includes of async headers to new path (flutter#4760)
Roll engine to b6df7a6. (flutter#15444)
github-actions commentedon Sep 4, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.