4

Recently I downloaded Android Studio 3.0.1 and I want to build an app with minimum SDK 10

The wizard did not allowed me to change the minimum SDK below 14 so I continued building the app then I changed gradle settings from file=>project Structure=>app => properties (tab) I change Build tools version to 25.0.3 because it is the latest version I have supports old api 10:

Starting with Support Library release 26.0.0, the minimum supported API level across most support libraries has increased to Android 4.0 (API level 14)

and from flavours (tab) I changed:

Min SDK Version to API 10.

Target SDK Version to API 25.

from build.gradle I removed:

androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'

then sync to build the project, the build was successful but when trying to run it on real mobile I got the following error:

Unable to locate adb
java.lang.IllegalArgumentException: Unable to locate adb
    at com.android.tools.idea.run.editor.DeployTargetPickerDialog.<init>(DeployTargetPickerDialog.java:137)
    at com.android.tools.idea.run.editor.ShowChooserTargetProvider.showPrompt(ShowChooserTargetProvider.java:97)
    at com.android.tools.idea.run.AndroidRunConfigurationBase.getDeployTarget(AndroidRunConfigurationBase.java:486)
    at com.android.tools.idea.run.AndroidRunConfigurationBase.getState(AndroidRunConfigurationBase.java:300)
    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.executeConfiguration(ProgramRunnerUtil.java:118)
    at com.intellij.execution.impl.ExecutionManagerImpl.start(ExecutionManagerImpl.java:122)
    at com.intellij.execution.impl.ExecutionManagerImpl.access$300(ExecutionManagerImpl.java:69)
    at com.intellij.execution.impl.ExecutionManagerImpl$3.run(ExecutionManagerImpl.java:539)
    at com.intellij.util.concurrency.QueueProcessor.runSafely(QueueProcessor.java:223)
    at com.intellij.util.Alarm$Request.runSafely(Alarm.java:418)
    at com.intellij.util.Alarm$Request.access$700(Alarm.java:343)
    at com.intellij.util.Alarm$Request$1.run(Alarm.java:385)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:303)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:410)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:399)
    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:827)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:655)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:365)
    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)

so I want to know how to build android app for api 10 with android studio 3.0.1? is is possible? or how to solve this problem?

Dev X
  • 353
  • 2
  • 15
  • 1
    Check this question. https://stackoverflow.com/questions/27301960/errorunable-to-locate-adb-within-sdk-in-android-studio – UdeshUK Jan 12 '18 at 01:52

1 Answers1

0

you need to go in your build.gradle(Module : app) and add the this :

android{

 defaultConfig {

     minSdkVersion 10

 }

}