Android studio 3.1.3 Unable to locate adb

  • Replies:15
  • Answered
Luboss8
  • Forum posts: 18

Jun 30, 2018, 1:23:19 AM via Website

Hi. I'm totally new on Android. I downloaded and installed Android 3.1.3 and try to run the first app. Pre Phone and Tablet API 28: Android, Basic Activity, Nexus 5X API27, Android 8.1 (Google Play), and I still report this error: "Unable to locate adb". Can you please advise me how to go? Well thank you.

— modified on Jun 30, 2018, 1:28:03 AM

Reply
Best answer
Luboss8
  • Forum posts: 18

Jul 30, 2018, 7:50:58 PM via Website

I've installed Android Studio 3.3 Canary 3 and all runs perfect.

Helpful?
Reply
James Watson
  • Forum posts: 1,583

Jun 30, 2018, 6:01:03 AM via Website

Check your [sdk directory]/platform-tools directory. If it does not exist, then open the SDK Manager in the Android Studio (a button somewhere in the top menu), switch to SDK tools tab and and select/install the Android SDK Platform-tools.

If the above does not solve the problem, try reinstalling the tools:
Open the "Standalone SDK manager" and uninstall the Android SDK platform-tools, delete the [your sdk directory]/platform-tools directory completely and install it again using the SDK manager.

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
TemaserLuboss8
Reply
Luboss8
  • Forum posts: 18

Jul 2, 2018, 8:06:26 PM via Website

Thank you for your answer. But it doesn't work. I tried do all what you recomend.
I've reinstaled android studio, I reinstaled platforms but result is "Unable to locate adb" and "Gradle sync failed: Failed to find target with hash string 'android-26' in: C:\Users\Oco\AppData\Local\Android\Sdk Consult IDE log for more details (Help | Show Log) (33s 773ms);::.

Helpful?
Reply
Luboss8
  • Forum posts: 18

Jul 2, 2018, 8:20:56 PM via Website

next:
Unable to locate adb
java.lang.IllegalArgumentException: Unable to locate adb
at com.android.tools.idea.run.editor.DeployTargetPickerDialog.(DeployTargetPickerDialog.java:128)
at com.android.tools.idea.run.editor.ShowChooserTargetProvider.showPrompt(ShowChooserTargetProvider.java:97)
at com.android.tools.idea.run.AndroidRunConfigurationBase.getDeployTarget(AndroidRunConfigurationBase.java:559)
at com.android.tools.idea.run.AndroidRunConfigurationBase.getState(AndroidRunConfigurationBase.java:268)
at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:158)
at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:55)
at com.intellij.execution.runners.BaseProgramRunner.execute(BaseProgramRunner.java:50)
at com.intellij.execution.ProgramRunnerUtil.executeConfigurationAsync(ProgramRunnerUtil.java:97)
at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:44)
at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:111)
at com.intellij.execution.impl.ExecutionManagerImpl.access$300(ExecutionManagerImpl.java:59)
at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:439)
at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:246)
at com.intellij.util.Alarm$Request.runSafely(Alarm.java:417)
at com.intellij.util.Alarm$Request.access$700(Alarm.java:344)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:384)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
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:650)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
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)

Helpful?
Reply
Luboss8
  • Forum posts: 18

Jul 2, 2018, 8:23:19 PM via Website

The resource @string/appbar_scrolling_view_behavior is marked as private in com.android.support:design Private resources should not be referenced; the may not be present everywhere, and even where they are they may disappear without notice. To fix this, copy the resource into your own project instead.

Helpful?
Reply
Luboss8
  • Forum posts: 18

Jul 2, 2018, 8:29:35 PM via Website

All is wrong.
Do you think you would help me? I am unhappy.
Best regards.

Helpful?
Reply
Luboss8
  • Forum posts: 18

Jul 2, 2018, 8:35:04 PM via Website

What else can I do to run my first app?
Thanks.

Helpful?
Reply
James Watson
  • Forum posts: 1,583

Jul 3, 2018, 4:06:46 AM via Website

Are you sure that you have installed SDK Platform for API 26? It seems that it failed to find that.
If yes, download it in SDK Manager at first of all.

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Luboss8
Reply
Luboss8
  • Forum posts: 18

Jul 3, 2018, 9:28:06 PM via Website

Thank you James Watson, but it doesn't work.image

— modified on Jul 3, 2018, 9:30:37 PM

Helpful?
Reply
Luboss8
  • Forum posts: 18

Jul 3, 2018, 11:17:34 PM via Website

Thank you very much James Watson.
Your answers helped me but the problem was a little somewhere else.
In "C: \ Users \ User \ AppData \ Local \ Android \ Sdk \ platform-tools" folder was missing adb.exe. One I got from developer.android.com/studio/releases/platform-tools#download "SDK Platform-Tool for Windows" I've copied and pasted adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll. And app runs perfectly.
Thanks for your time.
Best Regards

Helpful?
zhan
Reply
James Watson
  • Forum posts: 1,583

Jul 4, 2018, 3:40:21 AM via Website

Congratulations!
Just missing some executable files in SDK folder rarely happened. Maybe they were moved by accident. Any way, you have fixed the issue by yourself and you can continue your Android exercise now. (smug)
Btw, excuse me, it will be appreciated if you would like to refer to my exercise app on Google Play. It's great if you would like to leave a 5-star rating. Thank you in advance. :D

— modified on Jul 4, 2018, 4:02:20 AM

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply
jamesharison
  • Forum posts: 11

Jul 5, 2018, 8:17:36 PM via Website

I have the same problem and it doesn't work.

Helpful?
Reply
Luboss8
  • Forum posts: 18

Jul 9, 2018, 9:30:30 PM via Website

Do you have in direct "C: \ Users \ User \ AppData \ Local \ Android \ Sdk \ platform-tools" adb.exe?

Helpful?
Reply
Best answer
Luboss8
  • Forum posts: 18

Jul 30, 2018, 7:50:58 PM via Website

I've installed Android Studio 3.3 Canary 3 and all runs perfect.

Helpful?
Reply
zhan
  • Forum posts: 1

Nov 14, 2018, 10:21:49 AM via Website

Wow
Fantastic!
It works for me and saved my time
Thank you very much Luboss8!:D

Helpful?
Reply
Khuni
  • Forum posts: 1

May 31, 2019, 7:11:58 PM via Website

i was also suffering from same problem....
After searching many solutions and i tried every possible way to solve that problem.
at the end i find my own solution, firstly i uninstall that avast antivirus which delete .exe file then i just simply delete that platform tools folder from sdk and then choose same sdk directory and redownload platform tools and then it work correctly.

Helpful?
Reply