Type androidx.appcompat.resources.R$dimen is defined multiple times

后端 未结 7 1488
轻奢々
轻奢々 2020-12-17 19:50

We have a React Native app where after upgrading to Android Studio 3.6.1 and Gradle plugin 3.6.1 we are seeing this compilation error:

Type androidx.appcompa         


        
7条回答
  •  心在旅途
    2020-12-17 20:12

    While I was coding on the android studio on native android.Got the same problem

    Type androidx.appcompat.resources.R$dimen is defined multiple times:

    The problem is because of the Duplication of the BuildConfig which is present inside the JAVA (Generated) Directory

    Here is the solution to fix the problem.

    You have to delete the duplicate BuildConfig from the android studio by this process

    1. Click on java(generated) on the Left side

    1. The problem is extra Build Config Created

    1. When you click any of the BuildConfig, it will show the same error display in the picture

    1. Delete the extra BuildConfig and keep the original BuildConfig.

    Problem Solved

提交回复
热议问题