{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/buck/issues/773","repository_url":"https://api.github.com/repos/facebook/buck","labels_url":"https://api.github.com/repos/facebook/buck/issues/773/labels{/name}","comments_url":"https://api.github.com/repos/facebook/buck/issues/773/comments","events_url":"https://api.github.com/repos/facebook/buck/issues/773/events","html_url":"https://github.com/facebook/buck/issues/773","id":159843692,"number":773,"title":"Didn't find class “android.support.design.widget.CoordinatorLayout” using Buck","user":{"login":"vinz243","id":4569266,"avatar_url":"https://avatars.githubusercontent.com/u/4569266?v=3","gravatar_id":"","url":"https://api.github.com/users/vinz243","html_url":"https://github.com/vinz243","followers_url":"https://api.github.com/users/vinz243/followers","following_url":"https://api.github.com/users/vinz243/following{/other_user}","gists_url":"https://api.github.com/users/vinz243/gists{/gist_id}","starred_url":"https://api.github.com/users/vinz243/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vinz243/subscriptions","organizations_url":"https://api.github.com/users/vinz243/orgs","repos_url":"https://api.github.com/users/vinz243/repos","events_url":"https://api.github.com/users/vinz243/events{/privacy}","received_events_url":"https://api.github.com/users/vinz243/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-12T19:34:42Z","updated_at":"2016-10-11T23:17:42Z","closed_at":"2016-08-21T11:01:15Z","body":"Hi everyone,\r\n\r\nI'm trying to get Buck working with the blank application template from Android Studio. \r\n\r\n### `apps/snappy/BUCK`\r\n\r\n```py\r\n    android_binary(\r\n      name = 'main',\r\n      manifest = 'AndroidManifest.xml',\r\n      keystore = '//keystores:debug',\r\n      package_type = 'debug',\r\n      deps = [\r\n        '//java:main',\r\n        '//res:res',\r\n        '//keystores:debug',\r\n      ],\r\n    )\r\n\r\n```\r\n\r\n\r\n### `res/snappy/layout/activity_main.xml` \r\n\r\n```py\r\n    <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n    <android.support.design.widget.CoordinatorLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\r\n        xmlns:app=\"http://schemas.android.com/apk/res-auto\"\r\n        xmlns:tools=\"http://schemas.android.com/tools\"\r\n        android:layout_width=\"match_parent\"\r\n        android:layout_height=\"match_parent\"\r\n        android:fitsSystemWindows=\"true\"\r\n        tools:context=\"com.whitedrop.snappy.MainActivity\">\r\n    \r\n        ....\r\n    \r\n    </android.support.design.widget.CoordinatorLayout>\r\n\r\n```\r\n### `res/BUCK` \r\n\r\n```py\r\n    android_resource(\r\n      name = 'res',\r\n      res = 'snappy',\r\n      package = 'com.whitedrop.snappy',\r\n      deps = [\r\n      '//libs:appcompat-v7',\r\n      '//libs:design'\r\n      ],\r\n      visibility = [\r\n        'PUBLIC',\r\n      ]\r\n    )\r\n```\r\n\r\n\r\n### `libs/BUCK`\r\n\r\n\r\n```py\r\nlocal_maven('com.android.support:design:23.4.0')\r\nlocal_maven('com.android.support:appcompat-v7:23.4.0')\r\n```\r\n\r\n### `DEFS`\r\n\r\n\r\n```py\r\nsdkPath = '/home/vinz243/android-sdk'\r\ndef local_maven(pkg):\r\n\tgroup, name, version = pkg.split(':', 3)\r\n\tfile = (sdkPath + '/extras/android/m2repository/'\r\n\t\t+ group.replace('.', '/') + '/' + name + '/' + version + '/' + name\r\n\t\t+ '-' + version + '.aar')\r\n\ttarget = name + '-' + version +'.aar'\r\n\r\n\tif not os.path.isfile(target):\r\n\t\tcopyfile(file, 'libs/' + target)\r\n\r\n\tandroid_prebuilt_aar(\r\n\t  name = name,\r\n\t  aar = target,\r\n\t  visibility = ['PUBLIC']\r\n\t)\r\n```\r\n\r\n\r\n\r\n\r\n### output\r\n\r\n                        Process com.whitedrop.snappy created for activity com.whitedrop.snappy/.MainActivity\r\n                        PID: 2449   UID:    GIDs: \r\n\r\n    ActivityManager  I  Start proc 2449:com.whitedrop.snappy/u0a61 for activity com.whitedrop.snappy/.MainActivity\r\n                art  I  Rejecting re-init on previously-failed class java.lang.Class<android.support.design.widget.CoordinatorLayout>\r\n     AndroidRuntime  D  Shutting down VM\r\n                     E  FATAL EXCEPTION: main\r\n                     E  Process: com.whitedrop.snappy, PID: 2449\r\n                     E  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.whitedrop.snappy/com.whitedrop.snappy.MainActivity}: android.view.InflateExcept\r\n                        ion: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout\r\n                     ...E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)\r\n                     E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)\r\n                     E  Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.design.widget.CoordinatorLayout\r\n                     E      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:757)\r\n                     ....\r\n                     E      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)\r\n                     E      ... 10 more\r\n                     E  Caused by: java.lang.ClassNotFoundException: Didn't find class \"android.support.design.widget.CoordinatorLayout\" on path: DexPathList[[zip file \"/data\r\n                        /app/com.whitedrop.snappy-1/base.apk\"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]\r\n                     E      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)\r\n                     ...\r\n                     E      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)\r\n                     E      ... 19 more\r\n                     E      Suppressed: java.lang.NoClassDefFoundError: android.support.design.widget.CoordinatorLayout\r\n                     E          at dalvik.system.DexFile.defineClassNative(Native Method)\r\n                     E ....     at dalvik.system.DexPathList.findClass(DexPathList.java:321)\r\n                     E          at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)\r\n                     E          ... 23 more\r\n                     E      Suppressed: java.lang.ClassNotFoundException: android.support.design.widget.CoordinatorLayout\r\n                     E          at java.lang.Class.classForName(Native Method)\r\n                     E          at java.lang.BootClassLoader.findClass(ClassLoader.java:781)\r\n                     E          at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)\r\n                     E          at java.lang.ClassLoader.loadClass(ClassLoader.java:504)\r\n                     E          ... 22 more\r\n                     E      Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available\r\n    ActivityManager  W    Force finishing activity 1 com.whitedrop.snappy/.MainActivity\r\n\r\nMy generated APK contains the CoordinatorLayout class in its dex file btw\r\nFull code can be found here https://github.com/vinz243/snappy\r\n[Original Post](https://stackoverflow.com/questions/37681117/didnt-find-class-android-support-design-widget-coordinatorlayout-using-buck)\r\nThanks indvance"},"comment":{"url":"https://api.github.com/repos/facebook/buck/issues/comments/253075036","html_url":"https://github.com/facebook/buck/issues/773#issuecomment-253075036","issue_url":"https://api.github.com/repos/facebook/buck/issues/773","id":253075036,"user":{"login":"abdoutech93","id":16762124,"avatar_url":"https://avatars.githubusercontent.com/u/16762124?v=3","gravatar_id":"","url":"https://api.github.com/users/abdoutech93","html_url":"https://github.com/abdoutech93","followers_url":"https://api.github.com/users/abdoutech93/followers","following_url":"https://api.github.com/users/abdoutech93/following{/other_user}","gists_url":"https://api.github.com/users/abdoutech93/gists{/gist_id}","starred_url":"https://api.github.com/users/abdoutech93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abdoutech93/subscriptions","organizations_url":"https://api.github.com/users/abdoutech93/orgs","repos_url":"https://api.github.com/users/abdoutech93/repos","events_url":"https://api.github.com/users/abdoutech93/events{/privacy}","received_events_url":"https://api.github.com/users/abdoutech93/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T23:17:42Z","updated_at":"2016-10-11T23:17:42Z","body":"@vinz243 please can you help me to fix the same issue. it make me crazy i checked all my code but i don't catch any error. please it'll be so kind from you. "}}
{"actor":{"display_login":"abdoutech93"}}