{"action":"created","issue":{"url":"https://api.github.com/repos/xtext/xtend-gradle-plugin/issues/32","labels_url":"https://api.github.com/repos/xtext/xtend-gradle-plugin/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/xtext/xtend-gradle-plugin/issues/32/comments","events_url":"https://api.github.com/repos/xtext/xtend-gradle-plugin/issues/32/events","html_url":"https://github.com/xtext/xtend-gradle-plugin/issues/32","id":103477383,"number":32,"title":"Xtend + Android support library = error: cannot access DrawerLayoutImpl","user":{"login":"tobykurien","id":972315,"avatar_url":"https://avatars.githubusercontent.com/u/972315?v=3","gravatar_id":"","url":"https://api.github.com/users/tobykurien","html_url":"https://github.com/tobykurien","followers_url":"https://api.github.com/users/tobykurien/followers","following_url":"https://api.github.com/users/tobykurien/following{/other_user}","gists_url":"https://api.github.com/users/tobykurien/gists{/gist_id}","starred_url":"https://api.github.com/users/tobykurien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobykurien/subscriptions","organizations_url":"https://api.github.com/users/tobykurien/orgs","repos_url":"https://api.github.com/users/tobykurien/repos","events_url":"https://api.github.com/users/tobykurien/events{/privacy}","received_events_url":"https://api.github.com/users/tobykurien/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-27T10:35:14Z","updated_at":"2015-10-05T14:30:50Z","closed_at":"2015-10-05T14:30:50Z","body":"This error happens the first time you build a project that uses the Android support library. To reproduce, try cloning WebApps (https://github.com/tobykurien/webapps) and building by running ```gradle assembleRelease```:\r\n\r\n```\r\n:preBuild UP-TO-DATE\r\n:preDebugBuild UP-TO-DATE\r\n:checkDebugManifest\r\n:preReleaseBuild UP-TO-DATE\r\n:prepareComAndroidSupportAppcompatV72221Library\r\n:prepareComAndroidSupportSupportV42221Library\r\n:prepareComGithubTobykurienXtendroid0121Library\r\n:prepareDebugDependencies\r\n:compileDebugAidl\r\n:compileDebugRenderscript\r\n:generateDebugBuildConfig\r\n:generateDebugAssets UP-TO-DATE\r\n:mergeDebugAssets\r\n:generateDebugResValues UP-TO-DATE\r\n:generateDebugResources\r\n:mergeDebugResources\r\n:processDebugManifest\r\n:processDebugResources\r\n:compileDebugXtend\r\n[snip - warnings]\r\n:generateDebugSources\r\n:processDebugJavaRes UP-TO-DATE\r\n:compileDebugJava\r\n/WebApps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:35: error: cannot access DrawerLayoutImpl\r\npublic class BaseWebAppActivity extends AppCompatActivity {\r\n...\r\n```\r\nThe error only happens the first time (i.e. no ```build``` directory), thereafter it compiles fine. Unfortunately, this means that Travis CI builds fail. Happens with Gradle 2.2.1 and even Gradle 2.5.\r\n\r\nOne way to make this build pass the first time is to extract the JAR file containing the class (i.e. ```build/intermediates/exploded-aar/com.android.support/support-v4/22.2.1/jars/libs/internal_impl-22.2.1.jar``` and copy it into a libs folder and include that in the gradle dependencies. This is not ideal (and means my app isn't accepted by FDroid).\r\n\r\nAlso seems to affect Kotlin (https://devnet.jetbrains.com/message/5538844) and Groovy (https://github.com/groovy/groovy-android-gradle-plugin/issues/31) and Maven (https://github.com/simpligility/android-maven-plugin/issues/621) though there seem to be different work-arounds there.\r\n\r\nCould you please look into why this might be happening? Any workarounds without including a binary jar file?\r\n"},"comment":{"url":"https://api.github.com/repos/xtext/xtend-gradle-plugin/issues/comments/145546749","html_url":"https://github.com/xtext/xtend-gradle-plugin/issues/32#issuecomment-145546749","issue_url":"https://api.github.com/repos/xtext/xtend-gradle-plugin/issues/32","id":145546749,"user":{"login":"oehme","id":1191797,"avatar_url":"https://avatars.githubusercontent.com/u/1191797?v=3","gravatar_id":"","url":"https://api.github.com/users/oehme","html_url":"https://github.com/oehme","followers_url":"https://api.github.com/users/oehme/followers","following_url":"https://api.github.com/users/oehme/following{/other_user}","gists_url":"https://api.github.com/users/oehme/gists{/gist_id}","starred_url":"https://api.github.com/users/oehme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oehme/subscriptions","organizations_url":"https://api.github.com/users/oehme/orgs","repos_url":"https://api.github.com/users/oehme/repos","events_url":"https://api.github.com/users/oehme/events{/privacy}","received_events_url":"https://api.github.com/users/oehme/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T14:30:50Z","updated_at":"2015-10-05T14:30:50Z","body":"Hey Toby,\r\n\r\nsorry for coming back so late, we are pretty busy with polishing 2.9 =)\r\n\r\nThis issue no longer happens in version 0.4.8 of the plugin. Your example uses 0.4.7"}}