updating sencha touch 2 android app - android

I am trying to submit a update to the google play store for my sencha touch 2 app.
the following is my packager.json file.
{
"applicationName":"DBS",
"applicationId":"com.keshav.dbs",
"versionCode":"2",
"versionString":"1.0.1",
"iconName":"ic_launcher.png",
"inputPath":"./build/package/Android",
"outputPath":"./build/native/Android",
"configuration":"Release",
"platform":"Android",
"deviceType":"Universal",
"certificatePath":"/Developer/Android-Keystore/myAndroidKeyStore",
"certificateAlias":"myandroidkey",
"certificatePassword":"<password>",
"sdkPath":"/Developer/sdks/android-sdk-macosx",
"androidAPILevel":"16",
"orientations": [
"portrait"
]
}
I run the following command
sencha package run packager.json
this creates the apk file however when i try to upload the new apk i get a message saying the versonCode 1 is already in use.
The instruction of packaging on Senchas website dont include the "versionCode" property I added that my self
Does anyone know how to change the version code for sencha app?

I was able to edit platforms/cordova/android/AndroidManifest.xml and update the android:versionCode, then run sencha app build native
It built the new APK (signed, based on my config) and it was accepted by the Google Play store.
Much easier than un-packaging and repackaging.

well here it is ...
After looking around the internet i found this approach works....
After Sencah creates the package use apktool to un-package the apk then edit the AndroidManifest.xml and package it up again with apktool.
Note when you re-package the app tit will be unsigned so you will have to sign it again for it install on peoples devices

Related

CodePush - Releasing an iOS bundle breaks Android and vice versa

Using react-native-code-push.
Whenever I release an iOS version (using code-push release-react ... ios), it breaks my Android code push. Next time I try to get an update I get the following error:
You attempted to set the key isPending with the value true on an
object that is meant to be immutable and has been frozen.
Then, if I release an Android version, it breaks my iOS, getting this error:
Update is invalid - A JS bundle file named "main.jsbundle" could not
be found within the downloaded contents. Please ensure that your app
is syncing with the correct deployment and that you are releasing your
CodePush updates using the exact same JS bundle file name that was
shipped with your app's binary.
It's very strange and the documentation doesn't say anything about collisions between the two platforms.
You need to setup an app for each platform
code-push app add [name]-ios
code-push app add [name]-android
i think the code-push release-react [app-name] [platform] ... the platform argument only tells the react-native bundler what entry file to use (index.ios.js or index.android.js) it doesnt work as "install only on ios"

Android - Cordova version code issue

This is quite a weird one.
Basically, I decided to switch from using trigger.io to using cordova to build and compile my app (using ionic framework).
Everything is fine if I build an unsigned and unaligned app, but for production I have to sign and align the apk in order to upload it on the play store.
I have signed and aligned the apk properly, but when I tried to upload the apk, I got this error:
Your APK version code needs to be greater than 1457108319
Now, I read a couple of answers here on stack overflow saying that I just need to add this line in my project config.xml file:
<widget id="com.***********" android-versionCode="1457108319" version="5.0.0"
but the problem is that if I had this line of code, then gradle fails and I get this error:
Error: Error code 1 for command: cmd with args:
/s,/c,"c:\src\app-v5\platforms\android\gradlew cdvBuildRelease -b
c:\src\app-v5\platforms\android\build.gradle -Dorg.gradle.daemon=true
-Pandroid.useDeprecatedNdk=true"
Hovewer, if I change the versionCode to a 6 digit code instead of 10, I get no error, but again, I can't upload it to the store because the versionCode number is less than the app already released.
How can I solve this? I really have no idea what to do.
Thanks a lot
I actually resolved this. I had to add to my config.xml file the following (in <widget>, right after version):
android-versionCode="{this needs to be replaced, in my case, by the
current timestamp "
The downside is that I have to remember to put the new timestamp everytime for now.
I will, at some point, write some kind of script to do this for me.
Hope this helps someone
I had the same problem since updating to latest Cordova CLI (6.3.1) and latest android platform for cordova (5.2.2).
My old build had the following:
versionCode: 69000
from the config.xml file:
My new buid:
versionCode: 7000
from the config.xml file:
so when I upload the signed APK to the PlayStore I get the same error you had:
the problem is that 7000 is < to 69000
The issue comes from the gradle script (in platforms/android/build.gradle) which from what I understand generates the versionCode from what he finds in your config.xml.
Looks like it is missing some multiplication by 100 somewhere:
so far here is what can be done:
1: instead of using 0.70 as version number use 0.700
2: specify the versionCode in the config.xml file :
it worked for me in both cases.
Hope it helps.

Where is APK file after "phonegap build android" command?

After "phonegap build android" command,i searched .apk file on D:\firstapp\platforms\android\ant-build but i found only the CordovaApp-debug.apk and CordovaApp-debug-unaligned.apk file...
where can i get my .apk file, Also my app name if firstapp, still only CordovaApp-debug.apk file found..
Actually i'm new to phonegap, help me...
You found the right apk. Cordova is the new name for Phone Gap. CordovaApp-debug.apk is your apk. The -debug part means that it was signed with the default debug key.
You need to sign it with your own key when you upload the apk to Google Play. But for now, you can use the current apk you have to test it on your own device, or on your friends devices.
Cordova has changed name fixed to CordovaApp to avoid issues with unicode app name (https://issues.apache.org/jira/browse/CB-6511)
If your application name is normal (A..z) you can revert this behaviour by changine line 217 of C:\Users\.cordova\lib\npm_cache\cordova-android\3.6.4\package\bin\lib
from:
var safe_activity_name = "CordovaApp"
to:
var safe_activity_name = project_name.replace(/\W/g, '');
CordovaApp-debug.apk is your .apk, cordova will not generate apk with your application name. It will be "CordovaApp-debug.apk"

How to make a signed APK in Sencha Touch 2

Dear All,
I have successfully made an application using Sencha touch 2 it's
working fine in my Android device, also on Tablet and emulator. But
the problem is that the apk file could not be uploaded on Android Market it shows
me a error:
.apk is not signed also validity year 50 Error in Google market -:
Google Play does not accept apks signed with the debug certificate.
Create a new certificate that is valid for at least 50 years.
I have changed my certificate also "configuration":"Release"
but not get any success. Dear i am also sharing my whole configuration
file. If you find any of the error inside the configuration file
please let me know about it. Any of the suggestion is appreciated.
Thank in advance.
Code in Configuration file is that-:
{
"applicationName":"navi",
"applicationId":"com.amit.navi",
"versionString":"1.0",
"iconName":"resources/icons/Icon~ipad.png",
"inputPath":"build/native",
"outputPath":"build/",
"configuration":"Release",
"platform":"Android",
"deviceType":"Universal",
"certificatePath":"C:/Documents and Settings/amit/.android/amit.keystore",
"certificateAlias":"alias_name",
"sdkPath":"C:/android-sdk",
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
Here is a guide to creating a key to sign your apk with.
You have currently signed your app with a debug key and need to generate a new one using keytool (java tool) then sign your apk with that.
Sencha guide: http://docs.sencha.com/touch/2-0/#!/guide/native_android
Keytool guide: http://developer.android.com/tools/publishing/app-signing.html
the keytool is in your java directory

Creating an android app with Sencha Touch 2 builder

I'm attempting to build an app using the Sencha Touch 2 builder tools. I have a basic app, I just want to test out creating an app so I can do it when I need to.
I've got the sencha tools, the android SDK etc
I've got to the point when you run
sencha package build <configfile.json>
in the command line. After several tries I've got to the point where it seems to accept the command, but it doesn't DO anything, doesn't create an app, doesn't display anything in command line, nothing.
I believe I'm missing something but can't think what.
This is my config file:
{
"applicationName":"Test_app",
"applicationId":"com.testing.test_App",
"versionString":"1.0",
"iconName:":"resources\icons\Icon.png",
"inputPath":"\",
"outputPath":"C:\Users\rc\Android Development\Completed Apps",
"configuration":"Debug",
"platform":"Android",
"deviceType":"Universal",
"certificatePath":"C:\Users\rc\Android Development\Keystore\Test App\my-release-key.keystore",
"certificateAlias":"Test_app",
"sdkPath":"C:\Program Files\Android\android-sdk",
"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}
I managed to solve this by using the following command instead:
sencha app build native
I will continue to look at the original way to understand it didn't work but this does work for now.
Your config file looks OK to me.
It can take a very long time for that command to respond - many minutes, on my machine here. It seems to buffer all its output until it completes. You can tell whether it really is doing something or not by watching the contents of the output path: you should see files and folders being created and destroyed.

Categories

Resources