- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我的 android apk 大约是 22MB,即使我没有使用过任何沉重的东西。分析 apk 文件后,我发现一个目录“lib”,其中包含针对不同体系结构的文件名“libclasifier_jni.so”,我不确定它来自哪里。以下是相同 的屏幕截图
你能告诉我这里缺少什么吗?
下面是build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.pixyfisocial"
minSdkVersion 15
targetSdkVersion 27
versionCode 24
versionName '5.0.0'
multiDexEnabled true
testApplicationId "com.pixyfisocial.screens.presenters"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
productFlavors {
}
}
configurations {
all {
exclude module: 'json'
exclude module: 'commons-logging'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
testCompile 'org.powermock:powermock-api-mockito2:1.7.4'
// https://mvnrepository.com/artifact/org.powermock/powermock-module-junit4
testCompile 'org.powermock:powermock-module-junit4:1.7.4'
// https://mvnrepository.com/artifact/org.mockito/mockito-core
testCompile 'org.mockito:mockito-core:2.8.9'
implementation 'de.hdodenhof:circleimageview:2.2.0'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.android.support:recyclerview-v7:27.1.1'
compile 'com.android.support:cardview-v7:27.1.1'
compile 'com.android.support:design:27.1.1'
implementation 'com.facebook.android:facebook-android-sdk:4.33.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.clans:fab:1.6.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.android.support:support-v4:27.1.1'
compile 'com.google.code.gson:gson:2.8.2'
compile 'com.google.firebase:firebase-appindexing:15.0.1'
compile 'com.google.firebase:firebase-auth:16.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.firebase:firebase-invites:16.0.0'
compile 'com.android.support:customtabs:27.1.1'
compile 'com.google.firebase:firebase-ml-vision:16.0.0'
compile 'com.google.firebase:firebase-ml-vision-image-label-model:15.0.0'
compile 'com.github.greenfrvr:hashtag-view:1.3.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.1'
implementation project(':pixyfi-data')
implementation project(':pixyfi-services')
implementation project(':utility')
}
apply plugin: 'com.google.gms.google-services'
最佳答案
What is libclasifier_jni.so in android's apk?
您已经使用了包含这些 SO 文件的 Firebase 视觉图像库。
compile 'com.google.firebase:firebase-ml-vision-image-label-model:15.0.0'
My android apk is around 22MB
如果您在应用中使用 Fragment Vision 库,则不得通过任何 gradle 配置从 apk 中排除这些 ndk 文件。
什么是解决方案?
Although you should build a single APK to support all your target devices whenever possible, that might result in a very large APK due to files needed to support multiple screen densities or Application Binary Interfaces (ABIs). One way to reduce the size of your APK is to create multiple APKs that contain files for specific screen densities or ABIs.
Play商店支持拆分apk,可以为multiple cpu ABI拆分多个apk。 .有4 SO files在你的应用程序中。每个大小为 3-4MB。因此,如果您使用拆分 APK,那么每个 APK 都会减少不必要的 12MB。
armeabi-v7a
and arm64-v8a
让我告诉您有关 ABI 百分比统计的有用信息。如果您真的不关心所有 ABI,那么您可以包含两个 ABI ndk。早些时候我发布了详细的静态信息 Answer Here ,这将帮助您更好地了解 ABI 百分比。
因此,如果您包括 armeabi-v7a
和 arm64-v8a
架构,那么您可以覆盖 99% 的 Android 设备。
这就是您可以在 APK 中只包含这两个 ABI 的方法。
buildTypes {
release {
ndk {
abiFilters "arm64-v8a", "armeabi-v7a"
}
}
This blog将帮助您为多个 APK 和 ABI 过滤器配置 gradle,并更好地理解 ABI 管理。我还必须说 Google's Android page有您需要的完美信息。
关于android - android apk 中的 libclasifier_jni.so 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52905029/
我已经为我的 Android 应用设置了 Google Play 测试版程序。想象一下以下场景: 我将 apk1 作为 versionCode 1 的测试版发布 Beta 用户安装此 Beta 版本
我需要在 android studio 中生成一个未签名的 APK。我看到了其他一些关于此的问题。 Export unsigned apk from a Gradle Project in Andro
我想知道更新是如何进行的?它如何更新特定文件仅更改?我的意思是在更新期间,整个 apk 是否再次安装或仅特定文件更改?它是如何工作的?我只想知道 android market 如何在没有用户提示的情况
如何在使用新 apk 的情况下升级 android 应用程序而不丢失以前的 apk 数据? 最佳答案 有一个versionCode AndroidManifest.xml 中的元素。这是一个整数,每个
我看到 Android 在输出文件夹中同时创建了一个“普通”APK 和一个 androidTest APK? 即 app-dev-debug.apk app-dev-debug-androidTest
Upload failed You uploaded an APK that is signed with a different certificate to your previous APKs.
对我来说,这发生在所有项目中。当我从 Android Studio 生成签名的 apk 时,我收到以下正确消息: 问题:在此之后,当我实际上并没有生成签名的 apk 时,我继续为项目发生的每个构建收到
我需要在 Windows 上反编译 & 重新编译一个 apk... 我正在关注此链接 Reverse Engineer APK 问题是我找不到发出请求的文件(请参阅上面的链接)“找到发出请求的文件 g
我寻找一种方法来制作一个可以更改我的第一个 apk 的默认图标的 apk。例如 ADW Launcher。 我该怎么做?也许是一种获取另一个 apk 的绘图的方法? 感谢您的帮助。 最佳答案 我想您正
我正在开发一个基于图像的应用程序,具有以下属性: 手机版本的 apk 大小(不含图像)约为 15MB,平板电脑版本约为 25MB。 图像总大小约为 30MB。 该应用程序将以测试版状态发布,可能会频繁
假设在网站上我有一个 apk 和网站的在线 JSON 数据,现在依赖于那个 apk 我想用新的 JSON 数据重新生成新的 apk 文件,还需要Manifest文件中的应用图标也要动态变化,包名也要动
今天我注意到当我在 Eclipse 中导出我的应用程序时,我得到了一个无扩展名的文件。我过去没有注意到这一点,所以我将此文件作为我的应用程序的 APK 文件上传到 Google Play。当我今天看到
我有一个同时适用于手机/平板电脑和电视的应用程序。当我在电视上使用 leanback 时,这个项目由 3 个模块组成。第一个(库)包含电视和移动/平板电脑模块通用的所有类,然后我有电视和移动/平板电脑
我制作了一个仅包含微调器和按钮的基本应用程序,但它的 Release模式大小为 1.4 MB,我认为这太大了,因为也有很多低于 200kB 的好应用程序可用 所以我在 gradle 文件中尝试了 b
我的移动开发人员已向我提供了一个 APK 文件,我需要将其上传到商店。它说,你需要在 Release模式下编译它。有没有一种方法可以让我对 apk 执行此操作,使其进入 Release模式并使用 ke
我在里面制作了一个 android 应用程序,我已经在“res/raw”文件夹中放置了一个 apk 文件,现在我在安装我的 apk 时想要什么,raw 文件夹中的 apk 也会安装,而无需再次单击安装
我有一个带有未签名包的 android 应用程序,每当我尝试安装此 apk 时,都会出现以下错误消息:Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]。 现
我开发的 Android 应用由不同的人群进行测试。 我们使用 Google Play Beta 方案。 同一组测试人员也提供生产支持。完成测试后,他们需要将设备恢复为生产应用,以便反射(reflec
我有一个已发布的应用程序。该应用程序使用 Google 的许可检查,因此为了测试该应用程序的新版本(使用测试帐户),必须在开发者控制台中上传 APK: 对于尚未上传到 Google Play 的应用程
我正在制作一个应用程序,我想在其中调用其他一些 apk(未预装),它们存在于我手机的 SD 卡中,我希望在安装主应用程序时安装它们。这可能吗?以及如何? 最佳答案 您可以使用以下 Intent 请求
我是一名优秀的程序员,十分优秀!