0

I connected physical android device via USB to my computer(windows) and I try to debug flutter project on it. The project was just created by command on terminal of VScode. flutter create my_mobile_app and when I push debug/run button, it returns like this and crash.

Launching lib\main.dart on SM J727S in debug mode...
main.dart:1
����: �⺻ Ŭ���� org.gradle.wrapper.GradleWrapperMain��(��) ã�ų� �ε��� �� �����ϴ�.
����: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

How can I run/debug the program I made on my physical device? is it related with java? should I install or reinstall smth? The device i'm using is samsung sm-j727s

I tried reconnecting the device from computer and run on android studio but it doesn't make any changes, the divice is visible in the Device manager of android studio and flutter doctor shows every components are green.

1 Answers1

0

Are you try run your project on simulator devices yet?. It makes the same error or not ? Are you design any widgets on screen or just a blank screen ? You can give it a shot to run some commands below a re-run your project $flutter analyze $flutter pub get $flutter pub upgrade

TheZero
  • 260
  • 2
  • 4
  • 13
  • I just tried to run on virtual emulator but it makes the exact same error message. and it works perfectly fine on chrome or desktop app. I'm sure it's problem of SDK or java – Hyoseo Lee Feb 16 '23 at 23:04
  • Be honest, I'm still not sure what happened in your code. But you can try that https://stackoverflow.com/a/29806323/5605881. P.s: I suggest use Android Studio for development flutter application. It supports flutter developer better and take care junk bugs – TheZero Feb 17 '23 at 02:12