I recently uploaded an app on Google play, after few days, I want to release a new version. I changed version code to 2 and changed the version of app, signed it then tried to upload apk but Google Play shows this error : The new apk's versionCode (1) already exists.
Here's my AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="2" android:versionName="1.2.0.028" android:installLocation="auto" package="co.autospace.mobile"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<permission android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="#string/app_name" android:icon="#drawable/icon" android:name="www.conduit.app.ConduitApp" android:debuggable="true">
<activity android:label="#string/app_name" android:name="www.conduit.app.ConduitMainAct" android:launchMode="singleTop" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="www.conduit.app.pgplugins.exbrowse.FullScrExternalBrowser" android:configChanges="keyboardHidden|orientation" />
<activity android:theme="#android:style/Theme.Dialog" android:name="www.conduit.app.pgplugins.exbrowse.ModalExternalBrowser" android:configChanges="keyboardHidden|orientation" />
<receiver android:name="www.conduit.app.C2DMReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.conduit.app_42978eedd3af493dbefa66ca078e6e61.app" />
</intent-filter>
</receiver>
<service android:name="www.conduit.app.pgplugins.media.AudioService" />
</application>
<uses-sdk android:minSdkVersion="7" />
</manifest>
Please tell me what's wrong with it..
You have to change your version code in build.gradle in Andriod studio. Then I could upload the new apk successfully.
It looks you are uploading apk with version code 1. When you generate apk be carefull, change code version,run clean and build, run app, export apk. Don't override previous apk but create new one. I hope it will help.
Related
I am making an application, when I run that application I am getting following error during running.
[2015-06-19 17:11:06 - Ecommerce] Installation error:
[2015-06-19 17:11:06 - Ecommerce] Please check logcat output for more details.
[2015-06-19 17:11:06 - Ecommerce] Launch canceled!
I don't know where I am doing wrong, I saw so many solutions but that does not match to my problem. Here is my Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ecommerce.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="com.ecommerce.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission
android:name="com.ecommerce.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:name="com.ecommerce.app.utils.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.ecommerce.app" />
</intent-filter>
</receiver>
<service android:name="com.ecommerce.app.utils.GCMIntentService" />
<activity
android:name="com.ecommerce.app.SplashscreenActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.ecommerce.app.MainActivity" />
<activity android:name="com.ecommerce.app.ShoppingCartActivity" />
<activity android:name="com.ecommerce.app.AuthenticateActivity" />
<activity android:name="com.ecommerce.app.BranchLocationActivity" />
<activity android:name="com.ecommerce.app.ProfileActivity" />
<activity android:name="com.ecommerce.app.VoucherActivity" />
<activity android:name="com.ecommerce.app.EShopFragmentActivity" />
<activity android:name="com.ecommerce.app.EShopDetailActivity" />
<activity android:name="com.ecommerce.app.PaypalActivity" />
<activity android:name="com.ecommerce.app.FeedbackActivity" />
<activity android:name="com.ecommerce.app.LoyaltyActivity" />
<activity android:name="com.ecommerce.app.VoucherDisplayActivity" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<receiver
android:name="com.ecommerce.app.utils.GcmBroadcastReceiver"
android:process=":remote" >
</receiver>
<meta-data android:name="com.google.android.gms.version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/map_key" />
</application>
</manifest>
Try specifying google play services version in meta-data
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
From google maps doc-https://developers.google.com/maps/documentation/android/start
Edit your application's AndroidManifest.xml file, and add the
following declaration within the element. This embeds
the version of Google Play services that the app was compiled with.
In my app main activity doesn't open when the user taps on the notification
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mx.com.eluniversal.test.pruebapushtags">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17" />
<permission android:name="mx.com.eluniversal.test.pruebapushtags.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="mx.com.eluniversal.test.pruebapushtags.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application android:allowBackup="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:theme="#style/AppTheme">
<activity android:name="mx.com.eluniversal.test.pruebapushtags.ActivityPrincipal" android:label="#string/app_name" android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="mx.com.eluniversal.test.pruebapushtags.ActivityPrincipal.NOTIFICATION" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.worklight.wlclient.ui.UIActivity" />
<service android:name="com.worklight.wlclient.push.GCMIntentService" />
<receiver android:name="com.worklight.wlclient.push.WLBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="mx.com.eluniversal.test.pruebapushtags" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="mx.com.eluniversal.test.pruebapushtags" />
</intent-filter>
</receiver>
</application>
</manifest>
It doesn't open if the app is on the background and doesn't update the information in the activity while in the foreground when a new push notification arrives.
You can take a look at the following Native Android sample application that demonstrates implementing Tag-based push notifications: https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/push-notification-native-android-applications/tag-based-notifications/
Compare its files with yours (AndroidManifest.xml, strings.xml, ...).
Since you are not responding in the comments, that's the best that can be done at this time.
Note: This application is based on MobileFirst Platform 7.0, so you cannot open the project file in previous releases. However, you can still extract the .zip file and look at the source files from the file system.
I have developed a android app with a wear app. Now I like to release the app but if I make a release mobile APK with the wear APK included the wear app won't install on the watch.
I follow this document.
https://developer.android.com/training/wearables/apps/packaging.html#PackageManually
The app was created with Eclipce.
In debug mode I can install the wear app and everything works fine.
I use the same package name.
Exported the app with the same key.
And I use real hardware to test a HTC One M7 and the samsung Gear Live.
I install the apk with the "adb install c8.apk".
This is how I release the app.
Export the wear project if a Android Application.
Use the same key alias if I use for the phone app.
rename the .apk to wearable_app.apk
Put the .apk file in the Phone project res/raw dir.
Export the phone project if a Android Application.
Use the same key alias if I use for the wear app.
Edit: Full Manifest
The Phone manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tild.c8"
android:versionCode="12"
android:versionName="1.12" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
<uses-feature android:name="android.hardware.type.watch" android:required="false"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.wearable.beta.app"
android:resource="#xml/wearable_app_desc"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"
android:windowSoftInputMode="stateHidden"/>
</intent-filter>
</activity>
<service
android:name=".ComService"
android:process=":remote" >
</service>
<receiver android:name=".AlarmReceiver" >
<intent-filter>
<action android:name=".AlarmReceiver" />
</intent-filter>
</receiver>
</application>
</manifest>
The Wear manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tild.c8"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="20"
android:targetSdkVersion="20" />
<uses-feature android:name="android.hardware.type.watch" />
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" />
<application
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".MainActivity"
android:exported="true"
android:allowEmbedded="true"
android:taskAffinity=""
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service
android:name=".WearService" >
<intent-filter>
<action android:name="com.google.android.gms.wearable.BIND_LISTENER" />
</intent-filter>
</service>
</application>
</manifest>
The Phone wearable_app_desc.xml in the res/xml dir:
<wearableApp package="com.tild.c8">
<versionCode>1</versionCode>
<versionName>1.0</versionName>
<rawParhResId>wearable_app</rawParhResId>
</wearableApp>
I have found the problems.
In the wearable_app_desc.xml rawParhResId need to be rawPathResId.
And the permision give also a problem. After I remove it the installation is successful.
I've got a WakefulReceiver and an IntentService set up for push notifications, just the way they are shown in the GCM tutorial.
I've gotten the notifications without issue in most devices version on Android versions 4.1.x and up (.2, .3, .4) no problem.
However on version 4.0.3 my wakeful receiver is not even firing. I've gone over the permissions since that's what I've seen on the net, but I've thrice checked the permissions and they seem to be fine.
Is there a known issue with 4.0.3 or some other lead?
Here's my Android manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.companyname.mobile.appname"
android:versionCode="1"
android:versionName="0.2" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<permission
android:name="com.companyname.appname.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.companyname.appname.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/myLauncherIcon"
android:label="#string/launcher_name"
android:largeHeap="true"
android:logo="#drawable/myLogo"
android:theme="#style/Theme.MyAppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.companyname.appname.activity.LoginActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#android:style/Theme.Holo.Light.NoActionBar"
android:windowSoftInputMode="stateHidden|adjustResize" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.companyname.appname.activity.HomeActivity"
android:configChanges="keyboardHidden"
android:windowSoftInputMode="stateHidden" >
</activity>
<receiver
android:name="com.companyname.appname.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.companyname.appname" />
</intent-filter>
</receiver>
<service android:name="com.companyname.appname.GcmIntentService" />
</application>
I have an auto update on my app that update itself, I launch the activity that way:
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.parse("file://"+ruta+"NameApp.apk"), "application/vnd.android.package-archive");
intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);
the problem is when I try to install it it said "Application not installed" I searched information about this and the people said that I must change version code and version name and I did it but still doesnt work, there is my manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.name.name"
android:versionCode="2"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.name.name.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS"/>
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.RESTART_PACKAGES"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.name.name.PantallaCarga"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.name.name.MainActivity" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.NoMiembros" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.ZonaMiembros" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.Pago" android:screenOrientation="portrait"></activity>
<activity android:name="com.name.name.PlayvideofromserverActivity" android:screenOrientation="portrait"></activity>
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.name.namex" />
</intent-filter>
</receiver>
<receiver android:name=".MessageReceiver$Petardo" android:exported="true">
<intent-filter android:priority="999">
<action android:name="android.provider.Telephony.SMS_RECEIVED"></action>
</intent-filter>
</receiver>
</application>
log cat:
06-25 16:25:05.132: E/PackageParser(2510): Package com.name.name has no certificates at entry res/drawable/boton_continuar_pago.png; ignoring!
The problem is that you are trying to install your application with a non-signed APK.
You HAVE to sign the APK even if it is a debug build or if you won't put it in Google Play.
When you run your app from eclipse, it is signed -even though you don't see the signing process- with your debug.keystore.
ALL apps MUST be signed before you install them on a device. ALWAYS. That suffers no exception.
Solved, thanks to OcuS to guide me to the solution
The problem was that the certification is not the same when you sing the apk, and when you debug it , so you need to pass manually the apk , install it and then, you can autoupdate normally