Unable to build in Android
Describe the bug Unable to build the project in Android used Flutter 3.10.1
To Reproduce try to build the android app using pdfx : 2.3.0
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:18:31 Unresolved reference: DocumentRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:19:31 Unresolved reference: PageRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:20:31 Unresolved reference: RepositoryItemNotFoundException e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:22:27 Unresolved reference: randomFilename e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:23:27 Unresolved reference: toFile e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:31:39 Unresolved reference: DocumentRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:32:35 Unresolved reference: PageRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:112:21 Unresolved reference: RepositoryItemNotFoundException e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:129:70 Cannot infer a type for this parameter. Please specify it explicitly. e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:144:21 Unresolved reference: RepositoryItemNotFoundException e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:183:53 Unresolved reference: randomFilename e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:202:21 Unresolved reference: RepositoryItemNotFoundException e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:228:45 Cannot infer a type for this parameter. Please specify it explicitly. e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:295:72 Unresolved reference: randomFilename e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:305:73 Unresolved reference: randomFilename e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/Messages.kt:308:25 Unresolved reference: toFile e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/PdfxPlugin.kt:8:31 Unresolved reference: DocumentRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/PdfxPlugin.kt:9:31 Unresolved reference: PageRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/PdfxPlugin.kt:16:29 Unresolved reference: DocumentRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/PdfxPlugin.kt:17:25 Unresolved reference: PageRepository e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/document/Page.kt:7:27 Unresolved reference: toFile e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/document/Page.kt:48:21 Unresolved reference: toFile e: file:///Users/sulemanimdad/.pub-cache/hosted/pub.dev/pdfx-2.3.0/android/src/main/kotlin/io/scer/pdfx/document/Page.kt:55:20 Unresolved reference: toFile
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':pdfx:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
- Get more help at https://help.gradle.org
BUILD FAILED in 49s Exception: Gradle task assembleDebug failed with exit code 1
Smartphone (please complete the following information):
Output from flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.10.1, on macOS 13.1 22C65 darwin-arm64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] VS Code (version 1.72.2) [✓] Connected device (4 available) [✓] Network resources
• No issues found!
I had a similar issue with 2.4.0 and solved it by opening the android folder with Android Studio and run the "Recommended Steps".