When using the SDK, if the main project depends on the SDK module, the SDK's Class cannot be found in the code

The main reason for this issue is that higher versions of gradle are incompatible with lower versions or have added new restrictions. Here’s how to fix it:

In the build.gradle file, change the following in the dependencies section:

From:


implementation

or


compile

To:


api

Also, make sure to update:


implementation fileTree(dir: 'libs', include: ['*.jar'])