Open sooslevi9 opened 2 months ago
@sooslevi9 thanks for opening this. We'll take a look at it, and let you know what's going on.
This is blocking issue, when using AGP 8. Any resolution?
@michalkos @sooslevi9
Thanks for your patience on this one - we've just published updates to all the packages that we support, since they all suffered the same issue as the main tealium
package.
I'm afraid it took a while to verify support across a wide range of Android/AGP versions which we look to maintain, so we've pulled in some additional changes present in the newer Flutter plugin templates to hopefully make these packages more reliable going forward.
In case it's useful for you or anyone else reading this, most issues of this nature can be worked-around in Gradle. For example, in this instance, since the tealium
package creates it's own module in your Android Studio project, those missing requirements can be set from root project's build.gradle
:
allprojects {
// repositories omitted ...
subprojects {
afterEvaluate { project ->
if (project.name == "tealium" && project.hasProperty("android")) {
project.android {
if (project.android.hasProperty("namespace") && project.android.namespace == null) {
namespace = 'com.tealium'
}
// set any other required fields e.g.
buildFeatures {
buildConfig true
}
}
}
}
}
}
I'll also note/concede that this isn't gradle best-practice - it's definitely a workaround.
Please let me know how you get on with the latest versions.
tealium: ^2.5.0
1: Task failed with an exception.
What went wrong: A problem occurred configuring project ':tealium'.
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:
2: Task failed with an exception.
What went wrong: Failed to query the value of property 'buildFlowServiceProperty'.
Try:
BUILD FAILED in 8s Error: Gradle task assembleDevelopmentDebug failed with exit code 1
android/build.gradle
`buildscript { ext.kotlin_version = '1.9.23' repositories { google() mavenCentral() }
}
allprojects { repositories { google() mavenCentral() } }
rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') }
tasks.register("clean", Delete) { delete rootProject.buildDir } `