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

Version code on android defaults to 0 #974

Closed
mihaiblaga89 opened this issue Apr 12, 2023 · 6 comments
Closed

Version code on android defaults to 0 #974

mihaiblaga89 opened this issue Apr 12, 2023 · 6 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@mihaiblaga89
Copy link
Contributor

Describe the bug
If not specified RNV will default to 0

[ warn ] [configure] You are missing version prop in your config. will default to 0

However, android now fails with

* What went wrong:
A problem occurred configuring project ':app'.
> com.android.builder.errors.EvalIssueException: android.defaultConfig.versionCode is set to 0, but it should be a positive integer.
  See https://developer.android.com/studio/publish/versioning#appversioning for more information.
@mihaiblaga89 mihaiblaga89 added the bug Something isn't working label Apr 12, 2023
@maciejsiiminski
Copy link

Check the versionCode prop inside your appConfigs/renative.json. If it is non-existent or set to zero change it to a positive number.

@pauliusguzas
Copy link
Collaborator

@mihaiblaga89 is there a way to test this?

@pauliusguzas
Copy link
Collaborator

@ElenaDiachenko cc

@ElenaDiachenko
Copy link
Contributor

@GabrieleKaceviciute Check platformBuilds//app/build.gradle.
Version code by default based on the renative version ( ReNative Version: 1.0.0-rc.4 => versionCode = 1000004). You can change this value in renative.json (platforms.android.versionCode). But keep in mind if this value is less than value of the previous installed app, you'll get an error. This is expected behaviour .

@GabrieleKaceviciute
Copy link
Collaborator

GabrieleKaceviciute commented Dec 27, 2023

@ElenaDiachenko
I get an error, the only way - if I set the "versionCode" value lower than zero, in all other cases - there is no error. Is it how it should be or is it bug?

I've tested "versionCode" value:

  • 1000007
  • 1000006
  • 0
  • -1

@ElenaDiachenko
Copy link
Contributor

VersionCode only accepts positive integers. Error, fixed here #1323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants