Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compileSdkVersion 太高问题 #3514

Closed
github2136 opened this issue Mar 2, 2022 · 11 comments
Closed

compileSdkVersion 太高问题 #3514

github2136 opened this issue Mar 2, 2022 · 11 comments

Comments

@github2136
Copy link

问题描述:

之前一直使用v8.1.5-jitpack,今天使用时突然提示
Could not determine the dependencies of task ':app:compileProtectDevDebugKotlin'.

Could not resolve all files for configuration ':app:protectDevDebugRuntimeClasspath'.
Could not find gsyVideoPlayer-ex_so-v8.1.5-jitpack.aar (com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.1.5-jitpack).
Searched in the following locations:
https://jitpack.io/com/github/CarGuo/GSYVideoPlayer/gsyVideoPlayer-ex_so/v8.1.5-jitpack/gsyVideoPlayer-ex_so-v8.1.5-jitpack.aar
Could not find gsyVideoPlayer-exo_player2-v8.1.5-jitpack.aar (com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-exo_player2:v8.1.5-jitpack).
Searched in the following locations:
https://jitpack.io/com/github/CarGuo/GSYVideoPlayer/gsyVideoPlayer-exo_player2/v8.1.5-jitpack/gsyVideoPlayer-exo_player2-v8.1.5-jitpack.aar
查看jitpack网站https://jitpack.io/com/github/CarGuo/GSYVideoPlayer/v8.1.5-jitpack/ 只剩一个build.log 编译失败的log

更新为com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.1.9-release-jitpack后
又提示
Execution failed for task ':app:checkProtectDevDebugAarMetadata'.

Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a; dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties); is greater than this module's compileSdkVersion (android-28).Dependency: androidx.appcompat:appcompat:1.4.0.

能否在不升级compileSdkVersion、targetSdkVersion的情况下使用8.1.9版或者重新编译8.1.5版

GSY依赖版本

例如 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.1.5-jitpack'

@github2136 github2136 changed the title 旧版v8.1.5-jitpack获取是定 旧版v8.1.5-jitpack获取问题 Mar 2, 2022
@CarGuo
Copy link
Owner

CarGuo commented Mar 2, 2022

v8.1.6-jitpack 不行? 8.1.5 是有问题。

解决方案:

1、你只需要升级 compileSdkVersion 31 , targetSdkVersion 可以不升级

2、或者你可以:

  defaultConfig {

        configurations.all {
            resolutionStrategy { force 'androidx.appcompat:appcompat:1.3.0' }
        }
        

@CarGuo CarGuo closed this as completed Mar 2, 2022
@CarGuo CarGuo changed the title 旧版v8.1.5-jitpack获取问题 compileSdkVersion 太高问题 Mar 2, 2022
@github2136
Copy link
Author

v8.1.6-jitpack也有问题换v8.1.7-jitpack了
换compileSdkVersion 31就要换java11要改的地方有点多,
提示Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a; dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties); 有十来个个地方,换8.1.7暂时是最方便的了

@ZhuSky
Copy link

ZhuSky commented Mar 16, 2022

@github2136 补充一下 还有一堆第三方中的要修改,很多也还没适配,暂时还在用8.1.7

@CarGuo
Copy link
Owner

CarGuo commented Mar 16, 2022

@ZhuSky 我回复的方式不能支持?

@ZhuSky
Copy link

ZhuSky commented Mar 16, 2022

image

@CarGuo 我这目前不行

@CarGuo
Copy link
Owner

CarGuo commented Mar 16, 2022

@ZhuSky 还要

defaultConfig {

    configurations.all {
        resolutionStrategy { force 'androidx.appcompat:appcompat:1.3.0' }
    }

@AkkunYo
Copy link

AkkunYo commented Mar 23, 2022

我刚因为8.1.7的out of index升级了8.1.9,然后报错了,看提示主要是appcompat和core版本与我本地冲突,我做了exclude
implementation (rootProject.ext.gsyvideoPlayer){
exclude group: 'androidx.appcompat'
exclude group: 'androidx.core'
}

目前测试新版视频正常播放,也没编译报错了

@CarGuo
Copy link
Owner

CarGuo commented May 17, 2022

PS 我刚测试了下,重新去平台上尝试了下:

implementation "com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer:8.1.5-jitpack"

com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-exo_player2:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-proxy_cache:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv64:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-x86_64:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-base:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv7a:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-armv5:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:8.1.5-jitpack
com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-x86:8.1.5-jitpack

这个应该可以依赖到,如下图所示:

image

@crazyzjw
Copy link

A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction

java.lang.reflect.InvocationTargetException (no error message)
改了再编译就会出现这个问题

@MonetChain-Project
Copy link

not implementation
compileSdk 23-33
gradle-7.6

@zhuxing1990
Copy link

zhuxing1990 commented Oct 20, 2023

在V8.4.0 里面基本上改不了 compileSdkVersion 只能用31的
没办法我用的是 8.3.5的 目前设置成29 是没问题的,可以正常编译通过,也可以正常运行
下面是我的 build.gradle的 部分配置

android {

 compileSdkVersion 29    // 尝试先从 31 降级到30,然后运行成功之后 再降级到29  
buildToolsVersion "33.0.2"
defaultConfig {
    minSdkVersion 19
    targetSdkVersion 29
    multiDexEnabled true
     ……  //此处省略其他默认的配置
    configurations.all {
        resolutionStrategy { force 'androidx.appcompat:appcompat:1.3.0' }
    }
    compileOptions {
      sourceCompatibility(JavaVersion.VERSION_1_8)
      targetCompatibility(JavaVersion.VERSION_1_8)
    }
   …… //此处省略其他默认的配置
      // 避免 lint 检测出错时停止构建
   lintOptions {
    checkReleaseBuilds false
    abortOnError false
  }

dependencies {

implementation fileTree(dir: "libs", include: ["*.jar","*.aar"])
//[C、支持其他格式协议的(mpeg,rtsp, concat、crypto协议)]  (https://github.com/CarGuo/GSYVideoPlayer/tree/master#c支持其他格式协议的mpegrtsp-concatcrypto协议)

 implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-java:v8.3.5-release-jitpack',{
    exclude group: 'androidx.appcompat'
    exclude group: 'androidx.core'
}

  //更多ijk的编码支持
implementation 'com.github.CarGuo.GSYVideoPlayer:gsyVideoPlayer-ex_so:v8.3.5-release-jitpack',{
    exclude group: 'androidx.appcompat'
    exclude group: 'androidx.core'
}

  implementation 'com.github.CarGuo.GSYVideoPlayer:GSYVideoPlayer-exo2:v8.3.5-release-jitpack',{
    exclude group: 'androidx.appcompat'
    exclude group: 'androidx.core'
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants