android / enterprise-samples

Multiple samples showing the best practices in enterprise on Android.
Apache License 2.0
387 stars 241 forks source link

When I run the program, the following error #14

Closed codingjeremy closed 1 year ago

codingjeremy commented 5 years ago

Issue by zhushi91 Monday Mar 28, 2016 at 09:55 GMT Originally opened as https://github.com/googlesamples/android-AppRestrictionEnforcer/issues/1


Process: com.example.android.apprestrictionenforcer, PID: 5884 java.lang.NoSuchMethodError: android.app.admin.DevicePolicyManager.isProfileOwnerApp at com.example.android.apprestrictionenforcer.MainActivity.onCreate(MainActivity.java:36) at android.app.Activity.performCreate(Activity.java:5245) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249) at android.app.ActivityThread.access$800(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5052) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(Native Method)

pfmaggi commented 1 year ago

You can use the TestDPC demo app for these tests.