When I try to run my code in Android Device I get the following error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugShaders'.
> org/apache/log4j/Logger
* 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 17s
Exception: Gradle task assembleDebug failed with exit code 1
Code seems to compile and run fine in run in web(Chrome)
I have tried:
- Flutter clean / pub update
- Invalide cache and restart
- Execution failed for task ':app:mergeDebugShaders' Flutter
Android targetSdk and complieSdk is being default values provided by flutter.gradle
defaultConfig {
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
}
** For apps only. Provides the flutter extension used in app/build.gradle. */
class FlutterExtension {
/** Sets the compileSdkVersion used by default in Flutter app projects. */
static int compileSdkVersion = 31
/** Sets the minSdkVersion used by default in Flutter app projects. */
static int minSdkVersion = 16
/** Sets the targetSdkVersion used by default in Flutter app projects. */
static int targetSdkVersion = 31
/**
* Sets the ndkVersion used by default in Flutter app projects.
* Chosen as default version of the AGP version below.
*/
static String ndkVersion = "21.1.6352462"