【发布时间】:2018-10-01 16:31:09
【问题描述】:
我是一名安卓学习者。我怀疑任何人都可以解决我的错误。我构建了一个普通的新闻故事应用程序。在 android studio 中,我构建了一个 100% 运行良好且没有错误的应用程序,并且所有应用程序功能都运行良好。然后在我生成构建 apk 以检查真实设备之后。安装 build apk 后,在真机上运行良好。
生成签名的 apk 并安装在真实设备上后。它没有在签名的 apk 上显示类别图像。但类别图像正在构建 apk 中。
我不知道为什么类别图像没有显示在签名的 apk 中。我不明白为什么它不会来。
后台使用 PHP 作为管理面板...
查看图像的差异...
Build apk showing category images please check image 1
signed apk not showing category images please check image 2
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '27.0.3'
defaultConfig {
applicationId 'com.example.demo'
minSdkVersion 14
targetSdkVersion 27
versionCode 1
versionName "1.0.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:21.0.3'
implementation 'com.google.android.gms:play-services:6.5.87'
implementation 'com.android.support:recyclerview-v7:21.+'
}
proguard-rules.pro:
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in G:\Programs\SDK\tools\proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
【问题讨论】:
-
请检查 logcat 是否有错误消息,如果有,请分享错误消息。是的,请与您的
build.gradle文件一起分享您的proguard-rules.pro以及文件。 -
使用“proguard-rules.pro”和 build.gradle 更新帖子请检查一次@ReazMurshed
-
这些图片是从网络加载的吗?
-
是的图片来自服务器@sravs
标签: android build.gradle