0

I can not run my build

I have this code

can you help?

/C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:19:11: Error: Member not found: 'Error.throwWithStackTrace'. Error.throwWithStackTrace(exception, stackTrace); ^^^^^^^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:22:9: Error: Member not found: 'Error.throwWithStackTrace'. Error.throwWithStackTrace( ^^^^^^^^^^^^^^^^^^^ /C:/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_storage_platform_interface-4.1.0/lib/src/method_channel/utils/exception.dart:14:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null. Never convertPlatformException( ^ FAILURE: Build failed with an exception. * Where: Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070 * What went wrong: Execution failed for task ':app:compileFlutterBuildDebug'. > Process 'command 'C:\flutter\bin\flutter.bat'' finished with non-zero exit value 1 * 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. 
5

1 Answer 1

0

First of Fall check the flutter version is 2.8.1 then update by below code and check flutter versio is 3.3.4.

update the flutter: using command :" flutter upgrade "

check command is update is 3.3.4

then maybe you face this problem if your app
minSdkVersion flutter.minSdkVersion if is set in flutter.gradle file in 16 or blow 16 then you go to this directory C:\flutter\packages\flutter_tools\gradle\flutter.gradle and open flutter.gradle in notepade enter image description here .

changing static int minSdkVersion = 16 this to

static int minSdkVersion = 19

[!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │ │ update D:\Rohit\FLutter_LAB\example\android\build.gradle: │ │ ext.kotlin_version = ''

and to solve this go to the app\build.gradle :

defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.example" minSdkVersion flutter.minSdkVersion targetSdkVersion flutter.targetSdkVersion

 **multiDexEnabled true** //ADD THIS LINE 
 versionCode flutterVersionCode.toInteger() versionName flutterVersionName } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.