question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ADB fails only for Flutter but not for Android in Android Studio...

See original GitHub issue

It is very strange, but in Android Studio on my Mate Ubuntu 18.04 or just Ubuntu 18.04, AMD Ryzen processor when I create ‘Android Project’ ADB works well. But once I am creating ‘Flutter’ one, i have error Error initializing ADB: Android Debug Bridge not found. I tried start it on Android Studio 3.2, 3.2.1… I tried recipes from here - no way. I tried to downgrade ADB to 23.0.1 too as mentioned here.

adb in console (via Alt-F12) works well. But Device File Explorer shows Error initializing blah-blah and i can not debug and see files in emulators and device…

Here is log:

ADB not found
java.lang.Throwable: ADB not found
    at com.intellij.openapi.diagnostic.Logger.error(Logger.java:126)
    at com.android.tools.idea.explorer.adbimpl.AdbDeviceFileSystemService.start(AdbDeviceFileSystemService.java:107)
    at com.android.tools.idea.explorer.DeviceExplorerController.setup(DeviceExplorerController.java:139)
    at com.android.tools.idea.explorer.DeviceExplorerToolWindowFactory.createToolWindowContent(DeviceExplorerToolWindowFactory.java:51)
    at com.intellij.openapi.wm.impl.ToolWindowImpl.ensureContentInitialized(ToolWindowImpl.java:571)
    at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.lambda$initToolWindow$10(ToolWindowManagerImpl.java:510)
    at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.initToolWindow(ToolWindowManagerImpl.java:513)
    at com.intellij.facet.impl.ui.FacetDependentToolWindowManager.ensureToolWindowExists(FacetDependentToolWindowManager.java:93)
    at com.intellij.facet.impl.ui.FacetDependentToolWindowManager.projectOpened(FacetDependentToolWindowManager.java:81)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.fireProjectOpened(ProjectManagerImpl.java:775)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.lambda$null$6(ProjectManagerImpl.java:391)
    at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransactionAndWait$2(TransactionGuardImpl.java:165)
    at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.doRun(LaterInvocator.java:447)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:431)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:415)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423)
    at com.intellij.ide.IdeEventQueue.pumpEventsForHierarchy(IdeEventQueue.java:905)
    at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:215)
    at com.intellij.openapi.progress.util.ProgressWindow.startBlocking(ProgressWindow.java:201)
    at com.intellij.openapi.application.impl.ApplicationImpl.runProcessWithProgressSynchronously(ApplicationImpl.java:579)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:446)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:109)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runSynchronously(CoreProgressManager.java:318)
    at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:303)
    at com.intellij.openapi.progress.ProgressManager.run(ProgressManager.java:192)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.loadAndOpenProject(ProjectManagerImpl.java:483)
    at com.intellij.ide.impl.ProjectUtil.openProject(ProjectUtil.java:191)
    at com.intellij.ide.RecentProjectsManagerImpl.doOpenProject(RecentProjectsManagerImpl.java:63)
    at com.intellij.ide.RecentProjectsManagerBase.doReopenLastProject(RecentProjectsManagerBase.java:677)
    at com.intellij.ide.RecentProjectsManagerBase$MyAppLifecycleListener.appStarting(RecentProjectsManagerBase.java:719)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.util.messages.impl.MessageBusConnectionImpl.deliverMessage(MessageBusConnectionImpl.java:117)
    at com.intellij.util.messages.impl.MessageBusImpl.doPumpMessages(MessageBusImpl.java:426)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpWaitingBuses(MessageBusImpl.java:387)
    at com.intellij.util.messages.impl.MessageBusImpl.pumpMessages(MessageBusImpl.java:376)
    at com.intellij.util.messages.impl.MessageBusImpl.sendMessage(MessageBusImpl.java:357)
    at com.intellij.util.messages.impl.MessageBusImpl.access$200(MessageBusImpl.java:43)
    at com.intellij.util.messages.impl.MessageBusImpl$2.invoke(MessageBusImpl.java:208)
    at com.sun.proxy.$Proxy79.appStarting(Unknown Source)
    at com.intellij.idea.IdeaApplication$IdeStarter.lambda$main$1(IdeaApplication.java:379)
    at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120)
    at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122)
    at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:377)
    at com.intellij.idea.IdeaApplication.lambda$run$0(IdeaApplication.java:208)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:208)
    at com.intellij.idea.MainImpl$1.lambda$null$0(MainImpl.java:49)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
    at java.awt.EventQueue.access$500(EventQueue.java:98)
    at java.awt.EventQueue$3.run(EventQueue.java:715)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:380)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

flutter - doctor

flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.2.1, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Android Studio (version 3.3)
[!] Connected device
    ! No devices available

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

31reactions
walberlacommented, Aug 15, 2019

Same problem for me. (If this really is a ‘ghost fault’ then this ghost is going round. 😉 … Has anyone a solution to this? Thank you in advance! Take a glance here

Thank you so much ValeriusGC! You put me on the right track. 😃

4 all others - check: -> File -> Project Structure: -> Project (if it has a valid Project SDK) and under -> Modules -> Dependencies (a valid Module SDK)

30reactions
ValeriusGCcommented, Aug 15, 2019

Same problem for me. (If this really is a ‘ghost fault’ then this ghost is going round. 😉 … Has anyone a solution to this? Thank you in advance! Take a glance here

Read more comments on GitHub >

github_iconTop Results From Across the Web

ADB fails only for Flutter but not for Android in Android Studio?
Go to platform-tools folder in your Android SDK, make sure adb files aren't nested into another folder. · Install SDK tools from your...
Read more >
ADB fails only for Flutter but not for Android in Android Studio?
Go to platform-tools folder in your Android SDK, make sure adb files aren't nested into another folder. · Install SDK tools from your...
Read more >
[Solved] Android SDK file not found: adb Error in Flutter
In this post, we are going to show you how to solve "Android SDK file not found: adb" Error in Flutter. This error...
Read more >
Create and edit run/debug configurations - Android Developers
Open a project in Android or Project view. In the Project window, right-click a testable item and select either Run filename or Debug...
Read more >
Android Emulator Troubleshooting - Xamarin - Microsoft Learn
If you see an error about a failure to install the APK on the emulator or a failure to run the Android Debug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found