android - NoSuchMethod: isDestroyed() -


i call isdestroyed() on activity , got ex:

04-09 03:08:12.692: e/androidruntime(13234): fatal exception: main 04-09 03:08:12.692: e/androidruntime(13234): java.lang.nosuchmethoderror: android.app.activity.isdestroyed 04-09 03:08:12.692: e/androidruntime(13234):    @ hu.illion.beentaps.util.activitykiller.killallpastactivites(activitykiller.java:16) 04-09 03:08:12.692: e/androidruntime(13234):    @ hu.illion.beentaps.mapbeenactivity$1.onclick(mapbeenactivity.java:75) 04-09 03:08:12.692: e/androidruntime(13234):    @ android.view.view.performclick(view.java:4084) 04-09 03:08:12.692: e/androidruntime(13234):    @ android.view.view$performclick.run(view.java:16966) 04-09 03:08:12.692: e/androidruntime(13234):    @ android.os.handler.handlecallback(handler.java:615) 04-09 03:08:12.692: e/androidruntime(13234):    @ android.os.handler.dispatchmessage(handler.java:92) 04-09 03:08:12.692: e/androidruntime(13234):    @ android.os.looper.loop(looper.java:137) 04-09 03:08:12.692: e/androidruntime(13234):    @ android.app.activitythread.main(activitythread.java:4931) 04-09 03:08:12.692: e/androidruntime(13234):    @ java.lang.reflect.method.invokenative(native method) 04-09 03:08:12.692: e/androidruntime(13234):    @ java.lang.reflect.method.invoke(method.java:511) 04-09 03:08:12.692: e/androidruntime(13234):    @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:791) 04-09 03:08:12.692: e/androidruntime(13234):    @ com.android.internal.os.zygoteinit.main(zygoteinit.java:558) 04-09 03:08:12.692: e/androidruntime(13234):    @ dalvik.system.nativestart.main(native method) 

i got activites in list, , want iterate through , finish of them:

for (activity act : variables.pastactivites) {         try {              log.i("killing: ", act.getlocalclassname());             if (!act.isdestroyed()) {                 act.overridependingtransition(0, 0);                 act.finish();             }             else             {                 variables.pastactivites.remove(act);             }          } catch (exception ex) {             log.i("killeract: ", ex.tostring());         }      } 

i can read official documentation there function named isdestroyed(). now?

activity.isdestroyed() available starting @ api level 17. if application settings lower api, you'll exception.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -