Coder Social home page Coder Social logo

flutter_plugin_helloworld's Introduction

flutter_plugin_helloworld

A new Flutter plugin.

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

image

의존성 추가

  • /android/libs/ 에 사용할 aar 파일을 넣습니다.
  • /android/build.gradle에 추가한 aar파일을 의존성에 추가합니다. 코드
  • flatDir 설정을 합니다.코드
  • flutter 앱에서 호출할 브릿지 메소드를 만듭니다.코드
  • android 네이티브 플러그인에서 메세지 처리를 합니다.코드

실행

example 디렉터리의 main.dart를 실행하세요 android studio에서 하시면 편합니다. 혹은 vscode에서 디버그 모드로 실행하세요

문제점

안드로이드 스튜디오에서 추가한 aar 또는 외부 의존성에 대한 인텔리센스가 안됩니다. (이건 제가 모르는거)

위 문제점 해결 방법

프로젝트를 열면 intellij flutter plugin이 example 을 메인 안드로이드 프로젝트로 인식하고 plugin용 android 프로젝트는 인식하지 못합니다. 위 이유로 프로젝트의 루트에서 프로젝트 실행 설정이 example/lib/main.dart 로 고정됩니다.

약간 불편함을 감수하더라도 인텔리센스를 이용하여 프로젝트를 진행하는 것이 좋을 것 같다면 아래의 순서대로 안드로이드 프로젝트를 열어서 작업합니다. 플러그인용 안드로이드 프로젝트로 모듈을 엽니다 image

인텔리센스가 잘 적용되는 것을 볼 수 있습니다. image

참조

https://github.com/flutter/flutter-intellij/blob/master/docs/android.md

flutter_plugin_helloworld's People

Contributors

changjoo-park avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rosd89

flutter_plugin_helloworld's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.