I am able to build the apk but with a warning of a wrong ndk version. I have gradle-7.5-all. In my android/app/build.gradle i have the following code:
android {
namespace "com.example.pull_to_refresh_rive_flutter"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
I found the file local.properties with the following:
flutter.sdk=C:\\app\\flutter
flutter.buildMode=release
flutter.versionName=1.0.0
flutter.versionCode=1
Notice that nor compileSdkVersion nor ndkVersion are specified.
I did a search with 'ndkVersion' on the whole directory android and found nothing (only ndkVersion flutter.ndkVersion in build.gradle).
Where are defined flutter.compileSdkVersion and flutter.ndkVersion ?
Thank you guys.
Thanks to 3nws, I found where it is defined. It's no more in the project but in the flutter distribution. <flutter_dir>\flutter\packages\flutter_tools\gradle\src\main\groovy\flutter.groovy
We have:
class FlutterExtension {
/** Sets the compileSdkVersion used by default in Flutter app projects. */
static int compileSdkVersion = 33
/** Sets the minSdkVersion used by default in Flutter app projects. */
static int minSdkVersion = 19
/** Sets the targetSdkVersion used by default in Flutter app projects. */
static int targetSdkVersion = 33
/**
* Sets the ndkVersion used by default in Flutter app projects.
* Chosen as default version of the AGP version below as found in
* https://developer.android.com/studio/projects/install-ndk#default-ndk-per-agp
*/
static String ndkVersion = "23.1.7779620"
Hope this help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With