SudheeR Bolla
SudheeR Bolla

Reputation: 171

'The Package appears to be corrupt' for android release build generated using gradle command in react native

I have a strange issue.

I have developed a application in React Native and it was uploaded to app store and play store for first version. Now I have planned for 2nd version and have finished coding and it was working fine when I run it through terminal (debug build using metro bundler). But the issue comes here when I tried to generate a signed build for uploading it to Playstore.

When I am generating signed apk, I was getting

"

Failed to execute aapt com.android.ide.common.process.ProcessException: Failed to execute aapt "

previously. So I have added 'android.enableAapt2=true' in gradle.properties and then I am able to generate the build now.But I am getting the warning as

W/ResourceType(36544): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1320) W/ResourceType(36544): For resource 0x0101053e, entry index(1342) is beyond type entryCount(1320) W/ResourceType(36544): For resource 0x0101053b, entry index(1339) is beyond type entryCount(1320) W/ResourceType(36544): For resource 0x0101053c, entry index(1340) is beyond type entryCount(1320)

W/ResourceType(36544): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1329) W/ResourceType(36544): For resource 0x0101053e, entry index(1342) is beyond type entryCount(1329) W/ResourceType(36544): For resource 0x0101053b, entry index(1339) is beyond type entryCount(1329) W/ResourceType(36544): For resource 0x0101053c, entry index(1340) is beyond type entryCount(1329)

W/ResourceType(36544): For resource 0x0101053d, entry index(1341) is beyond type entryCount(1266) W/ResourceType(36544): For resource 0x0101053e, entry index(1342) is beyond type entryCount(1266) W/ResourceType(36544): For resource 0x0101053b, entry index(1339) is beyond type entryCount(1266) W/ResourceType(36544): For resource 0x0101053c, entry index(1340) is beyond type entryCount(1266)

.When I try to install the generated release/signed build in any android device, I am getting error as 'The Package appears to be corrupt'.

I tried many ways but couldn't sort it out. Any Help is appreciated.

The versions I am using in my app are as follows,

Android Specific:

    classpath 'com.android.tools.build:gradle:3.2.0'

compileSdkVersion 26 buildToolsVersion "26.0.3"

defaultConfig {
    applicationId "my app package name."
    minSdkVersion 26
    targetSdkVersion 26
    versionCode 15
    versionName "1.15"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

React Native :

  "dependencies": {
    "axios": "^0.18.0",
    "i18n-js": "^3.0.3",
    "immutable": "^3.8.2",
    "prop-types": "^15.6.1",
    "react": "16.3.1",
    "react-native": "^0.55.4",
    "react-native-auto-height-image": "^1.0.0",
    "react-native-communications": "^2.2.1",
    "react-native-custom-picker": "^0.2.0",
    "react-native-device-info": "^0.22.5",
    "react-native-i18n": "^2.0.12",
    "react-native-keyboard-accessory": "0.0.10",
    "react-native-keyboard-input": "^5.2.3",
    "react-native-marquee": "^0.3.1",
    "react-native-material-textfield": "^0.12.0",
    "react-native-phone-call": "^1.0.4",
    "react-native-scalable-image": "^0.4.0",
    "react-native-send-intent": "^1.0.25",
    "react-navigation": "^1.6.1",
    "react-navigation-redux-helpers": "^1.0.3",
    "react-redux": "^5.0.7",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0"
  },

Upvotes: 0

Views: 533

Answers (0)

Related Questions