Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Mobile Development
  3. Android
  4. Class requires API level 11 (current min is 8)

Class requires API level 11 (current min is 8)

Scheduled Pinned Locked Moved Android
androidcomjsonhelpannouncement
3 Posts 3 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    Hi, I am new to Android Stuio. I created a project with the default setting and the added a fragment layout then fragment class I am now getting the following error: Class requires API level 11 (current min is 8) on this line: public class WeatherFragment extends Fragment { here is my import:

    import android.app.Activity;
    import android.support.v7.app.ActionBarActivity;
    import android.support.v7.app.ActionBar;;
    import android.support.v4.app.FragmentManager;
    import android.content.Context;
    import android.os.Build;
    import android.os.Bundle;
    import android.view.Gravity;
    import android.view.LayoutInflater;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.View;
    import android.view.ViewGroup;
    import android.support.v4.widget.DrawerLayout;
    import android.widget.ArrayAdapter;
    import android.widget.TextView;
    import android.app.Fragment;
    import android.support.v4.app.ListFragment;
    

    and this is my Manifest:

    Technology News @ www.JassimRahma.com

    P R 2 Replies Last reply
    0
    • J Jassim Rahma

      Hi, I am new to Android Stuio. I created a project with the default setting and the added a fragment layout then fragment class I am now getting the following error: Class requires API level 11 (current min is 8) on this line: public class WeatherFragment extends Fragment { here is my import:

      import android.app.Activity;
      import android.support.v7.app.ActionBarActivity;
      import android.support.v7.app.ActionBar;;
      import android.support.v4.app.FragmentManager;
      import android.content.Context;
      import android.os.Build;
      import android.os.Bundle;
      import android.view.Gravity;
      import android.view.LayoutInflater;
      import android.view.Menu;
      import android.view.MenuItem;
      import android.view.View;
      import android.view.ViewGroup;
      import android.support.v4.widget.DrawerLayout;
      import android.widget.ArrayAdapter;
      import android.widget.TextView;
      import android.app.Fragment;
      import android.support.v4.app.ListFragment;
      

      and this is my Manifest:

      Technology News @ www.JassimRahma.com

      P Offline
      P Offline
      Peter Leow
      wrote on last edited by
      #2

      Android introduced fragments in Android 3.0 (API level 11), you have to include this users-sdk inside the manifest file

      <manifest>
      <uses-sdk android:minSdkVersion="11" />
      ...
      </manifest>

      Refer: 1. android-fragments[^] 2. manifest-uses-sdk-element[^]

      1 Reply Last reply
      0
      • J Jassim Rahma

        Hi, I am new to Android Stuio. I created a project with the default setting and the added a fragment layout then fragment class I am now getting the following error: Class requires API level 11 (current min is 8) on this line: public class WeatherFragment extends Fragment { here is my import:

        import android.app.Activity;
        import android.support.v7.app.ActionBarActivity;
        import android.support.v7.app.ActionBar;;
        import android.support.v4.app.FragmentManager;
        import android.content.Context;
        import android.os.Build;
        import android.os.Bundle;
        import android.view.Gravity;
        import android.view.LayoutInflater;
        import android.view.Menu;
        import android.view.MenuItem;
        import android.view.View;
        import android.view.ViewGroup;
        import android.support.v4.widget.DrawerLayout;
        import android.widget.ArrayAdapter;
        import android.widget.TextView;
        import android.app.Fragment;
        import android.support.v4.app.ListFragment;
        

        and this is my Manifest:

        Technology News @ www.JassimRahma.com

        R Offline
        R Offline
        Rafique Android Developer
        wrote on last edited by
        #3

        Go to Android manifest file and Change API level

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups