I have configured an Android sample app project in order to detect Lint errors and include them into SonarQube server. Everything works fine but when I explicitly introduce an error in
16:33:57.681 WARN - Unable to find file C:\Code\Android\SampleApp\app\src\main\AndroidManifest.xml to report issue
message="Should explicitly set `android:allowBackup` to `true` or `false` (it's `true` by default, and that can have some security implications for the application's data)"
summary="Missing `allowBackup` attribute"
explanation="The allowBackup attribute determines if an application's data can be backed up and restored. It is documented at http://developer.android.com/reference/android/R.attr.html#allowBackup
By default, this flag is set to `true`. When this flag is set to `true`, application data can be backed up and restored by the user using `adb backup` and `adb restore`.
This may have security consequences for an application. `adb backup` allows users who have enabled USB debugging to copy application data off of the device. Once backed up, all application data can be read by the user. `adb restore` allows creation of application data from a source specified by the user. Following a restore, applications should not assume that the data, file permissions, and directory permissions were created by the application itself.
Setting `allowBackup="false"` opts an application out of both backup and restore.
To fix this warning, decide whether your application should support backup, and explicitly set `android:allowBackup=(true|false)"`"
This warning is shown because the
xml file is not indexed by the platform. As a consequence the android lint plugin tries to report your issue but the file cannot be found on the server side.
This is a current limitation of the platform that should be addressed very soon.
To workaround this limitation and index your
xml file you can either :
(you can also have a look at this thread for a little more info)