0

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"
  },
SudheeR Bolla
  • 171
  • 2
  • 12
  • The warnings are harmless I believe as I've seen them many times for working apps. Do you have any other stacktrace or error messages around the "The Package appears to be corrupt" message? – Pierre Oct 19 '18 at 23:13
  • Nothing in particular. I am getting same error everytime for release build and working fine for debug build. – SudheeR Bolla Oct 22 '18 at 06:13
  • Do you have any dex file in your APK? Also, the AOSP source code suggests that some additional message should be present alongside the "Package appears to be corrupt" message. – Pierre Oct 24 '18 at 14:48
  • No AOSP source code. I have managed it by downgrading to my old gradle version 2.2.3 and build tools. – SudheeR Bolla Oct 25 '18 at 10:45
  • The AOSP source code is the code that runs on Android and is what throws the error. Are you still looking into a solution to your question? – Pierre Oct 25 '18 at 18:18
  • Yup. I have added a temporary fix by downgrading. But looking for a proper fix. – SudheeR Bolla Oct 26 '18 at 07:24
  • Then could you answer my previous question: "Do you have any dex file in your APK?". Also, could you try locating the error message "The Package appears to be corrupt" in the logcat and let us know the messages either on the same line or just before? – Pierre Oct 26 '18 at 12:50

0 Answers0