{"action":"created","issue":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/1736","labels_url":"https://api.github.com/repos/robolectric/robolectric/issues/1736/labels{/name}","comments_url":"https://api.github.com/repos/robolectric/robolectric/issues/1736/comments","events_url":"https://api.github.com/repos/robolectric/robolectric/issues/1736/events","html_url":"https://github.com/robolectric/robolectric/issues/1736","id":71545966,"number":1736,"title":"android.support.v7.app.AlertDialog crash when try to open","user":{"login":"ubelab","id":3175499,"avatar_url":"https://avatars.githubusercontent.com/u/3175499?v=3","gravatar_id":"","url":"https://api.github.com/users/ubelab","html_url":"https://github.com/ubelab","followers_url":"https://api.github.com/users/ubelab/followers","following_url":"https://api.github.com/users/ubelab/following{/other_user}","gists_url":"https://api.github.com/users/ubelab/gists{/gist_id}","starred_url":"https://api.github.com/users/ubelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubelab/subscriptions","organizations_url":"https://api.github.com/users/ubelab/orgs","repos_url":"https://api.github.com/users/ubelab/repos","events_url":"https://api.github.com/users/ubelab/events{/privacy}","received_events_url":"https://api.github.com/users/ubelab/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/robolectric/robolectric/labels/3.0","name":"3.0","color":"c7def8"},{"url":"https://api.github.com/repos/robolectric/robolectric/labels/defect","name":"defect","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-28T10:18:34Z","updated_at":"2015-04-28T16:10:34Z","closed_at":null,"body":"Using the new support library with the material alert dialog, when the dialog try to open the test crash with this exception:\r\n\r\nRobolectric version: 3.0-SNAPSHOT\r\nAndroid Studio 1.2 RC3\r\nemulateSDK = 21\r\n\r\nCode:\r\n```\r\nandroid.support.v7.app.AlertDialog.show();\r\n```\r\n\r\nStacktrace:\r\n```\r\njava.lang.IllegalStateException: Could not execute method of the activity\r\n...\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n..\r\nCaused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -9\r\n\tat java.lang.String.substring(String.java:1954)\r\n\tat org.robolectric.res.ResName.qualifyResName(ResName.java:51)\r\n\tat org.robolectric.res.Attribute.getStyleReference(Attribute.java:147)\r\n\tat org.robolectric.res.builder.XmlFileBuilder$XmlResourceParserImpl.getResourceId(XmlFileBuilder.java:786)\r\n\tat org.robolectric.res.builder.XmlFileBuilder$XmlResourceParserImpl.getStyleAttribute(XmlFileBuilder.java:769)\r\n\tat org.robolectric.shadows.ShadowResources.attrsToTypedArray(ShadowResources.java:152)\r\n\tat org.robolectric.shadows.ShadowResources.access$000(ShadowResources.java:51)\r\n\tat org.robolectric.shadows.ShadowResources$ShadowTheme.obtainStyledAttributes(ShadowResources.java:489)\r\n\tat android.content.res.Resources$Theme.obtainStyledAttributes(Resources.java)\r\n\tat android.content.Context.obtainStyledAttributes(Context.java:460)\r\n\tat android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:708)\r\n\tat android.view.LayoutInflater.rInflate(LayoutInflater.java:806)\r\n\tat android.view.LayoutInflater.rInflate(LayoutInflater.java:809)\r\n\tat android.view.LayoutInflater.rInflate(LayoutInflater.java:809)\r\n\tat android.view.LayoutInflater.inflate(LayoutInflater.java:504)\r\n\tat android.view.LayoutInflater.inflate(LayoutInflater.java:414)\r\n\tat android.view.LayoutInflater.inflate(LayoutInflater.java:365)\r\n\tat android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:249)\r\n\tat android.support.v7.app.AppCompatDialog.setContentView(AppCompatDialog.java:75)\r\n\tat android.support.v7.app.AlertController.installContent(AlertController.java:216)\r\n\tat android.support.v7.app.AlertDialog.onCreate(AlertDialog.java:240)\r\n\tat android.app.Dialog.dispatchOnCreate(Dialog.java:373)\r\n\tat android.app.Dialog.show(Dialog.java:274)\r\n\tat org.robolectric.shadows.ShadowDialog.show(ShadowDialog.java:65)\r\n\tat android.app.Dialog.show(Dialog.java)\r\n```\r\n\r\nDependency:\r\n```\r\ncompile 'com.android.support:appcompat-v7:22.1.0'\r\n```"},"comment":{"url":"https://api.github.com/repos/robolectric/robolectric/issues/comments/97122483","html_url":"https://github.com/robolectric/robolectric/issues/1736#issuecomment-97122483","issue_url":"https://api.github.com/repos/robolectric/robolectric/issues/1736","id":97122483,"user":{"login":"ubelab","id":3175499,"avatar_url":"https://avatars.githubusercontent.com/u/3175499?v=3","gravatar_id":"","url":"https://api.github.com/users/ubelab","html_url":"https://github.com/ubelab","followers_url":"https://api.github.com/users/ubelab/followers","following_url":"https://api.github.com/users/ubelab/following{/other_user}","gists_url":"https://api.github.com/users/ubelab/gists{/gist_id}","starred_url":"https://api.github.com/users/ubelab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ubelab/subscriptions","organizations_url":"https://api.github.com/users/ubelab/orgs","repos_url":"https://api.github.com/users/ubelab/repos","events_url":"https://api.github.com/users/ubelab/events{/privacy}","received_events_url":"https://api.github.com/users/ubelab/received_events","type":"User","site_admin":false},"created_at":"2015-04-28T16:10:34Z","updated_at":"2015-04-28T16:10:34Z","body":"Verified also with:\r\n\r\n```\r\ncompile 'com.android.support:appcompat-v7:22.1.1'\r\n```"}}