构建 APK(s):构建 APK 时出错。您可以在“消息”视图中找到错误
Posted
技术标签:
【中文标题】构建 APK(s):构建 APK 时出错。您可以在“消息”视图中找到错误【英文标题】:Build APK(s): Errors while building APK. You can find the errors in the 'Messages' view 【发布时间】:2019-02-06 08:19:57 【问题描述】:我无法在 android studio 3.1.4 中安装应用或构建 APK。它继续显示此错误:
“。”。
下面是我的 gradle。
应用插件:'com.android.application'
android
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig
applicationId "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
minSdkVersion 15
targetSdkVersion 27
versionCode 6
versionName "6.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
javaCompileOptions
annotationProcessorOptions
includeCompileClasspath false
lintOptions
checkReleaseBuilds false
abortOnError false
buildTypes
release
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// In the app build.gradle file
repositories
mavenCentral()
maven //url "http://oss.sonatype.org/content/repositories/snapshots/"
url 'https://maven.google.com'
repositories
mavenCentral()
maven url "http://oss.sonatype.org/content/repositories/snapshots/"
dependencies
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.jakewharton:butterknife-compiler:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
//compile 'com.amazonaws:aws-android-sdk-polly:2.3.8'
implementation 'com.jakewharton.timber:timber:4.7.1'
//implementation 'com.android.support:multidex:1.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.pavlospt:circleview:1.2'
implementation 'com.stripe:stripe-android:6.1.2'
implementation 'com.facebook.android:facebook-login:[4,5)'
//implementation 'com.google.android.gms:play-services:12.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.ms-square:expandableTextView:0.1.4'
dependencies
implementation ('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.4@aar')
transitive = true
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.6.3'
implementation ('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.6.1')
exclude group: 'android.arch.core'
transitive = true
implementation fileTree(dir: 'libs', include: 'Parse-*.jar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2',
exclude group: 'com.android.support', module: 'support-annotations'
)
// compile fileTree(include: ['*.jar'], dir: 'libs')
// fire base SDK gradle
implementation 'com.google.firebase:firebase-core:16.0.3'
//apply plugin: 'com.google.gms.google-services'
//implementation 'com.squareup.picasso:picasso:2.71282'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.github.bumptech.glide:glide:4.0.0-RC1'
implementation 'com.jakewharton:butterknife:8.8.1'
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:support-compat:27.1.1'
implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha2'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.android.support:support-annotations:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
testImplementation 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
【问题讨论】:
提高可读性 + 代码格式 什么是“消息”视图?我已经搜索了每个菜单和子菜单,但没有任何运气。 【参考方案1】:你可以试试这个
buildTypes
release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
【讨论】:
以上是关于构建 APK(s):构建 APK 时出错。您可以在“消息”视图中找到错误的主要内容,如果未能解决你的问题,请参考以下文章
在 Android Studio 中构建 APK 文件时出错
生成签名的 APK:构建 APK Android Studio 时出错
构建 APK 时出错:算法 HmacPBESHA256 不可用