• Register
0 votes
1.3k 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

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
2 answers 42 views
42 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
2 answers 655 views
655 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 jwilliam 3.9k points
0 votes
1 answer 9 views
9 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 Daniel Anderson 4k points