1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119<!DOCTYPE html> 120<html devsite> 121<head> 122 123 124 <meta name="top_category" value="develop" /> 125 126 <meta name="subcategory" value="reference" /> 127 128 129 <meta name="book_path" value="/reference/android/support/test/_book.yaml" /> 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145<title>StaleObjectException</title> 146 147 148</head> 149 150<body class="gc-documentation develop reference api apilevel-"> 151<div id="doc-api-level" class="" style="display:none"></div> 152 153 154 155 156<div id="naMessage"></div> 157 158<div id="api-info-block"> 159<div class="api-level"> 160 161 162 163 164</div> 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198<div class="sum-details-links"> 199 200Summary: 201 202 203 204 205 206 207 208 209 210 <a href="#pubctors">Ctors</a> 211 212 213 214 215 216 217 | <a href="#inhmethods">Inherited Methods</a> 218 219| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 220 221</div><!-- end sum-details-links --> 222</div><!-- end api-info-block --> 223 224<div class="api apilevel-" id="jd-content"> 225 226<!-- ======== START OF CLASS DATA ======== --> 227 228<h1 class="api-title">StaleObjectException</h1> 229<p> 230<code class="api-signature"> 231 public 232 233 234 235 class 236 StaleObjectException 237</code> 238<br> 239 240 241<code class="api-signature"> 242 243 244 245</code> 246 247<code class="api-signature"> 248 249 250 251</code> 252 253<code class="api-signature"> 254 255 256 257</code> 258 259<code class="api-signature"> 260 261 extends RuntimeException 262 263 264 265</code> 266 267<code class="api-signature"> 268 269 270 271</code> 272 273</p><table class="jd-inheritance-table"> 274 275 276 <tr> 277 278 <td colspan="5" class="jd-inheritance-class-cell">java.lang.Object 279 </td> 280 </tr> 281 282 283 <tr> 284 285 <td class="jd-inheritance-space"> ↳</td> 286 287 <td colspan="4" class="jd-inheritance-class-cell">java.lang.Throwable 288 </td> 289 </tr> 290 291 292 <tr> 293 294 <td class="jd-inheritance-space"> </td> 295 296 <td class="jd-inheritance-space"> ↳</td> 297 298 <td colspan="3" class="jd-inheritance-class-cell">java.lang.Exception 299 </td> 300 </tr> 301 302 303 <tr> 304 305 <td class="jd-inheritance-space"> </td> 306 307 <td class="jd-inheritance-space"> </td> 308 309 <td class="jd-inheritance-space"> ↳</td> 310 311 <td colspan="2" class="jd-inheritance-class-cell">java.lang.RuntimeException 312 </td> 313 </tr> 314 315 316 <tr> 317 318 <td class="jd-inheritance-space"> </td> 319 320 <td class="jd-inheritance-space"> </td> 321 322 <td class="jd-inheritance-space"> </td> 323 324 <td class="jd-inheritance-space"> ↳</td> 325 326 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.uiautomator.StaleObjectException 327 </td> 328 </tr> 329 330 331</table> 332 333 334 335 336<br><hr> 337 338 339 <p>A <code><a href="/reference/android/support/test/uiautomator/StaleObjectException.html">StaleObjectException</a></code> exception is thrown when a <code><a href="/reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></code> is used after the 340 underlying <code><a href="/reference/android/view/View.html">View</a></code> has been destroyed. In this case, it is necessary to call 341 <code><a href="/reference/android/support/test/uiautomator/UiDevice.html#findObject(android.support.test.uiautomator.BySelector)">findObject(BySelector)</a></code> to obtain a new <code><a href="/reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></code> instance. 342</p> 343 344 345 346 347 348 349 350<h2 class="api-section">Summary</h2> 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374<!-- ======== CONSTRUCTOR SUMMARY ======== --> 375<table id="pubctors" class="responsive constructors"> 376<tr><th colspan="2"><h3>Public constructors</h3></th></tr> 377 378 379 380 381 <tr class="api apilevel-" > 382 383 384 <td width="100%"> 385 <code> 386 <a href="/reference/android/support/test/uiautomator/StaleObjectException.html#StaleObjectException()">StaleObjectException</a>() 387 </code> 388 389 </td> 390 </tr> 391 392 393 394</table> 395 396 397 398 399 400 401 402 403 404 405 406<!-- ========== METHOD SUMMARY =========== --> 407<table id="inhmethods" class="methods inhtable"> 408<tr><th><h3>Inherited methods</h3></th></tr> 409 410 411 412 413 414 415<tr class="api apilevel-" > 416<td colspan="2"> 417 418 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Throwable" class="jd-expando-trigger closed" 419 ><img height="34" id="inherited-methods-java.lang.Throwable-trigger" 420 src="/assets/images/styles/disclosure_down.png" 421 class="jd-expando-trigger-img" /></a>From 422class 423<code> 424 425 java.lang.Throwable 426 427</code> 428<div id="inherited-methods-java.lang.Throwable"> 429 <div id="inherited-methods-java.lang.Throwable-list" 430 class="jd-inheritedlinks"> 431 </div> 432 <div id="inherited-methods-java.lang.Throwable-summary" style="display: none;"> 433 <table class="jd-sumtable-expando responsive"> 434 435 436 437 438 <tr class="api apilevel-" > 439 440 441 <td><code> 442 443 444 445 final 446 447 void</code> 448 </td> 449 450 <td width="100%"> 451 <code> 452 addSuppressed(Throwable arg0) 453 </code> 454 455 </td> 456 </tr> 457 458 459 460 <tr class="api apilevel-" > 461 462 463 <td><code> 464 465 466 467 468 469 Throwable</code> 470 </td> 471 472 <td width="100%"> 473 <code> 474 fillInStackTrace() 475 </code> 476 477 </td> 478 </tr> 479 480 481 482 <tr class="api apilevel-" > 483 484 485 <td><code> 486 487 488 489 490 491 Throwable</code> 492 </td> 493 494 <td width="100%"> 495 <code> 496 getCause() 497 </code> 498 499 </td> 500 </tr> 501 502 503 504 <tr class="api apilevel-" > 505 506 507 <td><code> 508 509 510 511 512 513 String</code> 514 </td> 515 516 <td width="100%"> 517 <code> 518 getLocalizedMessage() 519 </code> 520 521 </td> 522 </tr> 523 524 525 526 <tr class="api apilevel-" > 527 528 529 <td><code> 530 531 532 533 534 535 String</code> 536 </td> 537 538 <td width="100%"> 539 <code> 540 getMessage() 541 </code> 542 543 </td> 544 </tr> 545 546 547 548 <tr class="api apilevel-" > 549 550 551 <td><code> 552 553 554 555 556 557 StackTraceElement[]</code> 558 </td> 559 560 <td width="100%"> 561 <code> 562 getStackTrace() 563 </code> 564 565 </td> 566 </tr> 567 568 569 570 <tr class="api apilevel-" > 571 572 573 <td><code> 574 575 576 577 final 578 579 Throwable[]</code> 580 </td> 581 582 <td width="100%"> 583 <code> 584 getSuppressed() 585 </code> 586 587 </td> 588 </tr> 589 590 591 592 <tr class="api apilevel-" > 593 594 595 <td><code> 596 597 598 599 600 601 Throwable</code> 602 </td> 603 604 <td width="100%"> 605 <code> 606 initCause(Throwable arg0) 607 </code> 608 609 </td> 610 </tr> 611 612 613 614 <tr class="api apilevel-" > 615 616 617 <td><code> 618 619 620 621 622 623 void</code> 624 </td> 625 626 <td width="100%"> 627 <code> 628 printStackTrace() 629 </code> 630 631 </td> 632 </tr> 633 634 635 636 <tr class="api apilevel-" > 637 638 639 <td><code> 640 641 642 643 644 645 void</code> 646 </td> 647 648 <td width="100%"> 649 <code> 650 printStackTrace(PrintWriter arg0) 651 </code> 652 653 </td> 654 </tr> 655 656 657 658 <tr class="api apilevel-" > 659 660 661 <td><code> 662 663 664 665 666 667 void</code> 668 </td> 669 670 <td width="100%"> 671 <code> 672 printStackTrace(PrintStream arg0) 673 </code> 674 675 </td> 676 </tr> 677 678 679 680 <tr class="api apilevel-" > 681 682 683 <td><code> 684 685 686 687 688 689 void</code> 690 </td> 691 692 <td width="100%"> 693 <code> 694 setStackTrace(StackTraceElement[] arg0) 695 </code> 696 697 </td> 698 </tr> 699 700 701 702 <tr class="api apilevel-" > 703 704 705 <td><code> 706 707 708 709 710 711 String</code> 712 </td> 713 714 <td width="100%"> 715 <code> 716 toString() 717 </code> 718 719 </td> 720 </tr> 721 722 723 724 </table> 725 </div> 726</div> 727</td></tr> 728 729 730 731<tr class="api apilevel-" > 732<td colspan="2"> 733 734 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 735 ><img height="34" id="inherited-methods-java.lang.Object-trigger" 736 src="/assets/images/styles/disclosure_down.png" 737 class="jd-expando-trigger-img" /></a>From 738class 739<code> 740 741 java.lang.Object 742 743</code> 744<div id="inherited-methods-java.lang.Object"> 745 <div id="inherited-methods-java.lang.Object-list" 746 class="jd-inheritedlinks"> 747 </div> 748 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 749 <table class="jd-sumtable-expando responsive"> 750 751 752 753 754 <tr class="api apilevel-" > 755 756 757 <td><code> 758 759 760 761 762 763 Object</code> 764 </td> 765 766 <td width="100%"> 767 <code> 768 clone() 769 </code> 770 771 </td> 772 </tr> 773 774 775 776 <tr class="api apilevel-" > 777 778 779 <td><code> 780 781 782 783 784 785 boolean</code> 786 </td> 787 788 <td width="100%"> 789 <code> 790 equals(Object arg0) 791 </code> 792 793 </td> 794 </tr> 795 796 797 798 <tr class="api apilevel-" > 799 800 801 <td><code> 802 803 804 805 806 807 void</code> 808 </td> 809 810 <td width="100%"> 811 <code> 812 finalize() 813 </code> 814 815 </td> 816 </tr> 817 818 819 820 <tr class="api apilevel-" > 821 822 823 <td><code> 824 825 826 827 final 828 829 Class<?></code> 830 </td> 831 832 <td width="100%"> 833 <code> 834 getClass() 835 </code> 836 837 </td> 838 </tr> 839 840 841 842 <tr class="api apilevel-" > 843 844 845 <td><code> 846 847 848 849 850 851 int</code> 852 </td> 853 854 <td width="100%"> 855 <code> 856 hashCode() 857 </code> 858 859 </td> 860 </tr> 861 862 863 864 <tr class="api apilevel-" > 865 866 867 <td><code> 868 869 870 871 final 872 873 void</code> 874 </td> 875 876 <td width="100%"> 877 <code> 878 notify() 879 </code> 880 881 </td> 882 </tr> 883 884 885 886 <tr class="api apilevel-" > 887 888 889 <td><code> 890 891 892 893 final 894 895 void</code> 896 </td> 897 898 <td width="100%"> 899 <code> 900 notifyAll() 901 </code> 902 903 </td> 904 </tr> 905 906 907 908 <tr class="api apilevel-" > 909 910 911 <td><code> 912 913 914 915 916 917 String</code> 918 </td> 919 920 <td width="100%"> 921 <code> 922 toString() 923 </code> 924 925 </td> 926 </tr> 927 928 929 930 <tr class="api apilevel-" > 931 932 933 <td><code> 934 935 936 937 final 938 939 void</code> 940 </td> 941 942 <td width="100%"> 943 <code> 944 wait(long arg0, int arg1) 945 </code> 946 947 </td> 948 </tr> 949 950 951 952 <tr class="api apilevel-" > 953 954 955 <td><code> 956 957 958 959 final 960 961 void</code> 962 </td> 963 964 <td width="100%"> 965 <code> 966 wait(long arg0) 967 </code> 968 969 </td> 970 </tr> 971 972 973 974 <tr class="api apilevel-" > 975 976 977 <td><code> 978 979 980 981 final 982 983 void</code> 984 </td> 985 986 <td width="100%"> 987 <code> 988 wait() 989 </code> 990 991 </td> 992 </tr> 993 994 995 996 </table> 997 </div> 998</div> 999</td></tr> 1000 1001 1002 1003 1004</table> 1005 1006 1007 1008<!-- XML Attributes --> 1009 1010 1011<!-- Enum Values --> 1012 1013 1014<!-- Constants --> 1015 1016 1017<!-- Fields --> 1018 1019 1020<!-- Public ctors --> 1021 1022 1023<!-- ========= CONSTRUCTOR DETAIL ======== --> 1024<h2 class="api-section">Public constructors</h2> 1025 1026 1027 1028<A NAME="StaleObjectException()"></A> 1029 1030<div class="api apilevel-"> 1031 <h3 class="api-name">StaleObjectException</h3> 1032 <div class="api-level"> 1033 <div></div> 1034 1035 1036 1037 </div> 1038<pre class="api-signature no-pretty-print"> 1039StaleObjectException ()</pre> 1040 1041 1042 1043 1044 <p></p> 1045 1046</div> 1047 1048 1049 1050 1051 1052<!-- ========= CONSTRUCTOR DETAIL ======== --> 1053<!-- Protected ctors --> 1054 1055 1056 1057<!-- ========= METHOD DETAIL ======== --> 1058<!-- Public methdos --> 1059 1060 1061 1062<!-- ========= METHOD DETAIL ======== --> 1063 1064 1065 1066<!-- ========= END OF CLASS DATA ========= --> 1067 1068</div><!-- end jd-content --> 1069 1070 1071 1072<div class="data-reference-resources-wrapper"> 1073 1074 <ul data-reference-resources> 1075 1076 1077 <li><h2>Interfaces</h2> 1078 <ul> 1079 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></li> 1080 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiWatcher.html">UiWatcher</a></li> 1081 </ul> 1082 </li> 1083 1084 <li><h2>Classes</h2> 1085 <ul> 1086 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/By.html">By</a></li> 1087 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/BySelector.html">BySelector</a></li> 1088 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></li> 1089 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/EventCondition.html">EventCondition</a></li> 1090 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/SearchCondition.html">SearchCondition</a></li> 1091 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner.html">UiAutomatorInstrumentationTestRunner</a></li> 1092 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html">UiAutomatorTestCase</a></li> 1093 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></li> 1094 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></li> 1095 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject.html">UiObject</a></li> 1096 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></li> 1097 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2Condition.html">UiObject2Condition</a></li> 1098 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></li> 1099 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></li> 1100 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Until.html">Until</a></li> 1101 </ul> 1102 </li> 1103 1104 <li><h2>Enums</h2> 1105 <ul> 1106 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Direction.html">Direction</a></li> 1107 </ul> 1108 </li> 1109 1110 <li><h2>Exceptions</h2> 1111 <ul> 1112 <li class="selected api apilevel-"><a href="/reference/android/support/test/uiautomator/StaleObjectException.html">StaleObjectException</a></li> 1113 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></li> 1114 </ul> 1115 </li> 1116 1117 </ul> 1118 1119</div> 1120 1121 1122 1123</body> 1124</html> 1125