String type not allowed at android manifest.

AnoimusAnoimus USMember
edited June 2016 in Xamarin.Android

I'm currently working on an android project and I'm having this error.

Error APT0000: String types not allowed (at 'configChanges' with value 'density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|touchscreen|uiMode'). (APT0000)

My Xamarin Studio version is 6.0 and I've followed some solutions but to no avail, my current minSdkVersion is 13 and targetSdkVersion is 23.

Posts

  • YkshLeoYkshLeo USMember ✭✭✭✭

    You are making use of attribute layoutDirection in your manifest.

    It is introduced in API Level 17. I think that it's creating the error.

    Refer : https://developer.android.com/guide/topics/manifest/activity-element.html#config

  • AnoimusAnoimus USMember

    I've changed my minSDKVersion to 17 but it's still having the same error

  • YkshLeoYkshLeo USMember ✭✭✭✭

    Can you display your Manifest please. !

  • AnoimusAnoimus USMember

    I've realized removing density will not result in the error, but in another error ( C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error: java.lang.IllegalArgumentException: already added : Lcom/google/android/gms/auth/GoogleAuthUtil;)

  • AnoimusAnoimus USMember

    This is the part of the Manifest that the error is showing up at

     <activity android:alwaysRetainTaskState="true" android:configChanges="density|fontScale|keyboard|keyboardHidden|layoutDirection|locale|mcc|mnc|navigation|orientation|screenLayout|screenSize|touchscreen|uiMode" android:icon="@drawable/icon" android:label="Test" android:launchMode="singleTask" android:name="com.Testing.Test.MainActivity" android:screenOrientation="portrait">
          <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
          </intent-filter>
        </activity>
    
  • YkshLeoYkshLeo USMember ✭✭✭✭

    This error is due to referencing two same Android Libraries.


    Can't point out properly by not knowing your codes and full stack traces.

  • AnoimusAnoimus USMember

    Sorry, I'm quite new to Xamarin.
    Does having the same packages across different project cause this
    ( C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error: java.lang.IllegalArgumentException: already added : Lcom/google/android/gms/auth/GoogleAuthUtil;) error as well?

    I'm integrating the Facebook SDK into my game, which first I'm integrating into a different project that the Main Project is dependent on, but there would be thousands of errors like definition of xxx not found in xxx from the Main Project and only when I added the Facebook SDK into the Main Project all the definition errors would disappear.

  • AnoimusAnoimus USMember

    Okay, I'm not sure why, but when I added back the Density into the ConfigChanges, it does not show the String type not allowed Error anymore but still the same Java.lang.illegalArgumentException Error

  • Pyro76Pyro76 USMember

    I'm having the exact same problem since upgrading from Xamarin.Android 6.0.3.5 to 6.1.1.0. No code changes and our app no longer builds with the same error APT0000: String types not allowed (at 'configChanges' with value 'density|fontScale|keyboard.... I checked the generated AndroidManifest.xml file before and after, and with the older Xamarin installed, the file did NOT include the density property. Now it does, and it's failing with that error unless I comment out the following line of code:

    [Android.App.Activity( ... ConfigurationChanges= ... // Android.Content.PM.ConfigChanges.Density | ...

    I've tried every combination of Android SDK packages I can think of to get it building again, but no luck...anyone have any ideas, or is this a Xamarin regression?

  • Pyro76Pyro76 USMember

    Downgrading to Xamarin.Android 6.0.4.0 fixed this issue for me (and some deployment issues).

  • AnoimusAnoimus USMember

    @Pyro76 said:
    Downgrading to Xamarin.Android 6.0.4.0 fixed this issue for me (and some deployment issues).

    How do you downgrade Xamarin.Android? I'm currently using Xamarin Studio on Windows and could not find a way to downgrade it. All listed version of android for windows at the Xamarin Store is 4.xxx

  • AnoimusAnoimus USMember

    I checked the Xamarin.Android Release notes and its saying its 6.1.1 for the latest version, but the latest version I could download from my subcription/download is 4.1.1

Sign In or Register to comment.