I would like to create an Android project that is compatible to e.g. API level 4 but would still like to test it with UiAutomator that requires API level 18 on newer devices
According to official doc(section Merge conflict marker for imported libraries), it should be.
...
where com.example.lib1, com.example.lib2 are the packages declared in the AndroidManifes inside the libraries.
com.example.lib1, com.example.lib2