作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
最近我下载了Android Studio 3.0.1我想构建一个最低 SDK 10 的应用
向导不允许我将最低 SDK 更改为 14 以下所以我继续构建应用程序,然后我更改了 gradle 设置文件=>项目结构=>应用程序=>属性(选项卡)我改变 将工具版本构建到 25.0.3,因为它是我支持旧 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)
从 flavors (tab) 我改变了:
API 10 的最低 SDK 版本。
目标 SDK 版本为 API 25。
我从 build.gradle 中删除了:
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
然后同步构建项目,构建成功但是当尝试在真实移动设备上运行它时出现以下错误:
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)
所以我想知道如何使用 android studio 3.0.1 为 api 10 构建 android 应用程序?有可能吗?或者如何解决这个问题?
最佳答案
你需要进入你的 build.gradle(Module : app) 并添加这个:
安卓{
defaultConfig {
minSdkVersion 10
}
关于android - 如何在 android Studio 3.0.1 中为旧 API(例如 Gingerbread)构建 android 应用程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48218302/
我是一名优秀的程序员,十分优秀!