"Server could not process your apk" problem

After completing the development and the signing process of the application on which I'm working, I was trying to upload it in the Google Play. But I was getting this error
The server could not process your apk. Try again
After Googling for sometime, I came to know that this error arises when there is a problem in the manifest file included in the apk. From Android developer forums, I came to know that this problem is not happening only to me. Many developers are facing this problem.

In my case, the reason behind the problem was very peculiar. In my manifest file, one of my activities was declared like this


                <activity
            android:name=".views.user.ChangeEmailFormActivity"
            android:label="Change Email Address"
            android:theme="@android:style/Theme.Dialog" 
            android:icon="@android:drawable/ic_dialog_alert" >
      </activity>


This was creating the problem(?). In the above activity, I was trying to set an icon to it. The drawable file for the icon was from android standard icons and I was referencing the icon by @android:drawable/ic_dialog_alert

The problem is, when we upload the apk file to Google Play, it parses the manifest file and try to find the resources which are referenced from the manifest file. As I was referencing to a drawable which is found built in with android OS, that file was not in my res/drawable directory, So the parser failed to find the ic_dialog_alert file in the res/drawable directory and raised an error.

So, I just removed the android:icon property and it worked! 


        <activity
            android:name=".views.user.ChangeEmailFormActivity"
            android:label="Change Email Address"
            android:theme="@android:style/Theme.Dialog" >
      </activity>


Those who are facing this problem due to similar reason like me can try this. If this does not fix your problem, please knock the google play team. In my case, they helped me to find the problem. It's almost impossible for the developers to find the reason behind this error.

I don't know whether it's a bug or not. I think either android team should declare that no built in resource can be used in the manifest file or fix the problem. This problem is killing a lot of times of those who are facing this. They should at least say why we are facing this problem instead of just saying "The server could not process your apk. Try again"

Comments

Post a Comment

Popular posts from this blog

Run tasks in background in Spring

Conditional field inclusion in Jackson and Spring Boot

How to configure Wildfly 10 to use MySQL