{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter-intellij/issues/782","repository_url":"https://api.github.com/repos/flutter/flutter-intellij","labels_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/782/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/782/comments","events_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/782/events","html_url":"https://github.com/flutter/flutter-intellij/issues/782","id":211721319,"number":782,"title":"Support editing a Flutter project's Android java code in IntelliJ IDEA","user":{"login":"hotznplotz","id":15375067,"avatar_url":"https://avatars1.githubusercontent.com/u/15375067?v=3","gravatar_id":"","url":"https://api.github.com/users/hotznplotz","html_url":"https://github.com/hotznplotz","followers_url":"https://api.github.com/users/hotznplotz/followers","following_url":"https://api.github.com/users/hotznplotz/following{/other_user}","gists_url":"https://api.github.com/users/hotznplotz/gists{/gist_id}","starred_url":"https://api.github.com/users/hotznplotz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotznplotz/subscriptions","organizations_url":"https://api.github.com/users/hotznplotz/orgs","repos_url":"https://api.github.com/users/hotznplotz/repos","events_url":"https://api.github.com/users/hotznplotz/events{/privacy}","received_events_url":"https://api.github.com/users/hotznplotz/received_events","type":"User","site_admin":false},"labels":[{"id":544715226,"url":"https://api.github.com/repos/flutter/flutter-intellij/labels/adoption-blocker","name":"adoption-blocker","color":"b60205","default":false},{"id":572648903,"url":"https://api.github.com/repos/flutter/flutter-intellij/labels/q2-kr","name":"q2-kr","color":"c2e0c6","default":false}],"state":"open","locked":false,"assignee":{"login":"skybrian","id":129084,"avatar_url":"https://avatars2.githubusercontent.com/u/129084?v=3","gravatar_id":"","url":"https://api.github.com/users/skybrian","html_url":"https://github.com/skybrian","followers_url":"https://api.github.com/users/skybrian/followers","following_url":"https://api.github.com/users/skybrian/following{/other_user}","gists_url":"https://api.github.com/users/skybrian/gists{/gist_id}","starred_url":"https://api.github.com/users/skybrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skybrian/subscriptions","organizations_url":"https://api.github.com/users/skybrian/orgs","repos_url":"https://api.github.com/users/skybrian/repos","events_url":"https://api.github.com/users/skybrian/events{/privacy}","received_events_url":"https://api.github.com/users/skybrian/received_events","type":"User","site_admin":false},"assignees":[{"login":"skybrian","id":129084,"avatar_url":"https://avatars2.githubusercontent.com/u/129084?v=3","gravatar_id":"","url":"https://api.github.com/users/skybrian","html_url":"https://github.com/skybrian","followers_url":"https://api.github.com/users/skybrian/followers","following_url":"https://api.github.com/users/skybrian/following{/other_user}","gists_url":"https://api.github.com/users/skybrian/gists{/gist_id}","starred_url":"https://api.github.com/users/skybrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skybrian/subscriptions","organizations_url":"https://api.github.com/users/skybrian/orgs","repos_url":"https://api.github.com/users/skybrian/repos","events_url":"https://api.github.com/users/skybrian/events{/privacy}","received_events_url":"https://api.github.com/users/skybrian/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/flutter/flutter-intellij/milestones/20","html_url":"https://github.com/flutter/flutter-intellij/milestone/20","labels_url":"https://api.github.com/repos/flutter/flutter-intellij/milestones/20/labels","id":2418581,"number":20,"title":"M13","description":"","creator":{"login":"mit-mit","id":13644170,"avatar_url":"https://avatars0.githubusercontent.com/u/13644170?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-mit","html_url":"https://github.com/mit-mit","followers_url":"https://api.github.com/users/mit-mit/followers","following_url":"https://api.github.com/users/mit-mit/following{/other_user}","gists_url":"https://api.github.com/users/mit-mit/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-mit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-mit/subscriptions","organizations_url":"https://api.github.com/users/mit-mit/orgs","repos_url":"https://api.github.com/users/mit-mit/repos","events_url":"https://api.github.com/users/mit-mit/events{/privacy}","received_events_url":"https://api.github.com/users/mit-mit/received_events","type":"User","site_admin":false},"open_issues":12,"closed_issues":6,"state":"open","created_at":"2017-03-29T07:58:19Z","updated_at":"2017-04-05T17:09:08Z","due_on":"2017-04-19T07:00:00Z","closed_at":null},"comments":6,"created_at":"2017-03-03T15:35:42Z","updated_at":"2017-04-07T21:01:43Z","closed_at":null,"body":"Currently I don't get language specific IDE support for Java code. Some features like auto complete identifiers does work. Others like detecting wrong syntax and type checks doesn't. Tried it on Linux and OSX.\r\n\r\n## Steps to Reproduce\r\n\r\n1. follow Intellij setup instructions: https://flutter.io/intellij-setup/\r\n2. run 'flutter create newApp'\r\n3. open newApp with Intellij\r\n4. check IDE support for Java code in android/app/src/...\r\n\r\n## Version info\r\n\r\n[✓] Flutter (on Mac OS, channel master)\r\n    • Flutter at /Users/*****/.flutter/flutter\r\n    • Framework revision c9644a49f2 (31 hours ago), 2017-03-02 09:21:40\r\n    • Engine revision 74de13c0bd\r\n    • Tools Dart version 1.23.0-dev.2.0\r\n\r\n[✓] Android toolchain - develop for Android devices (Android SDK 25.0.2)\r\n    • Android SDK at /Users/*****/Library/Android/sdk\r\n    • Platform android-25, build-tools 25.0.2\r\n    • Java(TM) SE Runtime Environment (build 1.8.0_102-b14)\r\n\r\n[-] iOS toolchain - develop for iOS devices (Xcode 8.1)\r\n    • Xcode at /Applications/Xcode.app/Contents/Developer\r\n    • Xcode 8.1, Build version 8B62\r\n    ✗ ideviceinstaller not available; this is used to discover connected iOS devices.\r\n      Install via 'brew install ideviceinstaller'.\r\n    ✗ ios-deploy not installed: install via 'brew install ios-deploy'.\r\n\r\n[✓] Android Studio (version 2.2)\r\n    • Android Studio at /Applications/Android Studio.app/Contents\r\n    • Gradle version 2.14.1\r\n\r\n[✓] IntelliJ IDEA Ultimate Edition (version 2016.3)\r\n    • Dart plugin version 163.8651\r\n    • Flutter plugin version 0.1.11.1\r\n\r\n[-] WebStorm (version 2016.2.4)\r\n    • Flutter plugin not installed; this adds Flutter specific functionality.\r\n    • For information about managing plugins, see\r\n      https://www.jetbrains.com/help/idea/managing-plugins.html\r\n\r\n[✓] Connected devices\r\n    • None\r\n\r\nI am aware that IDE support for the native languages maybe isn't high priority, but would be handy when using host message passing. How do you do this when implementing libraries?\r\n"},"comment":{"url":"https://api.github.com/repos/flutter/flutter-intellij/issues/comments/292650776","html_url":"https://github.com/flutter/flutter-intellij/issues/782#issuecomment-292650776","issue_url":"https://api.github.com/repos/flutter/flutter-intellij/issues/782","id":292650776,"user":{"login":"skybrian","id":129084,"avatar_url":"https://avatars2.githubusercontent.com/u/129084?v=3","gravatar_id":"","url":"https://api.github.com/users/skybrian","html_url":"https://github.com/skybrian","followers_url":"https://api.github.com/users/skybrian/followers","following_url":"https://api.github.com/users/skybrian/following{/other_user}","gists_url":"https://api.github.com/users/skybrian/gists{/gist_id}","starred_url":"https://api.github.com/users/skybrian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skybrian/subscriptions","organizations_url":"https://api.github.com/users/skybrian/orgs","repos_url":"https://api.github.com/users/skybrian/repos","events_url":"https://api.github.com/users/skybrian/events{/privacy}","received_events_url":"https://api.github.com/users/skybrian/received_events","type":"User","site_admin":false},"created_at":"2017-04-07T21:01:43Z","updated_at":"2017-04-07T21:01:43Z","body":"I looked into how to manually set this up for a simple project (basically hello world). This is using IDEA CE without the Android plugin.\r\n\r\n*Which JDK should we use for Android?*\r\n\r\nI got this out of \"flutter doctor\". It looks like it picks it up from Android Studio? Presumably flutter-tools will need to choose this.\r\n\r\n*Where do we get android.jar?*\r\n\r\nAgain, got it out of \"flutter doctor\". It's $ANDROID_HOME/android-25/android.jar. Again, flutter tools should tell us where it is.\r\n\r\n*Where do we get javadoc for Android API's?*\r\n\r\nAssuming it's installed,  $ANDROID_HOME/sources/android-25 should contain all the Java source files. In IDEA, this should be attached to android.jar.\r\n\r\n*How should IDEA refer to android.jar?*\r\n\r\nI put Java configuration in a separate module for the \"android\" subdirectory. I think it's a hack, though; it should be part of the Android SDK. I suspect you need to enable Android support to create an Android SDK, though.\r\n\r\n*Where do we get flutter.jar?*\r\n\r\nThis seems to be defined by source code in a gradle file: \r\n\r\n   $FLUTTER_HOME/packages/flutter_tools/gradle/flutter.gradle\r\n\r\nFor a debug compile, its location is apparently:\r\n\r\n   $FLUTTER_HOME/bin/cache/artifacts/engine/android-arm/flutter.jar\r\n\r\n*Where do we get javadoc for flutter.jar?*\r\n\r\nI haven't found it yet. But it appears that Android Studio doesn't set this up properly either.\r\n\r\nAdding these two jars is good enough to get rid of the errors in MainActivity, except for a warning that MainActivity is never used. Presumably using Android integration would fix that.\r\n\r\nSo it looks like setting this up isn't too hard for the simple case, but making sure it stays up to date as the user modifies the Android/Flutter settings might be tricky. When ANDROID_HOME changes or the platform version changes  (according to flutter doctor) we need to use a different android.jar, and when FLUTTER_HOME changes (or is updated) then we might need to change the location of flutter.jar."}}
{"actor":{"display_login":"skybrian"}}