如何降级我的编译版本?

洛伦佐·贝丁

我想使用 API 23 来获得更多的设备兼容性。我正在尝试在我的 build.gradle 文件上设置“23”,但是当我进行同步时,“debug/AndroidManifest”出现了一些错误。

这是我的build.gradle文件:

错误显示在debug\AndroidManifest 上

<manifest 
xmlns:android="http://schemas.android.com/apk/res/android"
package="cloud.domore.domore"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="21"
    android:targetSdkVersion="23" />

<application
    android:allowBackup="true"
    android:debuggable="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/DoMoreTheme" >
    <activity
        android:name="cloud.domore.domore.AuthenticationActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>
</manifest>

我必须修改什么才能降级我的编译和运行 API 版本?

谢谢!

共享软件

如何降级我的编译版本?

没有特别需要降级您的compileSdkVersion. 如果有的话,您可以将其增加到 27。

我想使用 API 23 来获得更多的设备兼容性

您已经准备好返回 API 级别 21 ( minSdkVersion 21)。compileSdkVersion与向后兼容性无关。

我必须修改什么才能降级我的编译和运行 API 版本?

在您的情况下,您什么都不做,因为您已经设置为支持 API 级别 21+ 设备。

关于compileSdkVersioncom.android.support库:

  • com.android.support您使用的所有标准库都需要具有相同的版本(例如,27.0.2

  • compileSdkVersiontargetSdkVersion应设置为相同的值,这是库的主要版本(例如,27

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章