Forum Xamarin.Android

Binary XML file line #1: Error inflating class uses-permission

EricGEricG GBMember
edited March 2015 in Xamarin.Android

Does anyone know why i am getting the error above when i run a piece of code to check if bluetooth is enabled in an android device?
The error occurs under 'SetContentView (Resource.Layout.Main);'

here is my axml file

<?xml version="1.0" encoding="utf-8"?>



  • EricGEricG GBMember
    edited March 2015

    Seems parts of my xml file are not visible but its basically a linear layout with on button and the two lines above included to access bluetooth

  • CheesebaronCheesebaron DKInsider, University mod

    Paste the AXML code, mark it, and press the C button in the editor.

  • EricGEricG GBMember
    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android=""
            android:label="BLUETOOTH" />
            android:name="android.permission.BLUETOOTH_ADMIN" />
            android:name="android.permission.BLUETOOTH" />
            android:name="android.permission.BLUETOOTH_ADMIN" />
            android:text="Blue" />
  • EricGEricG GBMember

    Thanks for the hint Cheesebaron, Could you help me withe the error, perhaps i havent used the permissions correctly ?

  • EricGEricG GBMember

    Oh i just fixed the error.
    Instead of using permissions in axml manifest i just included the permissions in Xamarin IDE as follows;
    Project-project options-Android application-Required permissions.
    i just tiked bluetooth and bluetooth admin under required permisions

Sign In or Register to comment.