Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LoaderManager reference not found with API Level 17

I am writing an android sample app and trying to create sample of listview using sample code from here. And it can't resolve LoaderManager. Any idea what could be wrong?

I am using eclipse toolkit with latest android sdk.

like image 572
mamu Avatar asked May 14 '13 15:05

mamu


1 Answers

The function LoaderManager you need to use in this example is only available from the API 17 :

http://developer.android.com/reference/android/app/LoaderManager.html

I guess you are using an API inferior to 17 so your project cannot find it.

In case you really need to use this function on older API versions, you can still have a try using the "support" version available in the support library:

http://developer.android.com/reference/android/support/v4/app/package-summary.html

Using this package you can import this LoaderManager class using:

import android.support.v4.app.LoaderManager;

Instead of:

import android.app.LoaderManager;
like image 167
Yoann Hercouet Avatar answered Sep 30 '22 20:09

Yoann Hercouet