Upload APK, google store - different package name - android

I am receiving this error whenever I try to upload my project to google play. However, I recently did a refactor - rename on my project package - "com.mike.myapplication1_0". I cleaned and rebuilt the file but I am still getting this error. I also updated the Manifest file as well...
Here is my manifest -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.solomichael.myappppppp" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
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="com.solomichael.myappppppp.MyAndroidAppActivity"
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.solomichael.myappppppp.probability_act"
android:label="#string/title_activity_probability_act"
android:parentActivityName="com.solomichael.myappppppp.MyAndroidAppActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.michael.myandroidappactivity.MyAndroidAppActivity" />
</activity>
<activity
android:name="com.solomichael.myappppppp.showOldCards"
android:label="#string/title_activity_show_old_cards"
android:parentActivityName="com.solomichael.myappppppp.MyAndroidAppActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.michael.myandroidappactivity.MyAndroidAppActivity" />
</activity>
</application>

The package name should be unique (across google play store!) so it seems that someone else already used : com.example or com.mike.myapplication1_0 you'll have to choose another name!
Comment:
If you already have an app in the app-store and you change the package name and re-upload the apk - you lose all your current users (their app won't get updated!)

In the <meta-data> elements of two of your Activities you have attributes starting as follows...
android:value="com.example.
I'm not entirely sure why you have <meta-data> elements for those Activities but you either need to change the values to reflect your package name or simply delete the <meta-data> elements completely unless they're absolutely necessary.

Related

why always app has been rejected and wasn't published due to a policy violation:

I am trying to upload apk on playstore from few days. but now days its showing list of core functionality in deceleration form like SMS and call log.
but in our apk there is no use of such permissions. I am using Internet and Fine Location permission, but its not listed there. there is compulsion that we require to select atleast one permission.therefore I am selecting Default SMS handler.
even I search through many tools there is no SMS and call log permission is used in whole source code.
As I found many answer on google that Make sure your SMS permission is given in manifest and give the pop up in user level.
but there is no permission in my manifest.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.demmyname.com">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<!--<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />-->
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="com.demmyname.com.Classes.Application"
android:allowBackup="true"
tools:replace="android:allowBackup"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/icon"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning">
<activity android:name=".Activities.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="adjustPan" />
<activity android:name=".Activities.Activity_Login" />
<activity android:name=".Activities.Activity_SignUp" />
<activity android:name=".Activities.Activity_Forgot_Pwd" />
<activity android:name=".Activities.Activity_Profile" />
<activity android:name=".Activities.Activity_Change_Password" />
<service
android:name=".Services.AppLocationService"
android:enabled="true" />
<activity android:name=".Activities.Activity_Chnage_Location" />
<activity android:name=".Activities.Activity_Order_Delivary" />
<activity android:name=".Activities.Activity_Order_PichUp" />
<activity android:name=".Activities.Activityz_Hotel_Categories" />
<activity android:name=".Activities.Activity_Category_Items" />
<activity android:name=".Activities.Activity_Cart_List" />
<activity android:name=".Activities.Activity_Place_Order" />
<activity android:name=".Activities.Activity_MyOrders" />
<activity android:name=".Activities.Activity_About_Us" />
<activity android:name=".Activities.Activity_View_Offer"></activity>
<!--
<meta-data
android:name="io.fabric.ApiKey"
android:value="7aa3cad21d26b0edcfccea540b57016907999433"
/>
-->
<!-- <meta-data android:name="firebase_crash_collection_enabled" android:value="false" /> -->
<activity android:name=".Activities.Activity_PayUMoney"></activity>
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
</application>
</manifest>
I am looking for solution how to skip declaration form or without selecting core functionality.
To make sure if any other libraries are using the violated permissions, do the following...
In your Android Studio, open the manifest file and observe that in the below of the page 2 (two) Tabs are there =>
Text
Merged Manifest
Click on the Merged Manifest tab. Then search for the
uses-permission
Check that if it contains any call log or sms permissions (or other violated permissions).
If you find any use of the violated permissions like that, add the following line in your manifest under the
manifest tag
<uses-permission android:name="android.permission.READ_SMS" tools:node="remove" />
And for each and every violated permission add another line like the above with the appropriate permission tag.
Then rebuild the project and check that your merged manifest does not contain any violated permissions. After the confirmation generate signed APK and update your application in the Google Play console. (For now, check the do not meet the Google privacy policies in the declaration form).
After a successful update and around after 24 hours, recheck that the form (in Play console) exist or not. There should not be any form after a successful APK update.
You may want to update your APK again after the form disappears for a clear update.

implementing Ubers usebutton sdk and AndroidManifest.xml

I am trying to use the Uber usebutton but each time, it crashes giving the following error:
Unable to find explicit activity class {com.heyjude.heyjudeapp/com.usebutton.sdk.internal.GroupedInventoryCardActivity}; have you declared this activity in your AndroidManifest.xml?
I am unsure what to put in the AndroidManifest, currently as per the docs I have:
<meta-data
android:name="com.usebutton.applicationid"
android:value="app-myId" />
But it's clearly not working...
I have some more information, I checked the manifest-merger-debug-report.txt and found the following line
REJECTED from [com.usebutton:android-sdk:5.0.1] /Users/adamkatz/Projects/LavaLamp/Hey Jude/heyjudestudio/app/build/intermediates/exploded-aar/com.usebutton/android-sdk/5.0.1/AndroidManifest.xml:13:5-43:19
Why would the library manifest be rejected and how to make it accepted?
The maifest stuff maybe a red herring, your probably missing a library (The Uber library).
Here's a typical (working) AndroidMainfest.xml.
VERY important:
package="com.example.html2pdf"
replace with your package name (it's normally in your (local package) GroupedInventoryCardActivity.java file).
VERY important: Html2pdfActivity"
replace with one entry for activity for all your Activity files .GroupedInventoryCardActivity in your case (full path best package plus activity with dots (full stop's separating things, normally no slashes).
VERY VERY important:
com.heyjude.heyjudeapp/com.usebutton.sdk.internal.GroupedInventoryCardActivity is reffering to a library Activity (also with a package name the forward slash links the two packages). That's o.k.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.html2pdf"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.html2pdf.Html2pdfActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
So package (replace/change):
package="com.heyjude.heyjudeapp"
and (replace/change/insert) Activity (name):
<activity
android:name="com.heyjude.heyjudeapp/com.usebutton.sdk.internal.GroupedInventoryCardActivity"
Hope this helps and not make it more confusing ;O)
All that goes into the AndroidManifest.xml file is this:
<application
<activity
<!-- your activities -->
</activity>
<!--Button SDK-->
<meta-data android:name="com.usebutton.applicationid" android:value="YOUR_BUTTON_APP_ID"/>
</application>
Did you remember to replace "YOUR_BUTTON_APP_ID" with your Button app ID found in the dashboard?

Android Studio doesn't recognize MainActivity though declared in AndroidManifest.xml

After pausing with work on an Android Studio project for a while, and then coming back and adding it to SVN, I can't get the project to run anymore; it seems to me that the original AndroidManifest.xml was probably lost due to a lack of proper "SVN ignore" rules, and as I created a new Android Studio project on a new machine, updated it from SVN and later commited (and also unfortunately already updated on the other machine I work on), it seems that SVN used the newer manifest file and maybe other files needed for a proper build of the project.
Besides the fact that in the current manifest file, there are several activites missing that I'll have to try to reconstruct there, I now have the problem that I always get the "Default Activity not found" error when trying to build. When I set it to .MainActivity (which is absolutely present in app/src/main/java/com.example.bla.logintest) it says "The activity 'MainActivity' is not declared in AndroidManifest.xml" and thus doesn't compile.
My manifest file now looks like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bla.logintest" >
<uses-permission android:name="android.permission.READ_PHONE_STATE">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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" />
</intent-filter>
</activity>
<activity
android:name=".EditDB"
android:label="#string/title_activity_edit_diags"
android:parentActivityName=".MenuActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.bla.logintest.MenuActivity" />
</activity>
<activity
android:name=".EditAnswers"
android:label="#string/title_activity_edit_questions"
android:parentActivityName=".MenuActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.bla.logintest.MenuActivity" />
</activity>
</application>
</uses-permission>
</manifest>
Note: I already tried the solutions in [this similar question][1].
[1]: Default Activity not found in Android Studio "this similar question". Rebuilding and invalidating the cache doesn't get me anywhere. I also added
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
}
to my build.gradle, and this also didn't change anything.
I am aware that the parent to the other 2 activities is still missing and wanted to work on that problem next, but first wanted to have a working default activity.
Do you have any suggestions what I could try? I'm using Android Studio 1.3.2.
This should solve your problem.
You shouldn't write the tag inside the tag.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.bla.logintest" >
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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" />
</intent-filter>
</activity>
<activity
android:name=".EditDB"
android:label="#string/title_activity_edit_diags"
android:parentActivityName=".MenuActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.bla.logintest.MenuActivity" />
</activity>
<activity
android:name=".EditAnswers"
android:label="#string/title_activity_edit_questions"
android:parentActivityName=".MenuActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.bla.logintest.MenuActivity" />
</activity>
</application>
</manifest>

Can't install APK correctly on device

I have built & sign my apk by Eclipse ADT as it is describes (export and sign by creating a new key). But it can't be install on real device while an errors occurs, such as "installer package error". I have no Android device & sent my apk to friends by email. I'm using AVD and everyth is fine with it. Any suggestions? Thanx guys.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.XXXX.YYYY"
android:versionCode="0"
android:versionName="0.9.2" android:installLocation="internalOnly">
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
android:permission="android.permission.INTERNET"
android:allowBackup="true">
<activity
android:name="com.XXXX.YYYY.ActivityMain"
android:label="#string/main_activity_title"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.XXXX.YYYY.ActivityDetails"
android:parentActivityName="com.XXXX.YYYY.ActivityMain"
android:excludeFromRecents="true"
android:configChanges="orientation|screenSize">
</activity>
</application></manifest>
UPD: apk installs good, but the error occurs if choose Open (see screenshot). After that app works fine. But on tablet if try open app it says "App deleted".
UPD2: add supporting API 4+ meta tag for the 2nd activity, but it takes no effect
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.XXXX.YYYY.ActivityMain" />
You probably need to make sure your device and your friend's devices can install apps that are not from the play store.
This is a feature you have to specifically set, or else apps that are outside the play store will not install.
Here is how to set it:
Open settings
Find the Security settings (Pre 4.0 it is under Applications)
Look for a setting that says Unknown sources, or non-market apps
Enable that setting
Everything should work after that!
Here is an article with pictures if you are still confused :)
Your example was missing the closing </manifest> and android:enabled. I'm not sure if the latter would prevent a device from fully installing it but the first one would.
I've also had issues using the full activity names in the past, so you may want to try using simplifying them to see if it helps.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.XXXX.YYYY"
android:versionCode="0"
android:versionName="0.9.2" android:installLocation="internalOnly">
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
android:allowBackup="true">
<activity
android:name=".ActivityMain"
android:label="#string/main_activity_title"
android:enabled="true"
android:permission="android.permission.INTERNET"
android:launchMode="singleTop" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ActivityDetails"
android:parentActivityName=".ActivityMain"
android:excludeFromRecents="true"
android:configChanges="orientation|screenSize">
</activity>
</application>
</manifest>
Is "Unknown sources" option under "security" allowed on device?
My problem was a duplicate internet permission request on Manifest! When I remove that from activity app was run normally.

Android app is shown as not compatible in play store

I have published a new update of my App. After publishing it got a warning like "Warning: Your active APK supports less devices then the previous APK. Some users won't get the update."
So i've compared the details of the current and the prior APK. There is only one difference: The new one has the additional entry "Native Platform: simple-xml.2.6.9.jar".
Do you think that there is a problem with it? Acutally i've intergrated the .jar into my android project.
Additionally, the developer console shows me that the app is now compatible with 0 devices... if i search for a certain device i get a notice that it's because of my manifest settings.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.kit.aifb.nukit"
android:versionCode="8"
android:versionName="#string/app_versionName" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="17" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.KIT.Styled"
android:allowBackup="true" >
<activity
android:name="edu.kit.aifb.nukit.gui.SplashScreenActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.Sherlock.Light.NoActionBar"
android:clearTaskOnLaunch="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="edu.kit.aifb.nukit.gui.ChooseCourseActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.QuestioningAndVotingActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.AnswerQuestionActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.ShowResultsActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.ImpressumActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.LicensesActivity"
android:screenOrientation="portrait"
android:hardwareAccelerated="false"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.survey.SurveyListActivity"
android:screenOrientation="portrait"></activity>
<activity
android:name="edu.kit.aifb.nukit.gui.survey.QuestionActivity"
android:screenOrientation="portrait"
android:parentActivityName=".SurveyListActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SurveyListActivity" />
</activity>
<activity
android:name="edu.kit.aifb.nukit.gui.survey.SurveyResultsActivity"
android:label="SurveyResultsActivity"
android:parentActivityName=".SurveyListActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".SurveyListActivity" />
</activity>
</application>
if i install the apk directly on my device, it works fine.
This should probably be due to changes done in your Android Manifest relating to max and min sdk versions
<uses-sdk android:minSdkVersion="integer"
android:targetSdkVersion="integer"
android:maxSdkVersion="integer" />
If this SDK version range has been altered, your new updated app might support lesser number of devices.
Alright, i fixed it.
The problem was that actualy only the SurveyLib.jar is using simple-xml-2.6.9.jar and the simplexml.jar was included within the SurveyLib.jar. So i think there was a problem dexing the simplexml.jar within surveylib.jar.
i've created the surveylib.jar again without simplexml.jar but included the simplexml.jar to the libs folder of my app.
now it works fine. thanks to you all for your help.

Categories

Resources