New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle build failed to produce an .apk file. It's likely that this file was generated under D:\Flutter_App\MYAPP\build, but the tool couldn't find it. #44796
Comments
i have to recreate a new project and import back the file |
same issue i m also facing after i update flutter yesterday.. The plugin is there any solution, why is this? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Please can this be re-opened? I have completely removed my pubspec.yaml dependencies and still getting this error message. I don't think this is package related but more Flutter related. |
Yeah.! |
Can you guys seriously sort yourselves out? Honestly, I have never run into so many problems with an SDK before, it is utterly ridiculous and makes you look terrible at your jobs. I cannot run the "stable" branch because the SDK in that branch builds an appbundle that behaves completely differently to the running app, so that the version on my devices is perfect, and the version on the store is broken. (This is a known issue, where you morons suggest moving to the master branch as the resolution for this). I can now not run the master branch either because I have the exact issue as everyone else in this thread. Seriously guys, why are you so bad at this? How can you continue to get it so wrong? There are problems with Flutter literally every month. Every single month we have to spend weeks undoing a mess you guys have made because you have broken something. Absolute amateurs. |
I agree with @ArtfulDodgerB92. On one hand I absolutely love the Flutter framework and Dart language but the fact that I can easily spend 40% of my time every week troubleshooting environment issues it gets very boring very quickly. I'd like this issue to stay opened or moved if possible because I don't understand how my app is working then I get back from holiday and it's broken again 🤷♂️ |
When ThomasValois says 40% this is no exaggeration either guys. I literally spend most of my development time trying to work around failures in a broken environment. I am a coder that spends less than half his time actually coding. No other platform has been anything like this. In fact, I have never had the environment ruin my app before coming to flutter and now it is actually constant. |
This comment has been minimized.
This comment has been minimized.
same issue with flutter sdk v1.12.13+hotfix.6 |
Still having same issue. for to run the app, i can via pure android. but no debugging & hotreloading etc.. |
got it in the last update - Flutter 1.13.3-pre.23 • channel master, working with firebase vision |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
I'm amazed that this ticket hasn't been re-opened. This is such a crippling error for someone who just wants to get on with developing and not troubleshooting. One point to make personally is that I've noticed that creating a new VM seems to fix the issue for me |
I have this issue because I change some settings in build.gradle, Now I edit it then that issue not happened |
This comment has been minimized.
This comment has been minimized.
Managed to make it work by downgrading to stable 1.9.1+hotfix.6 |
I managed to fix it by correcting my flavor settings. Hope it helps
…On Sun, 22 Dec 2019, 16:51 Marcelo Belbey, ***@***.***> wrote:
Managed to make it work by downgrading to stable 1.9.1+hotfix.6
Relevant link
<https://stackoverflow.com/questions/49468321/how-to-downgrade-flutter-sdk-dart-1-x>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#44796?email_source=notifications&email_token=ACQHSMR5T46QGT5TCY73HTLQZ6EJLA5CNFSM4JMRVYLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHPS4TQ#issuecomment-568274510>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACQHSMTDGYXF7VU43VSCE4DQZ6EJLANCNFSM4JMRVYLA>
.
|
This comment has been minimized.
This comment has been minimized.
looks like you added multi flavors. try --flavor 'flavor name' |
This comment has been minimized.
This comment has been minimized.
background: 1.with flutter v1.9.1+hotfix.6
splits {
abi {
enable false //disable when run by flutter run
reset()
include SUPPORT_ABI_LIST
universalApk true
}
}
with flutter 1.9.1 , after this two steps , 2.with flutter v1.12.13+hotfix.9 the apks build in
|
I have a solution with flutter v1.12, add this in host app's build.gradle applicationVariants.all { variant ->
variant.outputs.all {
def assembleTaskName = "assemble${variant.name.capitalize()}"
if (rootProject.childProjects['flutter']!=null && tasks.findByName(assembleTaskName)) {
def linkAPKTask = tasks.create(name: "linkFlutterApk${variant.name.capitalize()}").doLast {
//soft link apk to flutter module build dir build/host
ant.symlink(resource: new File(rootProject.projectDir.path+'/app/build'), link: new File(rootProject.childProjects['flutter'].projectDir.parentFile.parent+'/build/host'))
}
tasks[assembleTaskName].finalizedBy = [linkAPKTask]
}
}
}
|
I have no flavours at all in my build.gradle. This may be 'a' cause of this issue, but it is not 'the' cause. We really need a fix on the all the critical stability issues for this platform. |
This comment has been minimized.
This comment has been minimized.
I had the same problem. I'm using Windows 7.
N.B.: I am using PowerShell as my default terminal. |
I was able to build the signed bundle with:
|
I think the problem is due to the broken path in plugins Another solution which worked for me is |
This has become a junkyard of reposts about various ways to specify the flavor.. Yeah you need to specify the flavor if you're using flavors. I wonder if we could have some up-front validation to check that flavor is set before doing anything with a flavorful setup and give a more informative error message than just "apk could not be found" e.g. "You have flavors configured, but you did not specify which flavor to build".. which leads all of these poor ppl googling their way to here and trash this issue with completely unrelated chatter about how you configure the flavor in various IDEs, editors or command line... |
Solution:
|
I was getting this error because I had defined the splits configuration inside my I guess flutter gets confused when there are multiple generated apks, so it does not know which one to use for the device. Removing the configuration and doing a |
This is working find for me when I configure deference Flavor |
I had the same problem. I solved it by renaming the apk file name. When I created Flavor, apk files were saved in lowercase when it should have been in Camel Case. This is why the build tool was unable to find this apk.
Hope that will help someone) |
Perfect thank you! My error was while running an integration test. Adding the flavor fixed it: --flavor='flavor name' full test command: flutter drive |
Thank you , it work :)) @tomrozb |
in my case it was fixed by doing following command through terminal where staging is current flavor |
I just commnted debuggable true in buildTypes release
And the problem gone :-> |
1 similar comment
I just commnted debuggable true in buildTypes release
And the problem gone :-> |
Bueno espero que pueda ayudar, pero resulta ser que cuando tenemos varios flavors, debemos de especificar de que flavor queremos generar la apk release de nuestra aplicacion:
|
it's work for me :) |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
My flutter app not able to start after upgrade flutter version.
Gradle build failed to produce an .apk file. It's likely that this file was generated under D:\Flutter_App\team37\build, but the tool couldn't find it.
Exited (sigterm)
[√] Flutter (Channel dev, v1.10.16, on Microsoft Windows [Version 10.0.17763.805], locale en-US)
• Flutter version 1.10.16 at C:\src\flutter
• Framework revision 798e427 (6 days ago), 2019-11-06 21:04:17 -0500
• Engine revision 34a40cf
• Dart version 2.7.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\User\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 28.0.3
• ANDROID_HOME = C:\Users\User\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio1
• Flutter plugin version 38.2.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[√] VS Code (version 1.40.0)
• VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.6.0
The text was updated successfully, but these errors were encountered: