gabrimatic / restart_app

A Flutter plugin that helps you to restart the whole Flutter app with a single function call by using native APIs.
https://pub.dev/packages/restart_app
MIT License
76 stars 71 forks source link

Does somebody has this exeption? "Execution failed for task ':restart_app:compileDebugKotlin'." #27

Closed MartinBal97 closed 5 months ago

MartinBal97 commented 7 months ago

I did an update of all of my packages and now I have this error:

FAILURE: Build failed with an exception.

VickySalunkhe commented 7 months ago

@MartinBal97 facing same issue, did you find any solution yet ?

MartinBal97 commented 7 months ago

No, I didn't 😔, this happend to me also when I added stripe to my app, are you using stripe?

VickySalunkhe commented 7 months ago

No, i upgraded gradle and flutter version now stuck from last couple of days

On Sat, 6 Apr, 2024, 8:04 pm Martin Balverde, @.***> wrote:

No, I didn't 😔, this happend to me also when I added stripe to my app, are you using stripe?

— Reply to this email directly, view it on GitHub https://github.com/gabrimatic/restart_app/issues/27#issuecomment-2041106160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI5NLSG44DNU2WVAR6GM2ALY4ABZFAVCNFSM6AAAAABFWYENGOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBRGEYDMMJWGA . You are receiving this because you commented.Message ID: @.***>

MartinBal97 commented 7 months ago

@VickySalunkhe Hi Vicky, were you able to solve the problem?

VickySalunkhe commented 7 months ago

@VickySalunkhe Hi Vicky, were you able to solve the problem?

For now I have forked the package , and made changes to manage gradle and kotlin version which seems to make it work, as of now.

You can try as well and let me know, if it works for you :)

restart_app:
    git:
      url: https://github.com/VickySalunkhe/restart_app.git
MartinBal97 commented 7 months ago

I just create my andoid app folder again, it is not something only of restart_app it may happen with others packages too.

VickySalunkhe commented 7 months ago

I just create my andoid app folder again, it is not something only of restart_app it may happen with others packages too.

@MartinBal97 so what was the final conclusion for you?

How did you make it work, as you said, i have faced the same errors wih multiple packages. this temporary fix doesnt seem to work well.

MartinBal97 commented 7 months ago

I do not have conclusion becouse I didn't fix it the way I would have liked. I'm agree with that is a temporary fix but I could't find other way to do it

yangcheng commented 6 months ago

While @VickySalunkhe 's fork works, I tried and it build! Thanks

I have other plugins have similar issue, so I override the kotlin jvmTarget in android project's build.gradle . It works for me now and gives me couple of weeks or months to upgrade all dependencies

    subprojects {
        afterEvaluate { project ->
            if (project.hasProperty('android')) {
                project.android {
                    if (namespace == null) {
                        namespace project.group
                    }
                }
            }
//Add this check
            if (project.plugins.hasPlugin('kotlin-android') || project.plugins.hasPlugin('kotlin')) {
                project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
                    kotlinOptions {
                        jvmTarget = '1.8'
                    }
                }
            }
        }
    }
bilalmuhammed99 commented 5 months ago

@VickySalunkhe Hi Vicky, were you able to solve the problem?

For now I have forked the package , and made changes to manage gradle and kotlin version which seems to make it work, as of now.

You can try as well and let me know, if it works for you :)

restart_app:
    git:
      url: https://github.com/VickySalunkhe/restart_app.git

@VickySalunkhe Hi Vicky, were you able to solve the problem?

For now I have forked the package , and made changes to manage gradle and kotlin version which seems to make it work, as of now.

You can try as well and let me know, if it works for you :)

restart_app:
    git:
      url: https://github.com/VickySalunkhe/restart_app.git

thank you thats work for me