Fixed
Status Update
Comments
pa...@google.com <pa...@google.com>
je...@google.com <je...@google.com>
am...@google.com <am...@google.com> #2
As a workaround we added the following to our own manifest:
<provider
tools:replace="android:authorities"
android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
android:authorities="${applicationId}.google_measurement_service"
android:exported="false" />
You must have tools namespace defined in the xml.
<provider
tools:replace="android:authorities"
android:name="com.google.android.gms.measurement.AppMeasurementContentProvider"
android:authorities="${applicationId}.google_measurement_service"
android:exported="false" />
You must have tools namespace defined in the xml.
ju...@stitchfix.com <ju...@stitchfix.com> #3
I've also been affected by this!
am...@google.com <am...@google.com> #4
@2 I also opened an issue with tools guys https://code.google.com/p/android/issues/detail?id=193567 . I'm not really sure which team should fix it. There's another workaround there that in my opinion is cleaner.
lu...@gmail.com <lu...@gmail.com> #5
I've added
android {
defaultConfig.applicationId = "my.package.id "
}
to my gradle file and it fixed that issue for me
android {
defaultConfig.applicationId = "
}
to my gradle file and it fixed that issue for me
vi...@asos.com <vi...@asos.com> #6
Setting android.defaultConfig.applicationId in your gradle file is something that is expected to be set in Android projects. This is automatically added when you create a new Android project in Android Studio.
However when applicationId isn't present in the project gradle the play-services-measurement AAR package in its AndroidManifest.xml gets defaulted in. This creates a silent issue for the app developer as their is no warnings or errors when the app builds. Only after another app that was build the same way is also installed on the device is the issue known as the OP noted with the INSTALL_FAILED_CONFLICTING_PROVIDER error.
The fix is adding android.defaultConfig.applicationId to your app's gradle file as others have noted however, the play-services-measurement AAR or the build tools should be changed to throw an error if this is missing.
However when applicationId isn't present in the project gradle the play-services-measurement AAR package in its AndroidManifest.xml gets defaulted in. This creates a silent issue for the app developer as their is no warnings or errors when the app builds. Only after another app that was build the same way is also installed on the device is the issue known as the OP noted with the INSTALL_FAILED_CONFLICTING_PROVIDER error.
The fix is adding android.defaultConfig.applicationId to your app's gradle file as others have noted however, the play-services-measurement AAR or the build tools should be changed to throw an error if this is missing.
am...@google.com <am...@google.com> #7
In cordova generated projects android.defaultConfig.applicationId is missing
ko...@gmail.com <ko...@gmail.com> #8
I have already opened an issue with Cordova on this not being adding by default and have provided a work around to set android.defaultConfig.applicationId in the comments until Cordova fixes this.
https://issues.apache.org/jira/browse/CB-10014
ko...@gmail.com <ko...@gmail.com> #9
Thanks for the solution in #4 - that worked for me!
Description
What happened
After upgrading Android Gradle Plugin version to 7.1.0-rc01, and when running
testDebugUnitTest
task, onlytransformDebugUnitTestClassesWithAsm
is being executed, but nottransformDebugClassesWithAsm
. However both tasks are executed if Android Gradle Plugin is downgraded to 7.0.2STEPS TO REPRODUCE:
testDebugUnitTest
,transformDebugClassesWithAsm
is not executed, onlytransformDebugUnitTestClassesWithAsm
ATTACH SCREENSHOTS/RECORDINGS OF THE ISSUE
Sample repository for reproducing:https://github.com/jilulu/sample-agp71-hilt-app
ATTACH LOG FILES (Select Help > Show Log in Files, or Show Log in Finder on a Mac)
Gradle tasks executed inhttps://pastebin.com/EAMxa3tu
testDebugUnitTest
:Studio Build: Bumblebee 2021.1.1 RC 1 Version of Gradle Plugin: 7.1.0-rc01 Version of Gradle: gradle-7.2-bin.zip Version of Java: 14 OS: macOS 12.0.1 (21A559)