Android资源链接失败是因为使用了flutter_pdfview包构建Flutter APK。

huangapple go评论74阅读模式
英文:

Why Android resource linking failed in Flutter APK build with flutter_pdfview package

问题

问题出在哪里:
任务':flutter_pdfview:verifyReleaseResources'的执行失败。

在执行com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action时发生了故障
Android资源链接失败
错误/Users/pawan/Documents/GitHub/flutter_project/build/flutter_pdfview/intermediates/merged_res/release/values/values.xml:132AAPT错误未找到资源android:attr/lStar

我想提到我正在使用flutter_cached_pdfview包的0.4.1版本,它依赖于flutter_pdfview包。有趣的是,只有当我运行flutter build apk时才会出现此问题,而在模拟器上使用flutter build appbundle或flutter run时则没有问题。此外,运行flutter doctor -v不报告任何问题。

我尝试了

flutter upgrade
flutter clean
flutter pub get

但这没有解决我的问题。

英文:
  • What went wrong:
    Execution failed for task ':flutter_pdfview:verifyReleaseResources'.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:/Users/pawan/Documents/GitHub/flutter_project/build/flutter_pdfview/intermediates/merged_res/release/values/values.xml:132: AAPT: error: resource android:attr/lStar not found.

I would like to mention that I am using version 0.4.1 of the flutter_cached_pdfview package, which depends on the flutter_pdfview package. Interestingly, this issue only occurs when I run flutter build apk and not when I use flutter build appbundle or flutter run on the emulator. Furthermore, running flutter doctor -v does not report any issues.

I tried

flutter upgrade
flutter clean
flutter pub get

but it's not resolve my issue.

答案1

得分: 1

你需要根据库的问题部分中提到的说明来管理flutter_pdfview的版本。请访问以下链接并按照所示进行管理:

https://github.com/binSaed/flutter_cached_pdfview/issues/95#issuecomment-1510450655

英文:

You need to manage version of flutter_pdfview as mentioned in issue section of library . Kindly visit below mentioned link and manage as shown

https://github.com/binSaed/flutter_cached_pdfview/issues/95#issuecomment-1510450655

huangapple
  • 本文由 发表于 2023年5月14日 15:14:56
  • 转载请务必保留本文链接:https://go.coder-hub.com/76246297.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定