Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant run app after upgrading flutter to 3.19.0 - Project with path app could not be found in project camera_android

I recently upgrade to flutter 3.19.0 and did the migration guide for the "Deprecated imperative apply of Flutter's Gradle plugins" but now i am getting the following error while trying to run my application on android:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\myuser\Projects\exampleapp\android\build.gradle' line: 13

* What went wrong:
A problem occurred evaluating root project 'android'.
> Project with path ':app' could not be found in project ':camera_android'.

* 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.

* Get more help at https://help.gradle.org

I have tried using different combinations of minSdkVersion and compileSdkVersion, currently (24 and 33). Running with verbose options does not give more info:

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'android'.
Caused by: org.gradle.api.UnknownProjectException: Project with path ':app' could not be found in project ':camera_android'.

but nothing seems to work, any solution for this problem?

like image 926
Antonycx Avatar asked Oct 22 '25 20:10

Antonycx


1 Answers

Try first to upgrade gradually, like the flutter release changes says. If you dont know, try to upgrade to 3.16.0 if not working yet try the other above.

I did that on my project, first upgraded to 3.16.0 then to 3.19.0 with some help from stackoverflow. From here

delete android/settings.gradle , after delete run <flutter create .>, to create new setting.gradle , after that should update "org.jetbrains.kotlin.android" to last version of kotlin

for more information:enter link description here

like image 142
Venjal Avatar answered Oct 25 '25 11:10

Venjal