Problem with 4.7 prebuilt samples

Hi, i’m trying to use the camera calibration sample in the 4.7 prebuilt android sdk.

When i open the project with android studio i got this message :

The specified Gradle distribution ‘file:/opt/gradle/’ does not exist.

Same result on 2 computers ( one with new android studio just installed )

I don’t know what to do to get the sample working.

If anyone has a solution please share.

As an alternative if i have a working android project that i clone, can i copy these files in it ? :

My end goal is to use solvepnp to have the position and orientation of aruco markers in my working android project but i need to do a calibration.

Pleas post error message as text( robot could indexed it)

my version is opencv_4.8

Step 1:

content , edit

# distributionUrl=file\:/opt/gradle/

Step 2:
Preference → build execution deployment → Build Tools → Gradle
Gradle JDK fix to 1.8

Setp 3:
Project Structure → Android Gradle plugin version : 4.2.4
Project Structure → Gradle version : 6.7.1

tips: the two version you need keep try , if you err like

cvc-complex-type.2.4.a: Invalid content was found starting with element 'base-extension'. One of '{layoutlib}' is expected

Setp 4: