Updating versionCode for Android PhoneGap app - phonegap-build

I have tried updating the config.xml file to include: versionCode="10002"
I've created a 'platforms/android/release-signing.properties' file and ran:
phonegap build --release android --versionCode=10002
Nothing seems to make the versionCode=10002 stick. How can I fix this?

I had tried it with both the "android-" prepended and without.
As well as with the parameters on separate lines rather than on the same line.
That did not help.
What did end up resolving it for me was creating a new PhoneGap Build app. That was created fine with the new version and I uploaded to the Google Play Store no problem. It seems to be a bug with PhoneGap's inability to update the version number. Too bad.

It should work if you add android-versionCode instead of just versionCode to the <widget> in config.xml.
For example:
<widget id="com.test.app"
version="1.2.3"
android-versionCode="10002">

Related

After I added Sentry to react-native project, apps deployed to itunes store crash (on Android or ios simulator it works fine)

I added react-native-sentry to a react-native project. I followed this manual: https://docs.sentry.io/clients/react-native/
Everything worked fine on Android and ios emulator. But when I tried to archive an app in xcode I got this error.
React native symbol handling failed
The Sentry build step failed while running in the background. You can ignore this error or view details to attempt to resolve it. Ignoring it might cause your crashes not to be handled properly.
If I click 'Show Details; I get this
error: EOF while parsing a value at line 1 column 0
I followed the advice from here https://github.com/getsentry/react-native-sentry/issues/135 and edited Build Phases > Upload Debug Symbols so now there is only this line there
export SENTRY_PROPERTIES=sentry.properties
The error still persisted. So I decided to ignore it. In this case after I upload the version to Itunesconnect and install it with a TestFlight it crashes immediately on start.
If I run it on a simulator or install it directly an iphone it works fine.
It also works fine on Android.
Could you give me any advice what can be done to make it work on Apple Store too?
For me this error was signaled by Xcode because of some problems when running the build scrips.
Using:
https://github.com/getsentry/sentry-react-native
#sentry/react-native": "^1.0.9
I fixed it keeping the index.ios.js always in the root folder (before that I had it in a src folder and trying to use a custom build script to take it from src)
I set the build scripts in Xcode to be similar to the ones from sentry docs:
Build RN code and images script:
// sentry properties file located in `ios` folder
export NODE_BINARY=node
export SENTRY_PROPERTIES=sentry.properties
../node_modules/#sentry/cli/bin/sentry-cli react-native xcode \
../node_modules/react-native/scripts/react-native-xcode.sh
Upload debug symbols script:
I have this script as the last one in Build Phases
export SENTRY_PROPERTIES=sentry.properties
../node_modules/#sentry/cli/bin/sentry-cli upload-dif
"$DWARF_DSYM_FOLDER_PATH"
Note:
1) I haven't tried yet to move sentry.properties file as common for both android and iOS, placed in root folder (with import ../sentry.properties in scripts) but I think that should work too.
2) I used the terminal to test directly the release build:
react-native run-ios --configuration Release --simulator "iPhone 8"
or
react-native run-ios --configuration Release --device "Your Device Name"
In my case the reason was a space included in the name of the hard disk I use to keep the Project, Derived Data and Archives. Looks like the Sentry CLI script doesn't like spaces in the path to the project and it crashes there.
It was enough to rename the disk and update paths to Derived Data and Archives and all is well now.

Phonegap build error for windows

I am trying to create a build for windows using here where as was following this same method till last week.
unfortunately today I am getting error as below,
Any suggestion please.
Don't use CLI if you are using Build.
Try to install the plugin again
cordova plugin add cordova-plugin-vibration
I had the same isue. I solved the problem that I had excluded all plugins from xml except on and then I tried to build. After every succesful build I include new plugin, then I came to the error.
You have wrong plugin for vibration in xour xml:
your plugin :
<plugin name="org.apache.cordova.vibration"/>
replace it with this:
<plugin name="org.apache.cordova.vibration" spec="0.3.13" source="pgb" />
Tell me if it works?
Regards, Ivan

NativeScript platform add error

I am trying to add the android platform to my NativeScript project. When I run tns platform add android I get the following error: Package name must look like: com.company.Name
Here is my environment:
tns version 2.0.0,
node version 4.4.3,
tns doctor returns No issues were detected
Package name in project.json: com.mycompany.myproject
The error message has the Name with capital N. However if I try to use Myproject, the regex (^[^A-Z] + $) applied to the name does not validate.
Any suggestions are greatly appreciated.
Thank you.
Try opening the AndroidManifest.xml located in app/App_Resources/Android and putting your package name there under the <manifest> tag. Then run tns build android and see what happens. This should run just fine. If not, you might try getting a new app and see if something isn't borked on that project elsewhere causing this issue to bubble up. Hope that helps :)

PushWoosh plugin: External repo not found in Phonegap Build (PGB)

I am using PGB (PhonegapBuild) and added pushwoosh plugin 3.4.5, it runs perfect since the app build but since last night, my build failed everytime, even i have not make any changes in config.xml or pushwoosh code. I am getting this error
Error - Plugin (or a specific plugin version) not found in external repo: com.pushwoosh.plugins.pushwoosh
Any one can help
Thanks
It looks like every time new version of the plugin is submitted, the old one disappears from plugins.cordova.io.
I'm not really sure how plugins.cordova.io works, doing search for pushwoosh plugin there displays version 3.4.9
http://plugins.cordova.io/#/search?search=pushwoosh
This is how you should add the plugin:
<gap:plugin name="com.pushwoosh.plugins.pushwoosh" source="plugins.cordova.io" />
Remove "version" attribute, it worked for me after.

How do I remove my old apk and publish an update on the Google play market?

How do I remove my old APK and publish an update on the Google play market? I have a published APK but I put something extra in my code. I have figured out how to un-publish my app, but how do I delete the old and upload new?I try to Deactivate and upload new...and send me a msg The new apk's versionCode (1) already exists....but i have modified the code and make new signed...if change the package name not accepted...I update the version code and name from manifest and fix it!
in the android menifest in your new APK change these two lines:
android:versionCode="the higher the number here, the newer the apk is to the android market- for ex. 2"
android:versionName="here is your version name- for ex. 1.0.2"
after that publish the apk
Also sign your export version .apk file with the same .keystore file::
Try to publish your new .apk file with manifest included ::#
<application
android:versionCode="2.0" //higher number than your previous version(1.0) so 2.0 --> new version > old version
android:versionName="2.0.0" //these version which would be display at Google Play Store
>
</application>

Resources