When I take to build for the flutter app using Fastlane, the APK is being generated in a build folder outside the android folder.
The message after the successful build of android is
Couldn't find any new signed apk files...
The generated paths are all empty.
But I found a generated APK outside the android folder in the path
build/app/outputs/apk/release/app-release.apk
Will be the generated APK path be constant or will change with the future releases of flutter? How to solve this issue?
Also, the GitHub issue for the same has been closed due to lack of inactivity. ref: github
I have also faced the same issue, I resolved by changing the configuration like below:
platform :android do
desc ""
lane :distribute do
gradle(
task: 'assemble',
build_type: 'Release'
)
firebase_app_distribution(
app: "<Enter your appId>",
firebase_cli_token: "<Enter your token>",
testers: "",
release_notes: "",
firebase_cli_path: "/usr/local/bin/firebase",
apk_path: "../build/app/outputs/apk/release/app-release.apk"
)
end
end
Run below fastlane commands:
fastlane add_plugin firebase_app_distribution
fastlane run firebase_app_distribution_login
The above command will provide you firebase_cli_token add the same to above configuration.
fastlane distribute
Note: Make sure you login to your Firebase account and click on get started for App Distribution.
Update your fastfile
with the below code, So it will take the latest release aab file from the given path and it will upload the same on the internal app sharing.
default_platform(:android)
platform :android do
desc 'Build a signed release APK & deploy to Internal App Sharing'
lane :sign_apk_build do
gradle(
task: 'bundle',
build_type: 'Release',
print_command: false,
properties: {
'android.injected.signing.store.file' => ENV['storeFile'],
'android.injected.signing.store.password' => ENV['storePassword'],
'android.injected.signing.key.alias' => ENV['keyAlias'],
'android.injected.signing.key.password' => ENV['keyPassword']
}
)
upload_to_play_store_internal_app_sharing(
aab: '/Users/dhavalkansara/Flutter Development/OfficeProjects/my-doses/build/app/outputs/bundle/release/app-release.aab'
)
end
end
Note: You guys can update the aab path as per your project folder structure.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.