I'm trying to add this library to the project for Android Studio: https://github.com/kochedykov/jlibmodbus

Import examples that I found for cases where the import project has a gradle file. Tried to add file type

apply plugin: 'java' version '1.0' dependencies { } 

But classes from the module do not appear in the project. Tell me how to properly configure the assembly?

Gradle file is missing

    2 answers 2

    Paste the build.gradle into the dependencies block in the app folder with the code from the readme in

     <dependency> <groupId>com.github.kochedykov</groupId> <artifactId>jlibmodbus</artifactId> <version>1.2.8.4</version> </dependency> 

    The studio automatically converts it to compile 'com.github.kochedykov:jlibmodbus:1.2.8.4' . Now you can synchronize the project and lib will be connected.

    • In this case, it is loaded from a remote repository? And my computer is not stored? - levWi
    • @levWi, so either it will be downloaded to the local machine from the remote repository. Those. true first, but not the second. - YurySPb

    In the central repository there is already version 1.2.9.1.

     <dependency> <groupId>com.intelligt.modbus</groupId> <artifactId>jlibmodbus</artifactId> <version>1.2.9.1</version> </dependency> 

    Since version 1.2.9.0, the com.invertor.modbus package has changed to com.intelligt.modbus.jlibmodbus.

    • Is the central repository on github located? - levWi
    • On a private server. - kochedykov