A new project based on ReactNative version0.60.5 has been created. When compiling the project using Android Studio, we have the following build error:

org.jetbrains.plugins.gradle.tooling.util.ModuleComponentIdentifierImpl.getModuleIdentifier()

Android IDE version (3.1.2) is too low, which is incompatible with the gradle version of the project. The version in the project is. By looking at the contents of the /gradle/wrapper/gradle-wrapper.properties file, you can see 5.4.1 below

distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip zipStoreBase = GRADLE_USER_HOME zipStorePath=wrapper/dists

For project compatibility issues, currently considering lowering gradle version, change it to the following:

distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip zipStoreBase = GRADLE_USER_HOME zipStorePath=wrapper/dists

You think that’s the end of the story? Too young too simple.

Could not get unknown property 'mergeResourcesProvider' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.

How to do? Keep going. Go to the Android root directory and modify the build.gradle file as follows:

Dependencies {classpath (" com. Android. View the build: gradle: 3.4.1 track ") / / modify the above gradle version as the following: The classpath (" com. Android. Tools. Build: gradle: 3.3.0 ") / / NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }

Re-build the project and it will be ok.

Welcome to follow my public account: Jun Wei said.



Personal Website:https://wayne214.github.io