Search code examples
androidcordovagoogle-playphonegap-buildphonegap-desktop-app

Play Store - Problems adding apk to the market


I used PhoneGap to create my application

Now I made a key.keystore and uploaded it to phonegap site as shown here

http://docs.build.phonegap.com/en_US/signing_signing-android.md.html

Now I downloaded app-release.apk and decompiled it using apk studio program to remove some permissions and recompiled it again.

The problem when I try to upload app-release.apk to the market it shows an Erorr

You uploaded an APK that is signed with a restricted certificate. You need to upload an APK signed with your own certificate.

I tried to resign the app again using this method

http://developer.android.com/tools/publishing/app-signing.html

and when i try to upload it to the market it shows that Error

Your APK has been signed with multiple certificates. Please only sign it with one certificate and upload it again.

Any Help plz ?

I have been searching web for 3days now :O :S !


Solution

  • The problem is somehow solved the mistake was

    when I change apk using apk studio to remove some permissions.

    So I gone along with this https://github.com/amirudin/build/wiki/Android-Signing

    and downloaded app-release.apk and uploaded it to the market and it worked

    however I still need to remove some permissions from the app :(

    any help how to do that whithout affecting apk ?!

    Edit:

    to customize app permisions u need to set theconfig.xml inside app folder like this example :

    <?xml version="1.0" encoding="UTF-8"?>
    	<widget xmlns = "http://www.w3.org/ns/widgets"
    		xmlns:gap = "http://phonegap.com/ns/1.0"
    		id        = "com.brilliantapp.seb7a2015"
    		versionCode="7"
    		version   = "1.2">
    		<name>Seb7a</name>
    		<description>
    seb7a app helps u calculate zekr		</description>
    		<author href="www.fb.com/DrOs96" email="Drusama2@gmail.com">
    Osama Soliman
    		</author>
    		<preference name="phonegap-version" value="3.7.0" />
    		<preference name="orientation" value="default" />
    		<preference name="fullscreen" value="false" />
    		<preference name="target-device" value="universal" />
    		<preference name="webviewbounce" value="true" />
    		<preference name="prerendered-icon" value="true" />
    		<preference name="stay-in-webview" value="true" />
    		<preference name="ios-statusbarstyle" value="default" />
    		<preference name="detect-data-types" value="true" />
    		<preference name="exit-on-suspend" value="false" />
    		<preference name="show-splash-screen-spinner" value="true" />
    		<preference name="auto-hide-splash-screen" value="true" />
    		<preference name="EnableViewportScale" value="true" />
    		<preference name="MediaPlaybackRequiresUserAction" value="false" />
    		<preference name="AllowInlineMediaPlayback" value="false" />
    		<preference name="BackupWebStorage" value="cloud" />
    		<preference name="TopActivityIndicator" value="gray" />
    		<preference name="KeyboardDisplayRequiresUserAction" value="false" />
    		<preference name="HideKeyboardFormAccessoryBar" value="false" />
    		<preference name="SuppressesIncrementalRendering" value="false" />
    		<preference name="android-minSdkVersion" value="10" />
    		<preference name="android-maxSdkVersion" value="21" />
    		<preference name="android-installLocation" value="auto" />
    		<preference name="SplashScreenDelay" value="5000" />
    		<preference name="ErrorUrl" value=""/>
    		<preference name="BackgroundColor" value="0x000000"/>
    		<preference name="KeepRunning" value="true"/>
    		<preference name="DisallowOverscroll" value="false"/>
    		<preference name="LoadingDialog" value=","/> 
    		<preference name="LoadUrlTimeoutValue" value="20000" />
    		<preference name="disable-cursor" value="false" />
    		<gap:platform name="android" />
    		<feature name="http://api.phonegap.com/1.0/notification"/>
    		<icon src="res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:density="ldpi" />
    		<icon src="res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:density="mdpi" />
    		<icon src="res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:density="hdpi" />
    		<icon src="res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:density="xhdpi" />
    		<icon src="res/icon/android/144.png" gap:platform="android" gap:density="xxhdpi" />
    		<icon src="res/icon/android/192.png" gap:platform="android" gap:density="xxxhdpi" />
    		<icon src="res/icon/android/64.png" />
    	</widget>

    And this is a very useful program http://configap.com/