最佳答案
我在 Android 中使用了本地的 React。如何更新应用程序中的版本号?当我得到这个错误。
我正在按照这个 URL 生成文件 Https://facebook.github.io/react-native/docs/signed-apk-android.html
我试过修改 AndroidManifest.xml 文件,但是在我构建它之后,该文件会被自动修改回来。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.react"
android:versionCode="1"
android:versionName="1.0" >
这里,我修改了 XML:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.react"
android:versionCode="2"
android:versionName="1.1" >
之后,生成文件会自动变回。