Search code examples
androideclipsecordovaandroid-manifesthybrid-mobile-app

ERROR getting 'name' attribute: attribute is not a string value Hybrid Cordova App


I am new to Hybrid Android applications using Cordova and salesforce.

I have built a signed APK and ZipAligned it.

But when I am uploading it to app store it gives me following error:

enter image description here

Following is my Manifest file:

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="1.0.1" package="com.thehub.app" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
    <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="23" />
    <permission android:name="com.thehub.app.permission.C2D_MESSAGE" android:protectionLevel="signature" />
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_SERVICE" />
    <uses-permission android:name="com.thehub.app.permission.C2D_MESSAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />

    <application android:allowBackup="true" 
        android:hardwareAccelerated="true" 
        android:icon="@drawable/thehub" 
        android:label="@string/app_name" 
        android:manageSpaceActivity="com.salesforce.androidsdk.ui.ManageSpaceActivity" >
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" 
            android:label="@string/app_name" 
            android:launchMode="singleTop" 
            android:name="com.salesforce.androidsdk.ui.sfhybrid.SalesforceDroidGapActivity" 
            android:screenOrientation="portrait" 
            android:theme="@android:style/Theme.Black.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:label="@string/app_name" android:name="com.synconset.MultiImageChooserActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Holo.Light">
            <intent-filter />
        </activity>
        <activity android:exported="true" android:label="@string/app_name" android:name="com.plugin.gcm.PushHandlerActivity" android:screenOrientation="portrait" />
        <receiver android:name="com.plugin.gcm.CordovaGCMBroadcastReceiver" 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.thehub.app" />
            </intent-filter>
        </receiver>
        <service android:name="com.plugin.gcm.GCMIntentService" />
    </application>
</manifest>

I am not able to locate where in the Manifest file I am doing it wrong.

Any help is appreciated.

Thanks in advance.


Solution

  • Got the answer from this post

    http://salesforce.stackexchange.com/questions/69566/mobile-sdk-android-aapt-error
    

    In the SalesforceSDK plugin

    Just changed the

    android:name="@string/app_package"
    

    to

    android:name="com.salesforce.androidsdk"