I'm starting developing mobile using flutter on vscode IDE. I was debbuging the app using a samsung device, everything was ok, but I tryed debug the app using a xiaomi device, however this time i've got an error
Launching lib/main.dart on 166216e0 in debug mode...
Built build/app/outputs/flutter-apk/app-debug.apk.
adb: insufficient permissions for device: missing udev rules? user is in the plugdev group
See [http://developer.android.com/tools/device.html] for more information
Error: ADB exited with exit code 1
adb: insufficient permissions for device: missing udev rules? user is in the plugdev group
See [http://developer.android.com/tools/device.html] for more information
Error launching application on 166216e0.
Exited (sigterm)
There's a difference of android version. Samsung is android 11 and xiaomi is a MIUI Global 12.0.4 android 10.
apart from having usb debug enabled, i've enabled the option to install via usb and usb debugging.
I don't know how to solve this. Any suggestion?
I've updated SDK Manager adding android 10
after that i runned
flutter doctor --android-licenses
but I still not working
Related
So, I have connected to my phone using the adb connect command and now everything is going fine. Only issue is after a successful connection and the assembleDebug process the flutter run just get stuck. It's like the debugger is not able to start for some reason. Did anyone face an issue like this ?
System Info:
Flutter SDK Version: Flutter 3.0.2
Device Model: Samsung Galaxy M31
CPU Architecture: Android ARM64
Android Version: Android 12
If yes, I would like to know how you made your way around it. Any help is appreciated ! Thanks in advance.
Could Not Find C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\AdbWinApi.dll.dat
The directory name is invalid.
W/FlutterActivityAndFragmentDelegate( 9139): A splash screen was provided to Flutter, but this is deprecated. See flutter.dev/go/android-splash-migration for migration steps.
Error waiting for a debug connection: ProcessException: adb returned error:
The directory name is invalid.
Could Not Find C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\AdbWinApi.dll.dat
Command: C:\Users\Mohammed\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0 tcp:42601
Error launching application on Android SDK built for x86.
Exited (sigterm)
I solved this issue by the following 3 steps:
1 remove the sdk and emulator.
2 install again the sdk and emulator.
3 restart my computer
and then then solved it
I am facing a difficult problem now. Right now I can't do a flutter debug on my real Vivo-v2020 phone device. I've tried everything possible, but I still get this error and can't debug. However, the installed app works properly.
In my device everything is okay, Developer Mode ON, USB Debugging mode also ON
Any solution to this? Please help me... This is very important for me.
log:
Launching lib\main.dart on V2022 in debug mode...
Running Gradle task 'assembleDebug'...
Parameter format not correct -
√ Built build\app\outputs\flutter-apk\app-debug.apk.
Installing build\app\outputs\flutter-apk\app.apk...
I/flutter ( 4243): Observatory listening on ************************************
Actullay i faced this issue in my realme mobiles and vivo mobiles
The way i found to get out of it is.Uninstalling the debugging application using adb command-it remove application from all users and it works fine again
command: adb uninstall com.example.packagename
replace it with our package name
update to android 12 there must be resolved
I also had this problem with my vivo-v2025. But I solved the issue by following a simple step.
First, you just run the app on your phone using debug mode as usual.
Then you will see an error as shown below:
" Launching lib/main.dart on V2025 in debug mode...
✓ Built build/app/outputs/flutter-apk/app-debug.apk.
I/flutter (22675): Observatory listening on***************** "
After this, you just TERMINATE the program and start a fresh new run. The app will open. It worked in my case.
Posting an output image here .
vivo now runs flutter, update to the latest may 1st 2022 patch. You need to upgrade your device by accepting the latest update.
Is it possible to start emulator in such a way flutter doctor detects it and flutter run should able to deploy to flutter code ?
I tried emulator -avd *image name* but flutter doctor fails to detect running emulator and flutter run does not deploys code on emulator.
In notepad type the following and save it as "file_name.bat" and run it:
SET builddir=%~dp0
SET EX="C:\Users\user_name\AppData\Local\Android\Sdk\emulator\emulator.exe"
CALL %EX% -avd emu_name -partition-size 512 -feature WindowsHypervisorPlatform
pause
emu_name is the name of your emulator.
first you must change directory of your command line to ${android_SDK_DIR}\emulator
most of the time its in c:\users\${yourUserName}\AppData\Local\Android\SDK\
and run emulator -list-avds and it show you your emulator that you create before in android studio then just run emulator #${your emulator name that shows on the list} for example emulator #Nexus6_API_27
remember that maybe your android sdk folder directory was change on install SDK and if you don't create emulator in android studio before , the list will be empty so before you run command you must create AVD in your android studio
It looks like an adb issue, not of the Flutter doctor issue. Because if adb is running perfectly then it would show you a list of devices from android studio or from flutter devices or by running a adb devices command.
You can try restarting adb using commands:
adb kill-server and
then adb start-server
I think the easiest method I found is you just go to cmd
flutter emulator -- launch <emulator id
it will run and will be detected by your intelli j
I have to get an answer in here somehow, even if it's to offer that the command may also be plural. Yes, indeed, you can run "flutter emulators" from your flutter\bin directory (if you haven't added to system PATH yet) and voila...
PS C:> flutter emulators 1 available emulator:
Pixel_2_API_28 • pixel_2 • Google • Pixel 2 API 28
To run an emulator, run 'flutter emulators --launch '. To
create a new emulator, run 'flutter emulators --create [--name xyz]'.
You can find more information on managing emulators at the links
below: https://developer.android.com/studio/run/managing-avds
https://developer.android.com/studio/command-line/avdmanager
On Win10, I have the following installed:
Appcelerator Studio
Appcelerator CLI
Android SDK (ADB enabled)
Genymotion (free / private license)
I'm using regular Windows Command Prompt to interact with Appcelerator, trying to run a project via a Genymotion emulator (it's the Appcelerator RSS Reader demo project). I've gotten it to the point where appc run --platform android will spin up Genymotion and start the appropriate emulator (the only device available according to the Android SDK Virtual Device Manager).
However, as soon as the emulator is ready, Appc tries to install the apk, and fails with this message:
[INFO] Making sure the adb server is running
[INFO] Installing apk: C:\Users\USERNAME\Documents\Appcelerator_Studio_Workspace\Rss Reader\build\android\bin\RSS Reader.apk
[ERROR] Failed to install apk on "192.168.128.101:5555"
[ERROR] Error: device not found
If Appc can find the appropriate emulator to start it up, why does installation fail with "device not found"?
If I immediately open a new console and check the adb connections, I see the specified device as connected:
>C:\Users\USERNAME\AppData\Local\Android\sdk\platform-tools>adb devices<br />
List of devices attached
192.168.128.101:5555 device
I have tried the following to troubleshoot:
Made sure SDK and ADB paths were correct
Made sure Genymotion paths were correct
Made sure the emulator has the correct API (25) and OS version (7.1.0)
Just a note, when I try to run appc run --platform android without the emulator / Genymotion started, it will spin up the emulator perfectly but never recognizes it being "ready", and fails with the following:
[INFO] Waiting for emulator to become ready...
[ERROR] Emulator failed to start in a timely manner
The current timeout is set to 120000 ms
If the emulator is already started, it completes as described in the top, with the "device not found" error.
Appc info (generated by Appc CLI on "run"):
Operating System
Name = Microsoft Windows 10 Enterprise
Version = 10.0.14393
Architecture = 64bit
# CPUs = 4
Memory = 17037770752
Node.js
Node.js Version = 6.11.3
npm Version = 3.10.10
Titanium CLI
CLI Version = 5.0.14
Titanium SDK
SDK Version = 6.2.2.GA
SDK Path = C:\ProgramData\Titanium\mobilesdk\win32\6.2.2.GA
Target Platform = android
Try use this:
appc run -p android -C "(name of genymotion virtual device)"