Unable to generate test due to "Android Manifest presence"

I’m unable to generate test in Intellij due to “Android Manifest presence” error. The project I’m trying this on is not an Android project. How does the plugin determine if there it is an Android project. Any ideas on how to troubleshoot this?

Hi @Jon

Thank you for reaching out - to answer your question; Diffblue Cover searches for an AndroidManifest.xml file in the project. If it is found, then Cover concludes that it’s dealing with an unsupported Android project.

Do you have an AndroidManifest.xml file present in your project?

Kind regards,
Jane @ Diffblue

No, I don’t have a manifest. Is that all it searches for?

Yes - this is the behaviour we expect. We are currently investigating possible reasons why we are hitting this issue.
I will keep you updated on the result of this.

Kind regards,
Jane @ Diffblue

Ok, thanks! Please let me know if you need any more information from me.

1 Like

I think I found the issue now. There are some AndroidManifest.xml in my project which are auto generated by external libraries that for some reason woundn’t show up in my intellij search.

That’s good to know!
To give you an update on our side; we have noticed Cover searches the whole project for this file, which means that any AndroidManifest.xml will tigger Cover to believe it’s an Android project.
Therefore we have worked on 3 changes:

  1. Improved logging; we will show the location of the found AndroidManifest.xml
  2. Change ERROR to WARN when an AndroidManifest.xml is found; meaning in this scenario Cover will still try to write tests, instead of exiting. Note: we still don’t support Android projects, so if the project is an Android project Cover still won’t be able write tests.
  3. We now search a much smaller subset of the project files for the AndroidManifest.xml

All these changes are expected to appear in the newest version of Cover (v. 2023.12.01) that is due to be released sometime this week.

Kind regards,
Jane @ Diffblue