Open FahadIqbal opened 3 weeks ago
even I added below tags in my main flutter project and in your project also i checked with empty project its same issue <meta-data android:name="assets.audio.player.notification.icon.play" android:resource="@drawable/ic_play_custom"/> <meta-data android:name="assets.audio.player.notification.icon.pause" android:resource="@drawable/ic_pause_custom"/> <meta-data android:name="assets.audio.player.notification.icon.stop" android:resource="@drawable/ic_stop_custom"/> <meta-data android:name="assets.audio.player.notification.icon.next" android:resource="@drawable/ic_next_custom"/> <meta-data android:name="assets.audio.player.notification.icon.prev" android:resource="@drawable/ic_prev_custom"/>
Same problem:
e: C:\Users\Tom\AppData\Local\Pub\Cache\hosted\pub.dev\assets_audio_player-3.1.1\android\src\main\kotlin\com\github\florent37\assets_audio_player\notification\NotificationService.kt: (168, 70): Unresolved reference: drawable
e: C:\Users\Tom\AppData\Local\Pub\Cache\hosted\pub.dev\assets_audio_player-3.1.1\android\src\main\kotlin\com\github\florent37\assets_audio_player\notification\NotificationService.kt: (172, 82): Unresolved reference: drawable
e: C:\Users\Tom\AppData\Local\Pub\Cache\hosted\pub.dev\assets_audio_player-3.1.1\android\src\main\kotlin\com\github\florent37\assets_audio_player\notification\NotificationService.kt: (176, 83): Unresolved reference: drawable
e: C:\Users\Tom\AppData\Local\Pub\Cache\hosted\pub.dev\assets_audio_player-3.1.1\android\src\main\kotlin\com\github\florent37\assets_audio_player\notification\NotificationService.kt: (180, 82): Unresolved reference: drawable
e: C:\Users\Tom\AppData\Local\Pub\Cache\hosted\pub.dev\assets_audio_player-3.1.1\android\src\main\kotlin\com\github\florent37\assets_audio_player\notification\NotificationService.kt: (184, 82): Unresolved reference: drawable
e: C:\Users\Tom\AppData\Local\Pub\Cache\hosted\pub.dev\assets_audio_player-3.1.1\android\src\main\kotlin\com\github\florent37\assets_audio_player\notification\NotificationService.kt: (188, 82): Unresolved reference: drawable
I had the same problem,
e: file:///C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:168:70 Unresolved reference: drawable
e: file:///C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:172:82 Unresolved reference: drawable
e: file:///C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:176:83 Unresolved reference: drawable
e: file:///C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:180:82 Unresolved reference: drawable
e: file:///C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:184:82 Unresolved reference: drawable
e: file:///C:/Users/Admin/AppData/Local/Pub/Cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:188:82 Unresolved reference: drawable
e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:168:70 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:172:82 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:176:83 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:180:82 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:184:82 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:188:82 Unresolved reference: drawable
e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:168:70 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:172:82 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:176:83 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:180:82 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:184:82 Unresolved reference: drawable e: file:///D:/git/zerowait/bpm_player/plug/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:188:82 Unresolved reference: drawable
private fun getSmallIcon(context: Context): Int {
return android.R.drawable.ic_media_play
}
private fun getPlayIcon(context: Context, resourceName: String?): Int {
return android.R.drawable.ic_media_play
}
private fun getPauseIcon(context: Context, resourceName: String?): Int {
return android.R.drawable.ic_media_pause
}
private fun getNextIcon(context: Context, resourceName: String?): Int {
return android.R.drawable.ic_media_next
}
private fun getPrevIcon(context: Context, resourceName: String?): Int {
return android.R.drawable.ic_media_previous
}
private fun getStopIcon(context: Context, resourceName: String?): Int {
return android.R.drawable.ic_media_pause
}Change to system icon temporary solution
private fun getSmallIcon(context: Context): Int { return android.R.drawable.ic_media_play }
private fun getPlayIcon(context: Context, resourceName: String?): Int { return android.R.drawable.ic_media_play }
private fun getPauseIcon(context: Context, resourceName: String?): Int { return android.R.drawable.ic_media_pause }
private fun getNextIcon(context: Context, resourceName: String?): Int { return android.R.drawable.ic_media_next }
private fun getPrevIcon(context: Context, resourceName: String?): Int { return android.R.drawable.ic_media_previous }
private fun getStopIcon(context: Context, resourceName: String?): Int { return android.R.drawable.ic_media_pause }
wow! This works!! Thank you!!
Flutter Version
My version :
Lib Version
My version :
Platform (Android / iOS / web) + version
Platform :
Describe the bug
.pub-cache/hosted/pub.dev/assets_audio_player-3.1.1/android/src/main/kotlin/com/github/florent37/assets_audio_player/notification/NotificationService.kt:188:82 Unresolved reference: drawable
Small code to reproduce