• Register
0 votes
1.7k views

Problem :

I am learning Android Studio. I am trying to add implemntation 'com.google.android.material:material:1.0.0-alpha1' but if I try to build the project then my Android Studio gives below error:

Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy Message{kind=ERROR, text=Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy, sources=[Unknown source file], tool name=Optional.of(D8)}

How can I fix the above error?

8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have also wasted a lot of time on above error. But now I have the solution on it so sharing with you.

Just try to follow below procedure and your error will be fixed.

To begin with you need to update your Android Studio to a latest version.

After that you must update your compileSdkVersion and targetSdkVersion to the 28 as shown below

android {
compileSdkVersion 28
 defaultConfig {
        applicationId "com.your.appid"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 50
        versionName "1.50"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        setProperty("archivesBaseName", "your-app-$versionName")
        resConfigs "en"
     }
}

Now please go to the project structure and change the gradle version to 4.10.

Please add below listed dependency:

implementation 'com.google.android.material:material:1.0.0'

Also you need to remove all the support library dependencies which are shown below:

implementation "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
implementation "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:multidex:1.0.3'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
androidTestImplementation('com.android.support.test.espresso:espresso- 
   core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs', module: 'jsr305'
})

After that just paste the below code into your gradle.properties file:

android.useAndroidX = true
android.enableJetifier = true
In your project level build.gradle file:
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0'
    classpath 'com.google.gms:google-services:4.1.0'
};

 

5 2 1
4,980 points

Related questions

0 votes
1 answer 7 views
7 views
Problem: error: program type already present: android.support.v4.app.fragmenttransitioncompat21$1
asked 5 days ago Lucky Guy 1.4k points
0 votes
1 answer 3 views
3 views
Problem: error: program type already present: android.support.design.widget.coordinatorlayout$behavior
asked 6 days ago Lucky Guy 1.4k points
0 votes
2 answers 60 views
60 views
Problem : I am facing the following issue while building my project. I haven't used any CoordinatorLayout in my project. I have just added it as a dependency in my build.gradle : I am currently using Android Studio 3.2 Canary 4. ... ..... /windows/Other/app/build/intermediates/transforms/dexBuilder/debug/304.jar Program type already present: android.support.design.widget.CoordinatorLayout$Behavior
asked Dec 5, 2019 alecxe 7.5k points
0 votes
1 answer 5 views
5 views
Problem: could not resolve com.android.support:appcompat-v7:26.1.0.
asked 3 days ago Dan phillip 1.9k points
0 votes
1 answer 17 views
17 views
I have a mobile friendly blog. There is different layout i need to set it according android layout. That will fit in all screen sizes? Can any one here show me the path how to do it?
asked Sep 25, 2020 Daniel Anderson 4k points
0 votes
2 answers 977 views
977 views
Problem : Currently I am using the Android Studio 2.1 but when I try to run it the suddenly my App shows me the below error Message my Gradle Build saying the following Exception is: org.gradle. ... .execute(SkipEmptySourceFilesTaskExec uter.java:52) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j ava:52)
asked Jan 31, 2020 jwilliam 3.9k points
0 votes
1 answer 18 views
18 views
Probelm invoke-customs are only supported starting with android o (--min-api 26)
asked Feb 9 charles mathews 3.8k points
0 votes
1 answer 17 views
17 views
I am finding the script for getting current time in 24 hour format in android.
asked Oct 4, 2020 Daniel Anderson 4k points
0 votes
1 answer 130 views
130 views
I just forget my Number . So i need to get it by programmatically.
asked Sep 29, 2020 Daniel Anderson 4k points