简体   繁体   English

如何为gingerbread API 9导入Android支持库?

[英]How to import the android support library for gingerbread API 9?

So i've been receiving this error from Android Studio it says: 所以我一直在收到来自Android Studio的错误消息,内容是:

Error:Execution failed for task ':app:processDebugManifest'. 错误:任务':app:processDebugManifest'的执行失败。 Manifest merger failed : uses-sdk:minSdkVersion 9 cannot be smaller than version 14 declared in library [com.android.support:appcompat-v7:26.0.0-alpha1] C:\\Users\\ASUS.android\\build-cache\\886b56843583b27d32fb5376ee257ce1046c25e7\\output\\AndroidManifest.xml Suggestion: use tools:overrideLibrary="android.support.v7.appcompat" to force usage 清单合并失败:uses-sdk:minSdkVersion 9不能小于在库[com.android.support:appcompat-v7:26.0.0-alpha1]中声明的版本14 C:\\ Users \\ ASUS.android \\ build-cache \\ 886b56843583b27d32fb5376ee257ce1046c25e7 \\ output \\ AndroidManifest.xml建议:使用tools:overrideLibrary =“ android.support.v7.appcompat”强制使用

what i understood is that when creating the project i put API 9 Gingerbread, but then when Android launches my project the "automatic" generated import lines at the top that declare which API i use doesn't match the gingerbread API 9. My question is can you tell me what is the correct import line i should put to get the appropriate API 9 SDK for my App? 我了解的是,在创建项目时我放了API 9 Gingerbread,但是当Android启动我的项目时,“自动”生成的导入行在顶部声明了我使用的API与gingerbread API 9不匹配。我的问题是您能告诉我正确的导入行是什么,我应该为我的应用程序获取合适的API 9 SDK吗?

Or if i'm getting this wrong and i want to use API 9, how to fix this? 或者,如果我弄错了,我想使用API​​ 9,该如何解决?

this is the MainActivity.java : 这是MainActivity.java:

package com.example.android.takiacademylaunch;
import android.support.v7.app.AppCompatActivity; //the error should be here
import android.os.Bundle;
public class MainActivity extends AppCompatActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
}

Use 'com.android.support:appcompat-v7:25.4.0' 使用'com.android.support:appcompat-v7:25.4.0'

Version 25.4.0 was the last version to support Android 9 - 13 版本25.4.0是最后的版本支持Android 9 - 13

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM