0

I'm currently trying to integrate Helpshift with my Android app. I'm getting an error in Android studio when I try to add the uses sdk block of code to the manifest.

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"
        android:compileSDKVersion="26" android:buildToolsVersion="26" />

The error I'm getting is in the title. My code looks like this. Has anyone ever had an error like this before?

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.leoconnelly.connexus">

<application

    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26"
        android:compileSDKVersion="26" android:buildToolsVersion="26" />

    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>


    </activity>
    <activity android:name=".HealthCenterListActivity"/>
    <activity android:name=".HealthCenterSelectedActivity"/>
    <activity android:name=".MoreInfoActivity"/>






</application>



</manifest>
Grokify
  • 15,092
  • 6
  • 60
  • 81
Sam Wilson
  • 61
  • 8

1 Answers1

1

You have to put the <uses-sdk></uses-sdk> right before the <application> tag as direct child of the manifest. This should work:

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.leoconnelly.connexus">
   <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="26" android:compileSDKVersion="26" android:buildToolsVersion="26" />
   <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
      <activity android:name=".MainActivity">
         <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
         </intent-filter>
      </activity>
      <activity android:name=".HealthCenterListActivity" />
      <activity android:name=".HealthCenterSelectedActivity" />
      <activity android:name=".MoreInfoActivity" />
   </application>
</manifest>
Jorge
  • 179
  • 1
  • 2
  • 7