Importing gradle project to eclipse

后端 未结 3 506
时光取名叫无心
时光取名叫无心 2020-12-03 15:09

I have problem with importing this library into eclipse. Things I did:

  • run gradlew.bat (inside project) that downloaded and installed it
  • run CMD
相关标签:
3条回答
  • 2020-12-03 15:15

    Open file build.gradle and add this line on top:

    apply plugin: 'eclipse'
    

    In project directory invoke command

     gradlew.bat eclipse
    

    Open project in Eclipse (import) like normal eclipse project

    More info: Eclipse Plugin

    Alternatively use dedicated Eclipse plugin Gradle Integration for Eclipse 3.4.0.RELEASE

    0 讨论(0)
  • 2020-12-03 15:21

    There is a simplest and quick way to import a Gradle project into Eclipse. Just download the Gradle plugin for Eclipse from here.
    https://marketplace.eclipse.org/content/gradle-integration-eclipse-0

    And then from import select Gradle and your project would be imported. Then you have to click on Build Model to run it.

    EDIT Above link for Gradle plugin is no more valid. You can use the following link.

    https://marketplace.eclipse.org/content/buildship-gradle-integration

    0 讨论(0)
  • 2020-12-03 15:24

    This library is built with Android Studio or Intellj. These steps with Gradle are referred to Android Studio or IntellJ.

    I don't know this lib, but if you are using Eclipse, you should do:

    • clone a copy of this repository, or download it (outside eclipse workspace)
    • import the code in your workspace starting from library/Donation-lib folder
    • mark java(*) folder as source (click on folder -> Build-Path -> use as source folder). You can also remove the src folder, from the project.
    • mark aidl(*) folder as source
    • add support library v4 rel.XX ( click -> Android Tools -> Add support library , or just copy android-support-v4.jar in libs folder)
    • mark your project as Android Library (Properties -> Android -> Is library)

    (*) Eclipse uses src and res as source folders.
    Android Studio instead uses src/main/java , src/main/res and src/main/aidl as source folders.

    0 讨论(0)
提交回复
热议问题