781flyingdutchman/background_downloader

BDPlugin.kt:1190:69 Unresolved reference 'R'

Closed this issue · 1 comments

Describe the bug
A clear and concise description of what the bug is.

I encountered compilation failure while referencing 'background_dewnloader: ^ 8.8.0':

e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/BDPlugin.kt:1190:69 Unresolved reference 'R'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/BDPlugin.kt:1191:68 Unresolved reference 'R'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/BDPlugin.kt:1192:69 Unresolved reference 'R'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:371:90 Unresolved reference 'outline_file_download_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:371:131 Unresolved reference 'outline_file_upload_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:372:53 Unresolved reference 'outline_download_done_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:373:50 Unresolved reference 'outline_error_outline_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:374:51 Unresolved reference 'outline_pause_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:391:21 Unresolved reference 'setContentTitle'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:401:21 Unresolved reference 'setContentText'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:408:25 Unresolved reference 'setProgress'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:412:25 Unresolved reference 'setProgress'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:454:36 Not enough information to infer type argument for 'K'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:455:21 Not enough information to infer type argument for 'K'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:455:46 Unresolved reference 'outline_error_outline_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:455:87 Unresolved reference 'outline_download_done_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:457:21 Not enough information to infer type argument for 'K'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:457:70 Unresolved reference 'outline_file_download_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:457:111 Unresolved reference 'outline_file_upload_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:471:29 Unresolved reference 'setContentTitle'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:480:29 Unresolved reference 'setContentText'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:487:33 Unresolved reference 'setProgress'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:489:33 Unresolved reference 'setProgress'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:545:32 Unresolved reference 'outline_cancel_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:564:36 Unresolved reference 'outline_pause_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:592:32 Unresolved reference 'outline_cancel_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:620:32 Unresolved reference 'outline_play_arrow_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:698:28 Unresolved reference 'outline_cancel_24'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:777:51 Unresolved reference 'bg_downloader_notification_channel_name'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/Notifications.kt:779:26 Unresolved reference 'bg_downloader_notification_channel_description'.
e: file:///Users/guizhonglong/.pub-cache/hosted/pub.flutter-io.cn/background_downloader-8.8.0/android/src/main/kotlin/com/bbflight/background_downloader/OpenFile.kt:11:39 Unresolved reference 'R'.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
Android resource linking failed
ERROR: /Users/guizhonglong/workspace/spv/build/apk_installer/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml:15:13-17:58: AAPT: error: resource xml/bgd_file_paths (aka com.spv.proa:xml/bgd_file_paths) not found.

  • 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.
==============================================================================

2: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':background_downloader: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.
==============================================================================

I have checked other third-party packages, and they do not reference R in the code, only the style file in the example.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Logs
If possible, include logs that capture the issue:

logs

Code
If possible, paste in the code snippet where you interact with the package:

Code

Additional context
Add any other context about the problem here.

Looks like an issue with caches. Try Flutter clean and if that doesn't work try Invalidate caches in Android Studio. I don't think this is related to background_downloader, but to your Android build setup.