Error in Android build: No matching configuration of project :libcocos2dx was found

Hello team,
I am facing the following error while running android build of Cocos project.

No matching configuration of project :libcocos2dx was found. The consumer was configured to find a runtime of a component, as well as attribute ‘com.android.build.api.attributes.BuildTypeAttr’ with value ‘debug’ but:
- None of the consumable configurations have attributes.

I am using,
Cocos creator version 2.4.10.
SDK API level 28,
NDK r19,
Android Gradle plugin version 4.2.2
Gradle version 6.7.1
Android studio 2021.3.1

Error,

Is there any way to solve the error
Thank you.

Can you use
gradlew compileDebugSources
or
gradlew compileDebug --stacktrace
in the Terminal panel to see the detailed error messages?

1 Like