Question

I got a problem with this code.

if (Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.FROYO){
    DevicePolicyManager mDPM;
    mDPM = (DevicePolicyManager)context_.getSystemService(Context.DEVICE_POLICY_SERVICE);
    mDPM.wipeData(0);
}

the errors are: FROYO can not be resolved or is not a filed in line 1

and DEVICE_POLICY_SERVICE can not be resolved or is not a filed in line 3

I've got a problems with my Librarys before, they wont find by eclipse.

For some tests i import my hole projects to another PC and there it works. Our Admin told me to create a new local user in Windows and also imoprt it there with a new Workspace, it also works.

I swiched my PC-User the a new one and Import all my projects, but now i got this error for one of them.

I also find this in Problems:

The method removeActiveAdmin(ComponentName) is undefined for the type DevicePolicyManager

thank you for your help.

Was it helpful?

Solution

I'am able to fix it, it looks like that my eclipse lost the connection to the ADT plugin. It cant use functions for API 8 or higher.

After the reinstall from the plugins for eclipse it works again

OTHER TIPS

I am posting it for the people that might explore this in the future. I found that my problem went away after I changed Android target in the project.properties file:

target=android-19

19 is the current (latest) Android version available. This error happens even in Android website's examples.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top