AndroidStudio打包问题

  • Creator 版本:3.6.3

  • 目标平台: Android

  • 重现方式:AndroidStudio打包

打包一直提示这个
> No matching configuration of project :libcocos was found. The consumer was configured to find a library for use during compile-time, preferably optimized for Android, as well as attribute ‘com.android.build.api.attributes.BuildTypeAttr’ with value ‘debug’, attribute ‘com.android.build.api.attributes.AgpVersionAttr’ with value ‘8.4.0’, attribute ‘org.jetbrains.kotlin.platform.type’ with value ‘androidJvm’ but:
- None of the consumable configurations have attributes.

论坛里看到说改生成配置settings.gradle,删掉build再重新生成的,都没用。实在没办法了,卡了两三天了。希望有大佬解答一下。

微信截图_20240509153129

是不是settings.gradle里的路径不太对

你看下Android studio 的版本对不对 我之前版本不对也打不上包

image 改完后,又说Could not determine the dependencies of task ‘:libservice:extractDebugAnnotations’.

Could not resolve all task dependencies for configuration ‘:libservice:debugCompileClasspath’.

版本是对的上的,之前sdk版本和ndk版本不对,后面都改了

image 现在报libserver找不到,这个我看帖子都不添加,本身自带不是么

有没有大佬分享一下,打包的时候要配置的文件…不太明白到底要配置的是哪个文件夹的build.gradle。

先打个空包试下 昨天我还打了个3.8.2的空包,jdk用的1.7,你试试

打包很简单 就要知道一个 sdk 一个ndk 就行了 版本不能太高也不能太低 , 还有一个最核心的问题就是你的文件夹的地址太深了也会报错 就是说你的文件最好不要超过两级
image

image

已解决。sdk和ndk版本不适配,项目导入的时候就报错了。导致升级版本后,其他报错。jdk,sdk,ndk适配好,就没问题了。