{"id":1152,"date":"2016-08-21T14:37:31","date_gmt":"2016-08-21T14:37:31","guid":{"rendered":"http:\/\/sdi.thoughtstorms.info\/?p=1152"},"modified":"2016-08-21T14:37:31","modified_gmt":"2016-08-21T14:37:31","slug":"the-android-studio-gradle-experience","status":"publish","type":"post","link":"https:\/\/sdi.thoughtstorms.info\/?p=1152","title":{"rendered":"The Android Studio \/ Gradle Experience"},"content":{"rendered":"<p>Im sure my answer \/ comment on <em><a href=\"http:\/\/stackoverflow.com\/questions\/16754643\/what-is-gradle-in-android-studio\/39065350\">What is Gradle in Android Studio?<\/a><\/em> will get downvoted into oblivion with short-shrift fairly soon. (Maybe deservedly).<\/p>\n<p>But I&#8217;ll make it here : <\/p>\n<p>[quote]<br \/>\nAt the risk of being discursive I think behind this is the question of why the Android Studio \/ Gradle experience is so bad.<br \/>\nTypical Clojure experience :<br \/>\n  * download project with dependencies listed in project.clj.<br \/>\n  * Leiningen gets the dependencies thanks to Clojars and Maven.<br \/>\n  * Project compiles.<br \/>\nTypical Android Studio \/ Gradle experience :<br \/>\n  * &#8220;Import my Eclipse project&#8221;.<br \/>\n  * OK project imported.<br \/>\n  * Gradle is doing it&#8217;s thang &#8230;  wait &#8230; wait &#8230; wait &#8230; Gradle has finished.<br \/>\n  * Compile &#8230; can&#8217;t compile because I don&#8217;t know what an X is \/ can&#8217;t find Y library.<br \/>\nI&#8217;m not sure this is Gradle&#8217;s fault exactly. But the &#8220;import from Eclipse project&#8221; seems pretty flaky. For all of Gradle&#8217;s alleged sophistication and the virtues of a build-system, Android Studio just doesn&#8217;t seem to import the build dependencies or build-process from Eclipse very well.<br \/>\nIt doesn&#8217;t tell you when it&#8217;s failed to import a complete dependency graph. The Android Studio gives no useful help or tips as to how to solve the problem. It doesn&#8217;t tell you where you can manually look in the Eclipse folders. It doesn&#8217;t tell you which library seems to be missing. Or help you search Maven etc. for them.<br \/>\nIn 2016 things like Leiningen \/ Clojars, or node&#8217;s npm, or Python&#8217;s pip, or the Debian apkg (and I&#8217;m sure many similar package managers for other languages and systems) all work beautifully &#8230; missing dependencies are thing of the past.<br \/>\nExcept with Android. Android Studio is now the only place where I still seem to experience missing-dependency hell.<br \/>\nI&#8217;m inclined to say this is Google&#8217;s fault. They broke the Android ecosystem (and thousands of existing Android projects \/ online tutorials) when they cavalierly decided to shift from Eclipse to Android Studio \/ Gradle without producing a robust conversion process. People whose projects work in Eclipse aren&#8217;t adapting them to AS (presumably because it&#8217;s a pain for them). And people trying to use those projects in AS are hitting the same issues.<br \/>\nAnd anyway, if Gradle is this super-powerful build system, why am I still managing a whole lot of other dependencies in the sdk manager? Why can&#8217;t a project that needs, say, the ndk specify this in its Gradle file so that it gets automatically installed and built-against when needed? Why is NDK special? Similarly for target platforms? Why am I installing them explicitly in the IDE rather than just checking my project against them and having this all sorted for me behind the scenes?<br \/>\n[\/quote]<br \/>\n<\/\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Im sure my answer \/ comment on What is Gradle in Android Studio? will get downvoted into oblivion with short-shrift fairly soon. (Maybe deservedly). But I&#8217;ll make it here : [quote] At the risk of being discursive I think behind this is the question of why the Android Studio \/ Gradle experience is so bad. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[19,48,211,325],"class_list":["post-1152","post","type-post","status-publish","format-standard","hentry","category-opinion","tag-android","tag-build-tools","tag-ide","tag-package-management"],"_links":{"self":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/1152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1152"}],"version-history":[{"count":0,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=\/wp\/v2\/posts\/1152\/revisions"}],"wp:attachment":[{"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdi.thoughtstorms.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}