Closed Asadq518 closed 10 months ago
Can you explain this change? In general, minSdkVersion
should be set as low as possible. Are you saying this plugin can't support sdk level 16? (If so, what is the specific reason?)
Hmm, now your latest commit increases the "min" sdk version even higher, first 16, then 23, now 28? I don't think that can be justified.
/Users/apple/.pub-cache/git/audio_session-5252d4c29fa26cd7e386b2c8f617c05ee77a7eac/android/src/main/java/com/ryanheise/audio_session/AndroidAudioManager.java:274: Error: Call requires API level 28 (current min is 23): android.media.AudioDeviceInfo#getAddress [NewApi] "address", device.getAddress(),
On Fri, Nov 10, 2023, 7:44 PM ryanheise @.***> wrote:
Hmm, now your latest commit increases the "min" sdk version even higher, first 16, then 23, now 28? I don't think that can be justified.
— Reply to this email directly, view it on GitHub https://github.com/ryanheise/audio_session/pull/113#issuecomment-1805871377, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATIPZHI3CQWJYMSJNQ2P3F3YDY4U7AVCNFSM6AAAAAA7GFDAOCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVHA3TCMZXG4 . You are receiving this because you authored the thread.Message ID: @.***>
It looks like the issue is related to the minimum SDK version required by the audio_session package. The error is indicating that a specific method (getAddress()) in the AndroidAudioManager.java file requires API level 28
kindly resolve these issue
That call is guarded by checking Build.VERSION.SDK_INT
within the code, so perhaps this is happening due to newer build tools. Can you let me know what version of everything you're using including gradle?
now i m using compileSdkVersion 34 minSdkVersion 23
ext.kotlin_version = '1.7.10' classpath 'com.android.tools.build:gradle:7.2.0'
just_audio: ^0.9.33 audio_session: ^0.1.16
Dart SDK version: 3.0.6 Flutter 3.10.6
Ah, audio_session doesn't yet support compileSdkVersion 34
(See the second most recent issue: #108) So for now you will either need to compile with a lower sdk or wait for a proper fix (or use your own workaround).
/Users/apple/.pub-cache/hosted/pub.dev/audio_session-0.1.6/android/src/main/java/com/ryanheise/audio_session/AndroidAudioManager.java:271: Error: Call requires API level 23 (current min is 16): android.media.AudioDeviceInfo#getId [NewApi] "id", device.getId(),
compileSdkVersion 33
but still same issue
Closing since minSdkVersion
should be set as low as possible.
update your sdk version