My app uses audio_players to play audio. It runs fine on the ios simulator but when I try to build the apk to run the app on a physical device I get the following error:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/joshua/.pub-cache/hosted/pub.dev/audioplayers_android-2.0.0/android/build.gradle' line: 29
* What went wrong:
A problem occurred evaluating project ':audioplayers_android'.
> Failed to apply plugin [id 'de.mannodermaus.android-junit5']
> android-junit5 plugin requires Gradle 6.1.1 or later
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* Where:
Script '/Users/joshua/Documents/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 463
* What went wrong:
A problem occurred configuring project ':audioplayers_android'.
> Failed to notify project evaluation listener.
> Cannot invoke method substring() on null object
> compileSdkVersion is not specified.
* 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 1m 56s
Running Gradle task 'assembleRelease'... 118.0s
Gradle task assembleRelease failed with exit code 1