Closed Tom3652 closed 7 months ago
Thanks for the report. I see the 5 warnings above, but what was the 1 error?
Ah, that's just my build flag to force an error if there are any warnings. It was intended to help me catch problems sooner, so I guess it is doing its job.
It looks like some methods were deprecated in API level 34, so it'll need to be updated to deal with the new APIs intended to replace those.
I think this is due to : -Werror specified
what do you think ?
Edit : Thanks for your reactivity and work, i see you got it too !
Can anyone recommend a way for me to get around this?
When I do a flutter build apk
it all works fine, but I'm trying to generate some test assets using ./gradlew app:assembleAndroidTest
and then it fails with:
> Task :just_audio:compileDebugJavaWithJavac FAILED
warning: [options] source value 8 is obsolete and will be removed in a future release
warning: [options] target value 8 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
error: warnings found and -Werror specified
FAILURE: Build failed with an exception.
I've tried adding --warning-mode=none
to the ./gradlew
but that didn't seem to do anything.
I've also tried editing ./pub-cache/hosted/pub.dev/audio_session-0.1.16/android/build.gradle
and removing the -Werror
but somehow the problem persists (I guess it's cached somewhere?)
Any pointers appreciated!
PS. I'm using
compileSdkVersion 33
and
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.15
You can clone the git repo and edit the build.gradle, then update your pubspec to point to your version of the plugin. You might need a dependency override (in pubspec) to force just_audio to use your version of it.
I've published version 0.1.17 which suppresses the deprecation warnings for these 5 method calls, so this should allow it to compile.
The new APIs Android introduced to replace the old APIs have not been implemented, but that can be saved for a future effort.
Thanks @Tom3652 for reporting.
I'll close the issue but let me know if the release doesn't work and I'll be happy to reopen the issue.
` FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.`
Still getting this error
FAILURE: Build failed with an exception.
I'm facing the same problem. compileSdkVersion 33 minSdkVersion 21 targetSdkVersion 33
This does not appear to be the same issue since it is about targeting SDK 34, and the error message is also different. The original error very specifically identified the use of methods that were deprecated in SDK 34. Unless I'm mistaken about what I just said, can you please open a new issue with the details of how I can reproduce this and an exact copy of the full error output?
Thanks for your package !
I have tried to build my app and set
targetSdkVersion 34
for each of my sub-projects but it doesn't work and give the following output when failing on yours :Note : this is not blocking to build the app, i simply set to
33
and it works fine