React Native release apk doesn't match app when running react-native run-android
I'm currently building my first React Native app. I set up a release in Play Console for Internal Testing and was able to push my first signed apk. Since then, we've made bug fixes that are now merged into master. When I try to generate a new release by running:
cd android && ./gradlew assembleRelease
and upload as a new release, I don't see any of the new changes after updating my app via the Play Store.
I've tried running
react-native bundle --entry-file ./index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
before generating a new release, but I still don't see the changes.
Running react-native run-android while my device is hooked up with USB Debugging works fine, as well as in any emulator. I just can't figure out why my APK doesn't match the code generated on my local device.
Is there a step that I'm missing that's keeping my APK from representing the latest changes on master when I build?
Using React Native 0.56
Updated to add my Gradle Config:
// android/app/build.grade
signingConfigs {
release {
if(project.hasProperty('MY_RELEASE_STORE_FILE')) {
storeFile file(MY_RELEASE_STORE_FILE)
storePassword pass
keyAlias MY_RELEASE_KEY_ALIAS
keyPassword pass
}
}
}
android react-native apk
add a comment |
I'm currently building my first React Native app. I set up a release in Play Console for Internal Testing and was able to push my first signed apk. Since then, we've made bug fixes that are now merged into master. When I try to generate a new release by running:
cd android && ./gradlew assembleRelease
and upload as a new release, I don't see any of the new changes after updating my app via the Play Store.
I've tried running
react-native bundle --entry-file ./index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
before generating a new release, but I still don't see the changes.
Running react-native run-android while my device is hooked up with USB Debugging works fine, as well as in any emulator. I just can't figure out why my APK doesn't match the code generated on my local device.
Is there a step that I'm missing that's keeping my APK from representing the latest changes on master when I build?
Using React Native 0.56
Updated to add my Gradle Config:
// android/app/build.grade
signingConfigs {
release {
if(project.hasProperty('MY_RELEASE_STORE_FILE')) {
storeFile file(MY_RELEASE_STORE_FILE)
storePassword pass
keyAlias MY_RELEASE_KEY_ALIAS
keyPassword pass
}
}
}
android react-native apk
add a comment |
I'm currently building my first React Native app. I set up a release in Play Console for Internal Testing and was able to push my first signed apk. Since then, we've made bug fixes that are now merged into master. When I try to generate a new release by running:
cd android && ./gradlew assembleRelease
and upload as a new release, I don't see any of the new changes after updating my app via the Play Store.
I've tried running
react-native bundle --entry-file ./index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
before generating a new release, but I still don't see the changes.
Running react-native run-android while my device is hooked up with USB Debugging works fine, as well as in any emulator. I just can't figure out why my APK doesn't match the code generated on my local device.
Is there a step that I'm missing that's keeping my APK from representing the latest changes on master when I build?
Using React Native 0.56
Updated to add my Gradle Config:
// android/app/build.grade
signingConfigs {
release {
if(project.hasProperty('MY_RELEASE_STORE_FILE')) {
storeFile file(MY_RELEASE_STORE_FILE)
storePassword pass
keyAlias MY_RELEASE_KEY_ALIAS
keyPassword pass
}
}
}
android react-native apk
I'm currently building my first React Native app. I set up a release in Play Console for Internal Testing and was able to push my first signed apk. Since then, we've made bug fixes that are now merged into master. When I try to generate a new release by running:
cd android && ./gradlew assembleRelease
and upload as a new release, I don't see any of the new changes after updating my app via the Play Store.
I've tried running
react-native bundle --entry-file ./index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
before generating a new release, but I still don't see the changes.
Running react-native run-android while my device is hooked up with USB Debugging works fine, as well as in any emulator. I just can't figure out why my APK doesn't match the code generated on my local device.
Is there a step that I'm missing that's keeping my APK from representing the latest changes on master when I build?
Using React Native 0.56
Updated to add my Gradle Config:
// android/app/build.grade
signingConfigs {
release {
if(project.hasProperty('MY_RELEASE_STORE_FILE')) {
storeFile file(MY_RELEASE_STORE_FILE)
storePassword pass
keyAlias MY_RELEASE_KEY_ALIAS
keyPassword pass
}
}
}
android react-native apk
android react-native apk
edited Nov 14 '18 at 18:33
Jesse Martin
asked Nov 14 '18 at 5:00
Jesse MartinJesse Martin
316
316
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
you should update the build.gradle file under the app folder by placing this code under the defaultConfig
signingConfigs {
debug {
storeFile file('debug.keystore')
keyAlias 'androiddebugkey'
keyPassword 'android'
storePassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
Just like that and update your gradle.properties file with these properties
MYAPP_RELEASE_STORE_FILE="Key Store Name"
MYAPP_RELEASE_KEY_ALIAS="Key Store alias"
MYAPP_RELEASE_STORE_PASSWORD="Key Store Password"
MYAPP_RELEASE_KEY_PASSWORD="Key Password"
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed versionExecution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
add a comment |
Try to change
--entry-file ./index.js
to
--entry-file ./index.android.js
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
add a comment |
maybe its late but I hope this save someone :
It looks like you have to rebundle it whenever you add new module or asset
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293447%2freact-native-release-apk-doesnt-match-app-when-running-react-native-run-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
you should update the build.gradle file under the app folder by placing this code under the defaultConfig
signingConfigs {
debug {
storeFile file('debug.keystore')
keyAlias 'androiddebugkey'
keyPassword 'android'
storePassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
Just like that and update your gradle.properties file with these properties
MYAPP_RELEASE_STORE_FILE="Key Store Name"
MYAPP_RELEASE_KEY_ALIAS="Key Store alias"
MYAPP_RELEASE_STORE_PASSWORD="Key Store Password"
MYAPP_RELEASE_KEY_PASSWORD="Key Password"
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed versionExecution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
add a comment |
you should update the build.gradle file under the app folder by placing this code under the defaultConfig
signingConfigs {
debug {
storeFile file('debug.keystore')
keyAlias 'androiddebugkey'
keyPassword 'android'
storePassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
Just like that and update your gradle.properties file with these properties
MYAPP_RELEASE_STORE_FILE="Key Store Name"
MYAPP_RELEASE_KEY_ALIAS="Key Store alias"
MYAPP_RELEASE_STORE_PASSWORD="Key Store Password"
MYAPP_RELEASE_KEY_PASSWORD="Key Password"
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed versionExecution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
add a comment |
you should update the build.gradle file under the app folder by placing this code under the defaultConfig
signingConfigs {
debug {
storeFile file('debug.keystore')
keyAlias 'androiddebugkey'
keyPassword 'android'
storePassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
Just like that and update your gradle.properties file with these properties
MYAPP_RELEASE_STORE_FILE="Key Store Name"
MYAPP_RELEASE_KEY_ALIAS="Key Store alias"
MYAPP_RELEASE_STORE_PASSWORD="Key Store Password"
MYAPP_RELEASE_KEY_PASSWORD="Key Password"
you should update the build.gradle file under the app folder by placing this code under the defaultConfig
signingConfigs {
debug {
storeFile file('debug.keystore')
keyAlias 'androiddebugkey'
keyPassword 'android'
storePassword 'android'
}
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
Just like that and update your gradle.properties file with these properties
MYAPP_RELEASE_STORE_FILE="Key Store Name"
MYAPP_RELEASE_KEY_ALIAS="Key Store alias"
MYAPP_RELEASE_STORE_PASSWORD="Key Store Password"
MYAPP_RELEASE_KEY_PASSWORD="Key Password"
answered Nov 14 '18 at 8:44
Muhammad ArslanMuhammad Arslan
13
13
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed versionExecution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
add a comment |
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed versionExecution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed version
Execution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
Oh yes! I didn't have a debug keystore in my build.gradle file. I've added it now, but when I try to run react-native run-android, i'm getting an error that the signatures don't match previously installed version
Execution failed for task ':app:installDebug'. > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.noblr_android signatures do not match the previously installed version; ignoring!
– Jesse Martin
Nov 14 '18 at 18:34
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
I just had to uninstall the app from my emulator. This may be a dumb question, but now that I'm generating a debug apk, I can't upload it on the play console to distribute to my team that i've added as an internal test group. Is it possible to distribute debug apks to an internal test team? Or can I just increase versions of my release to continue rolling out to the internal test?
– Jesse Martin
Nov 14 '18 at 18:48
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
You have to increase the version of your release in order to distribute it online and generate release apk by following commands cd android then gradlew assembleRelease
– Muhammad Arslan
Nov 15 '18 at 10:22
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
I've done that as well. I'm able to upload the new generated apk with a new version code but when i update the app on my phone it either force stops or shows the outdated version. I'm updating version code as well as version name in my build.gradle file
– Jesse Martin
Nov 15 '18 at 18:40
add a comment |
Try to change
--entry-file ./index.js
to
--entry-file ./index.android.js
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
add a comment |
Try to change
--entry-file ./index.js
to
--entry-file ./index.android.js
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
add a comment |
Try to change
--entry-file ./index.js
to
--entry-file ./index.android.js
Try to change
--entry-file ./index.js
to
--entry-file ./index.android.js
answered Nov 14 '18 at 11:43
OnixOnix
4578
4578
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
add a comment |
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
From what I understand, index.android.js was used in earlier versions of React Native. I'm currently using 0.56 and my entry file is index.js
– Jesse Martin
Nov 14 '18 at 18:19
add a comment |
maybe its late but I hope this save someone :
It looks like you have to rebundle it whenever you add new module or asset
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
add a comment |
maybe its late but I hope this save someone :
It looks like you have to rebundle it whenever you add new module or asset
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
add a comment |
maybe its late but I hope this save someone :
It looks like you have to rebundle it whenever you add new module or asset
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
maybe its late but I hope this save someone :
It looks like you have to rebundle it whenever you add new module or asset
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
answered Dec 20 '18 at 5:44
Nico YangNico Yang
11
11
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53293447%2freact-native-release-apk-doesnt-match-app-when-running-react-native-run-android%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown