Closed heshesh2010 closed 1 year ago
Does this occur on a new project or are you updating an existing project?
Did you read the instructions in the link provided?
@RodrigoSMarques I have the same problem. As of AGP 8+ you must set the namespace in the android {} section of build.gradle. I believe if it's added to the Branch build.gradle it will resolve our issues. https://issuetracker.google.com/issues/200682321 https://developer.android.com/build/configure-app-module#set-namespace
Here's an example of a plugin with support for the namespace: https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/android/build.gradle
After manually updating this package and several others I can confirm that supporting AGP 8+ is the correct solution. I guess all flutter packages are hitting this at the same time. In order to compile against SDK 34 I had to go to AGP 8.
I added this code to the build.gradle
file:
android {
// Conditional for compatibility with AGP <4.2.
if (project.android.hasProperty("namespace")) {
namespace 'br.com.rsmarques.flutter_branch_sdk'
}
...
}
@chadpav and @crobinsonpicdmo.
Thank you for the informations.
In addition to including build.gradle, checking changes made to other plugins, there are other changes to be made.
I am mapping out what needs to be done and will make a new version available in the next few days.
Same issue here.
Resolved in version 7.0.1
run on new version 7.0.0 with android
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':flutter_branch_sdk'.
If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.
Try:
Get more help at https://help.gradle.org