Package Signed APK with UBER sdk 0.5.1 return 很多错误信息
Package Signed APK with UBER sdk 0.5.1 return lots of error message
我遇到了 UBER SDK 0.5.1 的问题。
当我使用 android 调试密钥时,可以创建 APK 而没有任何错误消息。
但是当我创建签名的 APK 时,出现了很多错误消息。
包含"apache httpclient 4.0.1",改装....
错误信息如下:
https://www.dropbox.com/s/7oce0kjodvp6rjl/uberError?dl=0
我正在使用 android studio 进行开发。有人可以帮助我或给我一些建议吗?
这是我的构建脚本
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
configurations.all {
resolutionStrategy {
force 'com.android.support:design:23.4.0'
force 'com.android.support:support-v4:23.4.0'
}
}
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile(project(':libraries:SlidingMenuLib')) {
exclude module: 'support-v4';
}
compile "com.android.support:support-v4:24.0.0-beta1"
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.google.android.gms:play-services-appindexing:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.8.+'
compile 'com.android.support:multidex:1.0.1'
compile 'com.uber.sdk:rides-android:0.5.2'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}
android {
dexOptions {
javaMaxHeapSize "2048M"
preDexLibraries = false
}
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
renderscriptOptimLevel 3
minifyEnabled true
pseudoLocalesEnabled false
zipAlignEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
signingConfig signingConfigs.FunNowconfig
}
debug {
debuggable true
jniDebuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
production {
signingConfig signingConfigs.FunNowconfig
versionCode = 163
versionName '1.6.3'
}
stagin {
versionCode = 163
versionName '1.6.3Stg'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
defaultConfig {
buildConfigField "boolean", "AUTO_UPDATES", "true"
minSdkVersion 16
targetSdkVersion 20
multiDexEnabled true
buildConfigField "String", "CLIENT_ID", "\"${loadSecret("UBER_CLIENT_ID")}\""
//Add your client id to gradle.properties
buildConfigField "String", "REDIRECT_URI", "\"${loadSecret("UBER_REDIRECT_URI")}\""
//Add your redirect uri to gradle.properties
buildConfigField "String", "SERVER_TOKEN", "\"${loadSecret("UBER_SERVER_TOKEN")}\""
//Add your server token to gradle.properties
resValue "string", "googleApiKey", "\"${loadSecret("GOOGLE_API_KEY")}\""
resValue "string", "facebook_app_id", "\"${loadSecret("FACEBOOK_APP_ID")}\""
resValue "string", "gcm_sender_id", "\"${loadSecret("GOOGLE_GCM_SENDER_ID")}\""
}
}
}
/**
* Loads property from gradle.properties and ~/.gradle/gradle.properties
* Use to look up confidential information like keys that shoudln't be stored publicly
* @param name to lookup
* @return the value of the property or "MISSING"
*/
def loadSecret(String name) {
return hasProperty(name) ? getProperty(name) : "MISSING"
}
我的顶gradle如下。
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
repositories {
mavenCentral()
}
}
allprojects {
repositories {
mavenCentral()
}
}
看起来像是使用混淆器的 SDK 中的错误。
在我们修复 SDK 期间,将此作为短期解决方法添加到您的 Proguard 配置中。
-dontwarn com.google.api.**
我遇到了 UBER SDK 0.5.1 的问题。 当我使用 android 调试密钥时,可以创建 APK 而没有任何错误消息。 但是当我创建签名的 APK 时,出现了很多错误消息。 包含"apache httpclient 4.0.1",改装....
错误信息如下: https://www.dropbox.com/s/7oce0kjodvp6rjl/uberError?dl=0
我正在使用 android studio 进行开发。有人可以帮助我或给我一些建议吗?
这是我的构建脚本
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
configurations.all {
resolutionStrategy {
force 'com.android.support:design:23.4.0'
force 'com.android.support:support-v4:23.4.0'
}
}
dependencies {
compile fileTree(include: '*.jar', dir: 'libs')
compile(project(':libraries:SlidingMenuLib')) {
exclude module: 'support-v4';
}
compile "com.android.support:support-v4:24.0.0-beta1"
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-maps:9.0.0'
compile 'com.google.android.gms:play-services-appindexing:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.8.+'
compile 'com.android.support:multidex:1.0.1'
compile 'com.uber.sdk:rides-android:0.5.2'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}
android {
dexOptions {
javaMaxHeapSize "2048M"
preDexLibraries = false
}
compileSdkVersion 23
buildToolsVersion '23.0.1'
useLibrary 'org.apache.http.legacy'
buildTypes {
release {
debuggable false
jniDebuggable false
renderscriptDebuggable false
renderscriptOptimLevel 3
minifyEnabled true
pseudoLocalesEnabled false
zipAlignEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
signingConfig signingConfigs.FunNowconfig
}
debug {
debuggable true
jniDebuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
productFlavors {
production {
signingConfig signingConfigs.FunNowconfig
versionCode = 163
versionName '1.6.3'
}
stagin {
versionCode = 163
versionName '1.6.3Stg'
}
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
defaultConfig {
buildConfigField "boolean", "AUTO_UPDATES", "true"
minSdkVersion 16
targetSdkVersion 20
multiDexEnabled true
buildConfigField "String", "CLIENT_ID", "\"${loadSecret("UBER_CLIENT_ID")}\""
//Add your client id to gradle.properties
buildConfigField "String", "REDIRECT_URI", "\"${loadSecret("UBER_REDIRECT_URI")}\""
//Add your redirect uri to gradle.properties
buildConfigField "String", "SERVER_TOKEN", "\"${loadSecret("UBER_SERVER_TOKEN")}\""
//Add your server token to gradle.properties
resValue "string", "googleApiKey", "\"${loadSecret("GOOGLE_API_KEY")}\""
resValue "string", "facebook_app_id", "\"${loadSecret("FACEBOOK_APP_ID")}\""
resValue "string", "gcm_sender_id", "\"${loadSecret("GOOGLE_GCM_SENDER_ID")}\""
}
}
}
/**
* Loads property from gradle.properties and ~/.gradle/gradle.properties
* Use to look up confidential information like keys that shoudln't be stored publicly
* @param name to lookup
* @return the value of the property or "MISSING"
*/
def loadSecret(String name) {
return hasProperty(name) ? getProperty(name) : "MISSING"
}
我的顶gradle如下。
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
repositories {
mavenCentral()
}
}
allprojects {
repositories {
mavenCentral()
}
}
看起来像是使用混淆器的 SDK 中的错误。
在我们修复 SDK 期间,将此作为短期解决方法添加到您的 Proguard 配置中。
-dontwarn com.google.api.**