Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unresolved reference: VERSION_NAME Unresolved reference: VERSION_CODE #79

Closed
bartukaan opened this issue Dec 9, 2020 · 14 comments
Closed

Comments

@bartukaan
Copy link

bartukaan commented Dec 9, 2020

Why I got that kind of error?

e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_paystack-1.0.4+1\android\src\main\kotlin\co\paystack\flutterpaystack\MethodCallHandlerImpl.kt: (33, 100): Unresolved reference: VERSION_NAME
e: C:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_paystack-1.0.4+1\android\src\main\kotlin\co\paystack\flutterpaystack\MethodCallHandlerImpl.kt: (43, 48): Unresolved reference: VERSION_CODE

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flutter_paystack:compileDebugKotlin'.
@Bharavi26
Copy link

Hello @bartukaan sir,
have you found any solution ? i am facing same issue

@bartukaan
Copy link
Author

I've added version_name and version_code manually to get rid of the situation but I don't think this is a very healthy solution

@Bharavi26
Copy link

Bharavi26 commented Dec 23, 2020

in which file sir.. under hosted\pub.dartlang.org\flutter_paystack-1.0.4+1 ?
i tried by adding version code n name in build.gradle but facing same err

@bartukaan
Copy link
Author

bartukaan commented Dec 23, 2020

\flutter_paystack-1.0.4+1\android\src\main\kotlin\co\paystack\flutterpaystack\MethodCallHandlerImpl.kt:

        "getUserAgent" -> {
            //result.success("Android_" + Build.VERSION.SDK_INT + "_Paystack_" + BuildConfig.VERSION_NAME)
            result.success("Android_" + "29" + "_Paystack_" + "1.0.0" )
        }

        "getVersionCode" -> {
            //result.success(BuildConfig.VERSION_CODE.toString())
            result.success("1")
        }

@bidex160
Copy link

bidex160 commented Dec 31, 2020

Hi, @barkutan cant find the methodcallhandlerimpl.kt

@Bharavi26
Copy link

Bharavi26 commented Dec 31, 2020

@bidex160 sir, its under flutter sdk's folder ...
hosted\pub.dartlang.org\flutter_paystack-1.0.4+1\android\src\main\kotlin\co\paystack\flutterpaystack\

@bidex160
Copy link

Ok thanks @bartukaan ...
"getUserAgent" -> {
//result.success("Android_" + Build.VERSION.SDK_INT + "Paystack" + BuildConfig.VERSION_NAME)
result.success("Android_" + "29" + "Paystack" + "1.0.0" )
}

    "getVersionCode" -> {
        //result.success(BuildConfig.VERSION_CODE.toString())
        result.success("1")
    }

So I'm going to paste this right,?

@bartukaan
Copy link
Author

@bidex160 yes, right.

@bartukaan
Copy link
Author

Hi @Wilburt , Is there any idea with that situation?

@bidex160
Copy link

bidex160 commented Jan 8, 2021

@bartukaan solution was good..thanks boss

@definitelyme
Copy link

\flutter_paystack-1.0.4+1\android\src\main\kotlin\co\paystack\flutterpaystack\MethodCallHandlerImpl.kt:

        "getUserAgent" -> {
            //result.success("Android_" + Build.VERSION.SDK_INT + "_Paystack_" + BuildConfig.VERSION_NAME)
            result.success("Android_" + "29" + "_Paystack_" + "1.0.0" )
        }

        "getVersionCode" -> {
            //result.success(BuildConfig.VERSION_CODE.toString())
            result.success("1")
        }

Is this really a solution?? How about CI builds?

@bartukaan
Copy link
Author

@f0rx it is just temporary solution until development team fix it.

@wilburx9
Copy link
Owner

@f0rx @bartukaan this has already been fixed and released. Please, update to 1.0.5+1.

@definitelyme
Copy link

definitelyme commented Jun 14, 2021

@f0rx @bartukaan this has already been fixed and released. Please, update to 1.0.5+1.

Yes true. 👍🏾
Unfortunately i'm not prepared to migrate my project to Null-safety.
Solution that worked for me was fork the repo at ^1.0.4+1, apply the fix above and depend on my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants