I am using an open-srouce code from Google for an app called MyTracks.
I am getting this error when the original app is installed on the phone.
INSTA
CommonsWare has it right, however, there are more details that may help.
For me, there were two key parts of the solution. First I added $(applicationId) to Manifest provider entry:
Second, when you switch Build Varients, and for me this is between 'debug' and 'release', you also need to Sync Project with Gradle Files. It was not enough to just Clean and Rebuild project.
In Android Studio there are two tabs in the bottom of the AndroidManifest.xml page. The 'Text' tab you use to edit and the 'Merged Manifest' tab shows the resulting manifest after the build, and for me I can see it was injecting the applicationId properly into the android:authorities section of the provider.