Open sumitkanoje opened 8 months ago
could you find a solution to it?
Did you manage to solve the problem?
@xkayo32 @applicatlat Nope, did not hear anything on this from @flet team yet
Aynı sorunu yaşıyorum. Serious_python ile flutteri imzalayarak çalıştırmayı denedim. Ama serious_python os error erno 2 hatasını aşamadım
I found a reason why this happen. because of /android/app/bundle.gradle file.
to build aab to upload play store.
download build template :
fix bundle.grade in template folder ( in this case "D:/Work/Python/flet/template/flet-build-template/{{cookiecutter.out_dir}}/android/app/build.gradle" ) like below
build with template ( below is my case )
flet build aab --template-dir D:/Work/Python/flet/template/flet-build-template
If this have error like below
then
make key file (after making key file move the file to D:/Work/key/android/weather/upload-keystore.jks )
make key.properties file.
edit build.gradle file ( D:\Work\Python\flet\template\flet-build-template{{cookiecutter.out_dir}}\android\app\build.gradle).
flet build aab --template-dir D:/Work/Python/flet/template/flet-build-template
Now you can upload aab file.
I successed . !
Thanks
@ndonkoHenri I have resolved the issue by implementing the following changes.
Added key.properties
file in flet-build-template\{{cookiecutter.out_dir}}\android
directory:
storePassword=storepass
keyPassword=keypass
keyAlias=upload
storeFile=/path/to/upload-keystore.jks
Updated flet-build-template\{{cookiecutter.out_dir}}\android\app\build.gradle
to include keystore properties and release signing configuration:
key.properties
file.packagingOptions
to set useLegacyPackaging
to true
for jniLibs
.ndk
section to include x86_64
ABI.signingConfigs
section to use properties from key.properties
for release signing.buildTypes.release.signingConfig
from debug
to release
.
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def keystoreProperties = new Properties() def keystorePropertiesFile = rootProject.file('key.properties') if (keystorePropertiesFile.exists()) { keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) }
def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } }
def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' }
def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' }
android { namespace "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}" compileSdkVersion flutter.compileSdkVersion
packagingOptions {
jniLibs {
useLegacyPackaging true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "{{ cookiecutter.org_name }}.{{ cookiecutter.project_name }}"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
}
}
}
flutter { source '../..' }
dependencies {}
Description
Installed the new version pip install flet==0.21.1 I built aab bundle using
flet build aab --no-ios-splash --verbose
commandAfter this when I tried uploading the aab file on google play console I got following error
Below I'm pasting logs from flet build command
Operating system: I'm on Mac OS Sonoma 14.3.1 (23D60)
Additional Details:
flutter doctor output