错误:使用 pdftron 在 flutter 中构建 Android 应用程序时找不到符号

问题描述 投票:0回答:1

我正在尝试使用依赖项https://pub.dev/packages/pdftron_flutter pdf tron 在flutter应用程序中显示pdf文件,当我尝试构建android应用程序时,我收到错误

     C:\Users\USER\AppData\Local\Pub\Cache\hosted\pub.dev\pdftron_flutter-1.0.1-      32\android\src\main\java\com\pdftron\pdftronflutter\helpers\PluginUtils.java:987: error: cannot       find symbol stringRes != R.string.document_save_error_toast_message; ^ symbol:   variable string location: class R

这是 flutter doctor 的输出

[√] Flutter (Channel stable, 3.22.3, on Microsoft Windows [Version 10.0.22621.3447], locale      en-US) [√] Windows Version (Installed version of Windows is version 10 or higher) [!] Android toolchain - develop for Android devices (Android SDK version 34.0.0) X cmdline-tools component is missing Run 
path/to/sdkmanager --install "cmdline-tools;latest"
See https://developer.android.com/studio/command-line for more details. X Android license status unknown. Run
flutter doctor --android-licenses
 to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/windows#android-setup for more details. [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.34) [!] Android Studio (version 2022.3) X Unable to determine bundled Java version. [√] Android Studio (version 2023.3) [√] VS Code (version 1.92.1) [√] Connected device (4 available) [√] Network resources

我尝试实现链接中的所有解决方案“错误:找不到符号”在flutter中构建Android时

就像运行

flutter clean
并将
compileSdkVersion, minSdkVersion targetSdkVersion
分别更改为 34,21,34 但它不起作用

android flutter gradle pdftron
1个回答
0
投票

此问题已通过将 Gradle 降级到 7.3.0 得到解决

© www.soinside.com 2019 - 2024. All rights reserved.