Open karatekid430 opened 1 month ago
yes, an error occurs
We would also greatly appreciate this being resolved ❤️
Looking at this, best we use the Android namespace name
namespace "com.hemanthraj.fluttercompass"
https://github.com/hemanthrajv/flutter_compass/pull/116
Looks resolved. But I do not see a release.
@hemanthrajv pls
ditto, all builds using gradle 8 or later require the namespace to be set
update it, please
thank you, this helped!
When will this be released?
@xVemu please fix this
@xVemu please fix this
I'm not owner of the repo
@karatekid430 @mithun-itspe @IldySilva @nukithelegend @xVemu
You can also add the following to the build.gradle file located in /android/build.gradle;
// ADD: first line of the build.gradle file:
import groovy.xml.XmlSlurper
// after line: rootProject.buildDir = '../build'
subprojects { project ->
afterEvaluate {
if (project.plugins.hasPlugin('com.android.application') || project.plugins.hasPlugin('com.android.library')) {
// fix AAPT: error: resource android:attr/lStar not found.
project.android {
compileSdkVersion 34
buildToolsVersion "34.0.0"
}
if (!project.android.hasProperty('namespace') || project.android.namespace == null || project.android.namespace.isEmpty()) {
def manifestFile = project.file("src/main/AndroidManifest.xml")
if (manifestFile.exists()) {
def manifest = new XmlSlurper().parse(manifestFile)
def packageName = manifest.@package.text()
if (packageName) {
project.android.namespace = packageName
println "Setting namespace for ${project.name} from AndroidManifest.xml: ${packageName}"
} else {
println "Warning: Could not set namespace for ${project.name} as package name is missing in AndroidManifest.xml."
}
} else {
println "Warning: AndroidManifest.xml not found in ${project.name}. Cannot set namespace."
}
}
}
}
}
Please make a new release with the namespace attribute
please merge!
please merge
Please add the required line in the android tag in the build.gradle file:
This solves
FAILURE: Build failed with an exception.