问题

I am trying to add an Uber 'request a ride' button in my android application. In my gradle build file I have added the following line:

compile 'com.uber.sdk:rides-android:0.5.0'

Automatically Android studio asks to sync the gradle files as they have changed. After this I get 500+ errors with my project but when I remove the dependency it all goes back to normal.

Could anyone please help me solve this issue?

The module gradle script:

apply plugin: 'com.android.application'

android {

compileSdkVersion 23

buildToolsVersion "23.0.1"

android {

useLibrary 'org.apache.http.legacy'

}

defaultConfig {

applicationId "com.example.android.myuberapp"

minSdkVersion 16

targetSdkVersion 23

versionCode 1

versionName "1.0"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/fonts'] } }

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

testCompile 'junit:junit:4.12'

compile files('libs/android-async-http-1.4.4.jar')

compile files('libs/volley.jar')

compile 'com.android.support:appcompat-v7:23.2.0'

compile 'com.android.support:design:23.2.0'

compile 'com.google.android.gms:play-services:8.4.0'

compile 'com.github.sembozdemir:ViewPagerArrowIndicator:1.0.0'

compile 'com.google.maps.android:android-maps-utils:0.4+'

compile 'com.github.jakob-grabner:Circle-Progress-View:v1.2.9'

compile 'me.grantland:autofittextview:0.2.+'

compile 'com.squareup.picasso:picasso:2.5.2'

compile 'com.uber.sdk:rides-android:0.5.0'

}

The full set of errors:

Error file is here

回答1:

It looks like you've past the 64k limit and should enable multidex.

The majority of those "errors" are actually warnings that gradle seems to be grouping together. Check the last couple lines of the error for the exact message.

In your build.gradle

android {

compileSdkVersion 21

buildToolsVersion "21.1.0"

defaultConfig {

...

minSdkVersion 14

targetSdkVersion 21

...

// Enabling multidex support.

multiDexEnabled true

}

...

}

dependencies {

compile 'com.android.support:multidex:1.0.0'

}

And in your manifest:

package="com.example.android.multidex.myapplication">

...

android:name="android.support.multidex.MultiDexApplication">

...

Separately:

Since the Uber SDK isn't that large, another suggestion to delay multidex is to only the use the Play services libraries you actually need.

For example, instead of

'com.google.android.gms:play-services:8.4.0'

You could use just cloud messaging (if that is the component used).

com.google.android.gms:play-services-gcm:8.4.0

See more here

来源:https://stackoverflow.com/questions/37688976/uber-sdk-in-android

android uber源码,Uber SDK in android相关推荐

  1. 使用代理下载android系统源码和SDK

    ** 使用代理下载android系统源码和SDK ** 谷歌被墙后,如何下载android源码和sdk?使用代理.步骤如下: 寻找可用代理 先在这里找一个可用的代理服务器:http://www.xic ...

  2. android 4 源码目录,LXR 目录Android 源码

    LXR 索引Android 源码 最近在学习android 源码,为了便于查看和搜索代码,利用LXR 建立了android 源码索引环境,非常方便. LXR 本身是建立对linux 源码进行索引的,本 ...

  3. 网上的很多Android项目源码有用吗?Android开发注意的地方。

    在Android项目开发中,我们可以在网上看到很多项目源码,大部分也不是很精致, 比如 06.Android阿福多媒体播放器开发教程+源码 还有什么浏览器源码. 那么这些有用吗?  价值在哪里? 精致 ...

  4. Android FFmpeg源码编译及在Android studio的集成

    准备工具: 1,ubuntu server 18.04.4(其他发行版服务器或桌面版都行,我这里以ubuntu为例,可以使用虚拟机,也可以使用公网的服务器) 2,ndk R17c linux版 (下载 ...

  5. android toolbar源码解析,深入理解Android 5.0中的Toolbar

    环境说明: Android Studio 2.0 V7包版本:com.android.support:appcompat-v7:23.4.0 compileSdkVersion 23 buildToo ...

  6. Android官方源码资料博客

    From 跟大家分享一些常用的Android相关的网址资料 一.Android系统 1.1 Android系统源码 网站 备注 https://android.googlesource.com Goo ...

  7. Android 音频源码分析——AudioTrack设备选择

    Android 音频源码分析--AndroidRecord录音(一) Android 音频源码分析--AndroidRecord录音(二) Android 音频源码分析--AndroidRecord音 ...

  8. android 4.4 源码编译,ubuntu12.04(64bit)编译android4.4源码、sdk及kernel

    最近闲来无事,就想编译一下android源码折腾折腾.过程还算顺利,编译源码用了近3小时,编译sdk用了近30分钟.关于为什么要编译4.4的源码,而不编译5.0.6.0的源码,一是正好笔记本中有下载好 ...

  9. android系统源码7.1.2_r8下载,编译,运行到nexus5X上,修改源码并编译SDK进行测试

    一,学习android系统源码下载,编译的作用 1,可以自己 DIY 自己的rom系统,从系统层面,宏观的加深理解 android系统 2,编译自己的 userdebug(原生root权限) rom, ...

最新文章

  1. 解析自动驾驶算法四大模块的问题与后续发展
  2. Can you answer these queries III (线段树维护最大子段和)
  3. linux(ubuntu版本)安装tengine
  4. 微信6516android,微信6516版本怎么可以分组
  5. hadoop 2.7.3 java_java - Hadoop 2.7.3 Java运行时错误 - 找不到core-site.xml - 堆栈内存溢出...
  6. 《系统集成项目管理工程师》必背100个知识点-73配置管理和变更管理
  7. 软件技术支持职责和能力要求(偏软件方向)
  8. java基础—IO流——复制一个文件到当前文件夹中
  9. iOS调用 AlipaySDK 支付宝找不到头文件openssl/rsa.h 的解决方案
  10. 协同过滤算法_基于用户的协同过滤推荐算法原理和实现
  11. Cocos2d Box2D之浮动刚体
  12. @PropertiesSource注解读取配置文件中的数据
  13. 20160507-hibernate入门
  14. 如何将 KVM 异构虚拟机启动效率提升 6~10 倍?
  15. 常用m脚本控制simulink模块方法
  16. 台式计算机无故重启,台式电脑突然自动重启是怎么回事
  17. 百度统计热力图邀请码
  18. python opencv 截取矩形区域_python+OpenCV 鼠标交互图片切割矩形区域
  19. bzoj 3838: [Pa2013]Raper (线段树)
  20. 目前最科学、最健康的作息时间表(附人体24小时生物钟)!

热门文章

  1. 以“术”彰“道”,用匠心做技术—对话阿里云MVP刘洪峰
  2. 说一说阿里云弹性公网IP那些事
  3. 一张图看懂智联车管理云平台
  4. 机器学习和人工智能的初学指南
  5. 2017双11技术揭秘—阿里数据库进入全网秒级实时监控时代
  6. 追踪 Kubernetes 中的网络流量
  7. 云计算到底是谁发明的?
  8. CPU 可以跑多快?地球到火星的距离告诉你!
  9. 易点云在京发布璇玑调度系统 中小企业办公IT升级步伐加快
  10. 游戏行业应该如何建设数据中台?