Skip to content

intellij gradle support unavailable #2124

Open
@FlutterIssues

Description

@FlutterIssues

From @darrellpf on June 3, 2017 17:35

Steps to Reproduce

Make a new flutter project in intellij
The project is not recognized as an official gradle project. For instance, the gradle side tab doesn't appear.

This causes issues when adding more android java code. For instance, adding classpath dependencies to build.gradle doesn't work properly.

dependencies {
compile 'com.google.android.gms:play-services-nearby:10.2.6'

Then in a java file

import com.google.android.gms.nearby.messages.Message;

The import statement fails.

Error:(4, 46) java: package com.google.android.gms.nearby.messages does not exist

There isn't a way to build the project.

However, using the technique in

https://stackoverflow.com/questions/42613594/flutter-intellij-plugin-java-language-support

It is possible to open a "gradle project window" of the same project. This results in a successful java build of the project. Unfortunately, the other "flutter project window" of the project still contains the same java files with the errors flagged.

Flutter Doctor

[✓] Flutter (on Linux, locale en_US.UTF-8, channel master)
• Flutter at /home/darrell/flutter
• Framework revision e2f54df5ab (24 hours ago), 2017-06-02 10:43:54 -0700
• Engine revision 1f2aa07571
• Tools Dart version 1.24.0-dev.3.0

[✓] Android toolchain - develop for Android devices (Android SDK 25.0.3)
• Android SDK at /home/darrell/Android/Sdk
• Platform android-25, build-tools 25.0.3
• ANDROID_HOME = /home/darrell/Android/Sdk
• Java binary at: /home/darrell/android-studio/jre/bin/java
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] Android Studio (version 2.4)
• Android Studio at /home/darrell/android-studio
• Gradle version 3.2
• Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.1)
• Dart plugin version 171.4424.63
• Flutter plugin version 14.0

[✓] Connected devices
• None

Copied from original issue: flutter/flutter#10487

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions