Revonic
Revonic
  • 发布:2025-02-07 16:15
  • 更新:2025-03-29 10:54
  • 阅读:1149

【报Bug】离线打包失败:error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 19044.1618

手机系统: Android

手机系统版本号: Android 14

手机厂商: OPPO

手机机型: 一加8

页面类型: vue

vue版本: vue3

打包方式: 离线

项目创建方式: CLI

CLI版本号: 3.0.0-4040520250104002

操作步骤:

升级至最新离线SDK Android-SDK@4.45.82353_20250106

预期结果:

打包成功

实际结果:

打包失败

Android resource linking failed  
io.xx.app-mergeReleaseResources-35:/values/values.xml:2466: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values-v32/values-v32.xml:7: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:5829: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:5836: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:5842: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:6895: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:7446: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:9513: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:9536: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
error: failed linking references.

bug描述:

Android Studio离线打包,使用离线SDK 4.08.82057_20240402,打包成功,

后面升级至最新离线SDK Android-SDK@4.45.82353_20250106,打包失败,报错如下:

Android resource linking failed  
io.xx.app-mergeReleaseResources-35:/values/values.xml:2466: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values-v32/values-v32.xml:7: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:5829: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:5836: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:5842: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:6895: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:7446: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:9513: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
io.xx.app-mergeReleaseResources-35:/values/values.xml:9536: error: style attribute 'android:attr/windowOptOutEdgeToEdgeEnforcement' not found.  
error: failed linking references.
2025-02-07 16:15 负责人:DCloud_Android_zl 分享
已邀请:
Revonic

Revonic (作者)

其余代码、文件均未改动,仅仅是把最新版SDK拷贝过来,打包,然后就报错。退回旧版SDK打包正常

Revonic

Revonic (作者)

已解决
compileSdk = 35

6***@qq.com

6***@qq.com

4.45的版本,有问题。正常情况下,compileSdk = 34,应该也是可以编译通过的。现在,还有很多App是compileSdk = 34编译的。希望官方能够解决~

l***@sina.cn

l***@sina.cn

感谢,解决问题了。
真坑,官方每次升级,都得出幺蛾子,原来跑的好好的,升个级,跑不起来了,还好找到了这篇文章,不然又得折腾。。。
官方啥时候能让人省心。。。

要回复问题请先登录注册