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

no versionCode when splitting Abis on Android in react-native #2136

Open
efstathiosntonas opened this issue May 13, 2024 · 1 comment
Open
Labels
awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks.

Comments

@efstathiosntonas
Copy link

efstathiosntonas commented May 13, 2024

Hi, when Android is splitting Abis in a react-native project I get this error on my CI:

build.gradle:

    splits {
        abi {
            reset()
            enable true
            universalApk false
            include(* reactNativeArchitectures())
        }
    }

applicationVariants.all {
        variant ->
            variant.outputs.each {
                output ->
                    // For each separate APK per architecture, set a unique version code as described here:
                    // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
                    def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
                    def abi = output.getFilter(OutputFile.ABI)
                    if (abi != null) { // null for the universal-debug, universal-release variants
                        output.versionCodeOverride =
                                defaultConfig.versionCode * 1048576 + versionCodes.get(abi)
                    }
            }
    }
> Bugsnag: Your AndroidManifest.xml is missing one or more of
[10:30:46]: ▸ apiKey/versionCode/buildUuid/versionName/package, which are required to upload to bugsnag.
[10:30:46]: ▸ apiKey=XXXXXX
[10:30:46]: ▸ versionCode=null
[10:30:46]: ▸ buildUUID=XXXXX
[10:30:46]: ▸ versionName=2.1.17
[10:30:46]: ▸ applicationId=com.XXXX
[10:30:46]: ▸ Manifest file = /Users/XXXXX/actions-runner/_work/XXXXX/XXXXX/android/app/build/intermediates/merged_manifest/staging/processBugsnagArmeabi-v7a-stagingManifest/AndroidManifest.xml

"react-native": "0.74.1"
"@bugsnag/react-native": "7.23.0"

If I set enable false in abi split it uploads just fine.

@efstathiosntonas efstathiosntonas changed the title no versionCode when splitting Abis on Android no versionCode when splitting Abis on Android in react-native May 13, 2024
@clr182 clr182 added the awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks. label May 21, 2024
@clr182
Copy link

clr182 commented May 21, 2024

Hi @efstathiosntonas

Thanks for reaching out.

The Bugsnag.versionCode variable is automatically pulled from the versionCode field in your App Manifest file. Can you please confirm that this field has been set at runtime and confirming that this is not equal to a null value?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks.
Projects
None yet
Development

No branches or pull requests

2 participants