当前位置: 首页 > 知识库问答 >
问题:

将目标API级别更改为28 SDK[重复]

靳祺然
2023-03-14

要将目标SDK更改为28,我在build.gradle中执行了以下操作:

android {
      compileSdkVersion 28

      defaultConfig {
        targetSdkVersion 28

   ...
      dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])

implementation 'com.android.support:appcompat-v7:28.0.0' //-- line with error
implementation 'com.android.support:design:28.0.0' //-- line with error
implementation 'com.android.support:support-annotations:28.0.0'

implementation 'com.squareup.okhttp3:okhttp:3.9.1'
implementation "com.google.code.gson:gson:2.8.2"
implementation files('libs/commons-io-2.4.jar')
implementation files('libs/WebtrendsAndroidClientLib.jar')

// Urban Airship  -- Start
api 'com.urbanairship.android:urbanairship-sdk:9.0.0'

// Recommended for in-app messages
implementation 'com.android.support:cardview-v7:28.0.0' //-- line with error

// We need to add these to force Urban AirShip and Google play services to use latest version.
implementation 'com.android.support:animated-vector-drawable:28.0.0' //-- line with error
implementation 'com.android.support:mediarouter-v7:28.0.0' //-- line with error

implementation "com.google.android.gms:play-services:11.8.0"

// Urban Airship  -- End

//-- third party lib
implementation 'com.github.barteksc:android-pdf-viewer:2.4.0'
implementation 'com.sothree.slidinguppanel:library:3.3.0'
implementation 'com.google.maps.android:android-maps-utils:0.5+'

//api 'at.favre.lib', name: 'bytes', version: '0.2.0'
api 'at.favre.lib:bytes:0.2.0'

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

}

但在Android Studio IDE中,它显示行错误:

     com.android.support:appcompat-v7:28.0.0

和描述:

如果我注释这一行,下一行有“28.0.0”将有相同的错误。所以看起来没有一个带有“28.0.0”的词是有效的。

我做错了什么?

不是

谢谢,

肖恩

共有1个答案

罗安和
2023-03-14

编辑在依赖项中使用此

implementation 'com,android.support:support-v4:28.0.0'

试试看,如果解决了问题,请告诉我。

 类似资料: