schwabe / ics-openvpn

OpenVPN for Android
3.29k stars 1.19k forks source link

Build ics-openvpn fails as Task 'wrapper' not found in project #1635

Closed cherimo closed 1 year ago

cherimo commented 1 year ago

I am trying to build this library https://github.com/schwabe/ics-openvpn from Android Studio. I cloned the project openend the "main" folder in Android Studio and at first I get Unresolved reference errors which I all commented out:

After that I still have one issue and thats the following:

Task 'wrapper' not found in project ':main'. I found several topics within SO that adding the following lines within build.gradle will resolve the issue:

    task wrapper(type: Wrapper){
       gradleVersion = '8.0'
    }

I tried it and and I tried:

    tasks.wrapper {
        gradleVersion = "8.0"
    }

Both dont work, the last one gives the following error:

Expression 'wrapper' cannot be invoked as a function. The function 'invoke()' is not found In addition, I have adjusted the Android project structure in which I manually specify the gradle version. But then I get resolve issues.

So my question is where exactly is it going wrong and can someone point me in the right direction to get this resolved.

Thank you

schwabe commented 1 year ago

you currently need Android Studio alpha version for this project as it targets Android 14 SDK/gradle/APIs/etc.