acoutts / flutter_libphonenumber

Leverages libphonenumber to allow for asynchronous and synchronous formatting of phone numbers in Flutter apps. Includes a TextInputFormatter to allow real-time AsYouType formatting.
MIT License
59 stars 72 forks source link

Gradle task assembleDebug failed with exit code 1 #70

Closed justasher closed 3 weeks ago

justasher commented 4 months ago

Error while running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

friebetill commented 4 months ago

I have the same problem with the latest Flutter version

Viotty commented 4 months ago

Duplicate of issue #45

I used @thuytrinh 's workaround to solve the issue:

I had to work around like below in the root build file of my Android module:

project(':flutter_libphonenumber_android').afterEvaluate {
    project(':flutter_libphonenumber_android').android {
        compileSdkVersion 30
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_17
            targetCompatibility JavaVersion.VERSION_17
        }

        kotlinOptions {
            jvmTarget = '17'
        }
    }
}
ctnmstf commented 3 months ago

Is there any update?

acoutts commented 3 weeks ago

Fixed in v2.3.1