flexn-io / renative

🚀🚀🚀 Unified Development Platform for iOS, tvOS, Android, Android TV, Android Wear, Web, Tizen TV, Tizen Watch, Tizen Mobile, LG webOS, macOS/OSX, Windows, KaiOS, FirefoxOS Firefox TV platforms
https://renative.org
MIT License
1.82k stars 180 forks source link

Version code on android defaults to 0 #974

Closed mihaiblaga89 closed 3 months ago

mihaiblaga89 commented 1 year ago

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.
maciejsiiminski commented 1 year ago

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 commented 11 months ago

@mihaiblaga89 is there a way to test this?

pauliusguzas commented 11 months ago

@ElenaDiachenko cc

ElenaDiachenko commented 10 months ago

@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 commented 10 months ago

@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:

ElenaDiachenko commented 10 months ago

VersionCode only accepts positive integers. Error, fixed here https://github.com/flexn-io/renative/pull/1323