Title: recycled twice! Runtime Exception in TypedArray
Tags: android;android-5.0-lollipop
Question: I'm receiving some crash reports from devices using android L preview, the issue is 

```Caused by: java.lang.RuntimeException: [17, ...... ] recycled twice!
       at android.content.res.TypedArray.recycle(TypedArray.java:869)
```

Can't see the code because Android L is still not available, How can I check if the TypedArray is already recycled?

I actually found that the call to recycle is called twice, but anyway, why throw a exception now breaking potentially old working code (even if it's incorrect to call recycle twice). 

Comment: Have you noticed the documentation change in _TypedArray.recycle()_ ? It has changed to ; "Recycle the TypedArray, to be re-used by a later caller. After calling this function you must not ever touch the typed array again."

Here is the accepted answer: Due to changes in TypedArray pooling in L, calling TypedArray.recycle() twice or calling a getter on TypedArray after recycle() is not safe. This has never been correct app behavior and prior to L may have introduced subtle errors.



{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2014:00:10/13/14', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<android><android-5.0-lollipop>', 'Title': 'recycled twice! Runtime Exception in TypedArray', 'ViewCount': 1498, 'id': 26336972, 'user_AboutMe': '<p>Interested in search engines, relevance algorithms, alt.net fan</p>\n', 'user_AccountId': 13569.0, 'user_DisplayName': 'Jokin', 'user_Reputation': 3993.0, 'user_Views': 159.0, 'user_id': 27369.0}}