Giter VIP home page Giter VIP logo

mygdmap's Introduction

华为全面屏适配

https://developer.huawei.com/consumer/cn/devservice/doc/50111

高德地图集成SDK

高德地图 的Android Studio配置工程

buildscript {
    repositories {
        mavenCentral() //
        google()
        jcenter()
    }
}

allprojects {
    repositories {
        mavenCentral() //
        google()
        jcenter()
    }
}
android {
    defaultConfig {
        //设置支持的SO库架构(开发者可以根据需要,选择一个或多个平台的so)
        ndk {
            abiFilters "armeabi", "armeabi-v7a", "arm64-v8a", "x86", "arm64-v8a", "x86_64"
        }
    }
}

dependencies {
    //map3d和map2d只能存在一个,且导航只能使用map3d
    //navi导航SDK 5.0.0以后版本包含了3D地图SDK,所以请不要同时引入 map3d 和 navi SDK。
    //3D地图
    //implementation 'com.amap.api:3dmap:latest.integration'
    //2D地图
    //implementation 'com.amap.api:map2d:latest.integration'
    //导航
    implementation 'com.amap.api:navi-3dmap:latest.integration'
    //搜索
    implementation 'com.amap.api:search:latest.integration'
    //定位
    implementation 'com.amap.api:location:latest.integration'    
}

科大讯飞集成SDK

科大讯飞 的SDK下载

测试

test2 : 综合使用搜索和导航实现导航到周边餐馆功能示例

https://github.com/amap-demo/android-navi-quick-start

包名

//module当做application时applicationId要使用app的包名,
//打包的AndroidManifest.xml也会自动转换为app的包名
if (rootProject.ext.isPermissionApplication) {
    applicationId android.applicationId
}

Android8.0适配

报错:

android.app.RemoteServiceException: Bad notification for startForeground: 
java.lang.RuntimeException: invalid channel for service notification: 
Notification(channel=null pri=0 contentView=null vibrate=null sound=null 
defaults=0x0 flags=0x40 color=0x00000000 vis=PRIVATE)

解决参考:

https://lbs.amap.com/api/android-location-sdk/guide/utilities/permision_8

错误:

java.lang.NoSuchFieldError: No static field navi_fragment of type I in class Lcom/amap/navifragement/R$id; or its superclasses (declaration of 'com.amap.navifragement.R$id' appears in base.apk)

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.amap.api.maps.MapView.onCreate(android.os.Bundle)' on a null object reference

解决:

注意MapView所在的layout名称 不要和其他layout名称相同。

mygdmap's People

Contributors

ablexq avatar

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.