Program type already present: android.support.v4.os.ResultReceiver$MyResult
Receiver
I have very similar problem and in my case solution is add in gradle.properties
this two lines:
android.useAndroidX=true
android.enableJetifier=true
I hope it will help.
Program type already present: android.support.v4.os.ResultReceiver$MyResult
Receiver on Ionic
I had the same issue, and found out it was because of the firebase and googleplus plugins. Finally found a solution that worked for me :
ionic cordova plugin add cordova-plugin-androidx
ionic cordova plugin add cordova-plugin-androidx-adapter
Simply adding these plugins removed any build error.
Getting error while running Error: Program type already present: android.support.v4.os.ResultReceiver$MyResult
Receiver
just marge dependency on AndroidX Library.
Example: app/build.gradle:
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
to:
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
Than rebuild again, shows many errors. just comment out these old libraries. re-import android x library package.
Example below:
Marge AndroidX: https://developer.android.com/jetpack/androidx/migrate
I hope solved.
Error: Program type already present: android.support.v4.os.ResultReceiver$MyResult
Receiver
Most probably some libs are using androidx.
To find which one, run
./gradlew tasks --all
find a line like this
yourapp:dependencies
use it to get the dependency tree
./gradlew yourapp:dependencies
Pert of my dependency tree
In my case it was the Advanced RecyclerView, in their page there is this notice "v1.0.0 Migrated to AndroidX (Use v0.11.0 instead if your project uses support libraries)" So i followed the advice and my problem was solved.
Related Topics
Detecting Outgoing Call and Call Hangup Event in Android
Android Get Application's 'Home' Data Directory
Android: Is There Any Free PDF Library for Android
How to Know If Android Talkback Is Active
Android V21 Theme.Appcompat Color Accent Is Ignored, No Padding on Dialogs
How to Set Status Bar Background as Gradient Color or a Drawable in Android
Linearlayout Height in Oncreate Is 0
How to Hide The System/Navigation Bar in Android Ics
Retain The Fragment Object While Rotating
How to Disable "Next" Button on a Edittext Software Keyboard (Replace with "Done" Button)
How to Setup Multiple Alarms in Android
Inconsistency Detected in Recyclerview, How to Change Contents of Recyclerview While Scrolling
Error "Package Android.Support.V7.App Does Not Exist"
When to Use Fragmentmanager::Putfragment and Getfragment
Android Getting Exact Scroll Position in Listview
Sending Message to a Handler on a Dead Thread When Getting a Location from an Intentservice