Gradle plugin for sonar Android error “attribute name has invalid character '$'”


(Liulinru13) #1

In an Android Project , I get an error when run ./gradlew sonarqube , this is the error:

/../sonar_test1/submodules/Msg/msg/build/intermediates/manifest/androidTest/debug/AndroidManifest.xml:297: Tag attribute name has invalid character '$'. :msg:processDebugAndroidTestResources FAILED

This happens when executing gradle task processDebugAndroidTestResources.

In build.gradle of module “msg”,I use manifestPlaceholders like this:

manifestPlaceholders = [

and the variable ‘JPUSH_PKGNAME’ is defined in another module which is the app module in the project. This is ok with executing Gradle Task ‘assemble’, but build failed when i run task ‘sonarqube’…

For some reasons, I can’t declare the variable like ‘JPUSH_PKGNAME’ in build.gradle of module ‘msg’.

gradle version 3.3 2.3.1
gradle plugin for sonarqube version 2.6.1

Any solutions to solve the this problem? Thank you.