【问题标题】:Linux - How to install osmdroid libraries for android studio with Gradle?Linux - 如何使用 Gradle 为 android studio 安装 osmdroid 库?
【发布时间】:2017-03-21 09:23:30
【问题描述】:

我正在尝试编写一个使用 osmdroid 和 android Studio 制作 Android 应用程序的教程,但我没有成功使用我在 https://github.com/osmdroid/osmdroid 上下载的库

我的问题如下:

  1. 我必须将下载文件夹放在哪里:github.com/osmdroid/osmdroid?我在 home/android/sdk 中找不到任何 libs 文件夹。

  2. 我必须在这个命令中输入哪个版本:

    dependencies { 
      compile 'org.osmdroid:osmdroid-android:(INSERT_VERSION_HERE):release‌​@aar'
    } 
    

    而不是INSERT_VERSION_HERE。我不知道怎么找到它。

【问题讨论】:

    标签: android linux android-studio openstreetmap osmdroid


    【解决方案1】:

    按照https://github.com/osmdroid/osmdroid/blob/master/README.md的步骤进行操作

    您无需手动下载任何内容。打开您的build.gradle 并添加以下行(或修改您已经存在的部分):

    repositories {
        mavenCentral()
    }
    
    dependencies {
        compile 'org.osmdroid:osmdroid-android:5.6.5'
    }
    

    有关已发布的 osmdroid 版本列表,请参阅https://github.com/osmdroid/osmdroid/releases。目前最新版本是 5.6.5(截至 2017 年 2 月 4 日)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-17
      • 1970-01-01
      • 2013-05-11
      • 2014-12-02
      • 1970-01-01
      • 2023-03-03
      相关资源
      最近更新 更多