迁移到Android Studio 3后,该应用无法在Android 7.1以下的设备上运行

KR

升级到Android Studio 3后,无法在我们尝试过的Android 5和7设备上安装该应用程序-如果我向自己发送APK时显示“未安装应用程序”,并且如果我尝试从AS进行构建,则会使用以下命令重新启动手机日志中损坏的内存块异常。

不过,可以将App安装在运行这些android版本的模拟器上。

该应用可以安装在经过我们测试的Android 7.1.1和8上。

尝试启用和禁用Java 8兼容性-结果相同。

启用缩小。还另外在2个模块中启用了它。

compileSdkVersion 26
buildToolsVersion '26.0.2'

defaultConfig {
    minSdkVersion 21
    targetSdkVersion 26
    useLibrary 'org.apache.http.legacy'
    applicationId 'com.myapp.android'
    versionName "6.0.0.2"
    versionCode 6002
    multiDexEnabled true
    testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
}

这是错误消息

ime: Calling main entry com.android.commands.am.Am
11-01 11:03:20.807 26024-26589/system_process I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.myapp.android/.app.MainActivity_} from uid 2000 on display 0
11-01 11:03:20.811 26024-26589/system_process A/libc: invalid address or address of corrupt block 0x39 passed to dlfree
11-01 11:03:20.811 26024-26589/system_process A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xdeadbaad in tid 26589 (Binder_8)
11-01 11:03:20.913 14726-14726/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-01 11:03:20.913 14726-14726/? I/DEBUG: Build fingerprint: 'motorola/condor_retgb/condor_umts:4.4.4/KXC21.5-40/46:user/release-keys'
11-01 11:03:20.913 14726-14726/? I/DEBUG: Revision: '33456'
11-01 11:03:20.913 14726-14726/? I/DEBUG: ABI: 'arm'
11-01 11:03:20.914 14726-14726/? I/DEBUG: pid: 26024, tid: 26589, name: Binder_8  >>> system_server <<<
11-01 11:03:20.914 14726-14726/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xdeadbaad
11-01 11:03:20.945 14726-14726/? I/DEBUG: Abort message: 'invalid address or address of corrupt block 0x39 passed to dlfree'
11-01 11:03:20.945 14726-14726/? I/DEBUG:     r0 00000000  r1 b6ee4dec  r2 deadbaad  r3 00000000
11-01 11:03:20.945 14726-14726/? I/DEBUG:     r4 00000039  r5 b6ee60d4  r6 98697000  r7 00000041
11-01 11:03:20.945 14726-14726/? I/DEBUG:     r8 9e566bfc  r9 9e566cbc  sl b6bd85d2  fp b6bd85db
11-01 11:03:20.945 14726-14726/? I/DEBUG:     ip 80808000  sp 9e566ba8  lr b6eb5e2f  pc b6eb5e30  cpsr 60010030
11-01 11:03:20.945 14726-14726/? I/DEBUG: backtrace:
10-31 22:41:28.134 254-254/? I/DEBUG:     #00 pc 00028e30  

/system/lib/libc.so (dlfree+1239)
10-31 22:41:28.134 254-254/? I/DEBUG:     #01 pc 0000f0c3  /system/lib/libc.so (free+10)
10-31 22:41:28.134 254-254/? I/DEBUG:     #02 pc 00012dd9  /system/lib/libandroidfw.so (android::ResStringPool::uninit()+38)
10-31 22:41:28.134 254-254/? I/DEBUG:     #03 pc 00013b33  /system/lib/libandroidfw.so (android::ResXMLTree::uninit()+12)
10-31 22:41:28.134 254-254/? I/DEBUG:     #04 pc 00013b51  /system/lib/libandroidfw.so (android::ResXMLTree::~ResXMLTree()+4)
10-31 22:41:28.134 254-254/? I/DEBUG:     #05 pc 00010843  /system/lib/libandroidfw.so (android::AssetManager::getPkgName(char const*)+258)
10-31 22:41:28.134 254-254/? I/DEBUG:     #06 pc 000108a5  /system/lib/libandroidfw.so (android::AssetManager::getBasePackageName(unsigned int)+68)
10-31 22:41:28.134 254-254/? I/DEBUG:     #07 pc 00080de7  /system/lib/libandroid_runtime.so
10-31 22:41:28.134 254-254/? I/DEBUG:     #08 pc 00270eef  /data/dalvik-cache/arm/system@[email protected]

编辑:我在这里找到了可能与https://issuetracker.google.com/issues/64434571相关的内容

KR

因此,事实证明这是CyanogenMOD / LineageOS和其他自定义ROM中的错误,这些ROM会修改不应修改的内容。

解决方法是关闭AAPT2(但我不知道它的缺点是什么)

Google已在构建工具27中修复了此问题,但我不知道我们是否可以使用它?

https://issuetracker.google.com/issues/64434571

编辑:如果您仍然无法在未直接构建的某些设备上安装应用,请首先选择文件->使缓存无效/重新启动,然后进行构建->清理,最重要的是-不要使用该APK文件您可以通过单击“运行”获得,使用您可以通过Build-> Build APK创建的一个

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

迁移到Android Studio

从Eclipse迁移到Android Studio

迁移到Android Studio后,出现TransformException

迁移到androidX失踪Android Studio中

将SVN迁移到Android Studio

迁移到Android Studio时进行投射

产品风味[从eclipse迁移到android studio]

Android Studio无法在Windows 7上运行

如何将项目从android studio迁移到android studio

在构建gradle迁移到androidx之后,Android Studio卡在:app:transformdexarchivewithdexmergerfordebug上

迁移到 android studio 3.1 后的奇怪错误

将Eclipse应用和库迁移到Android Studio

Android Studio 将 androidx 迁移到 android 8.1

Android Studio无法在设备上运行项目?

迁移到 androidX 后无法运行应用程序:android.view.InflateException

将Libgdx项目从Eclipse迁移到Android Studio时出错

将Git项目从Eclipse迁移到Android Studio

如何将GoogleApiClient迁移到Android Studio?

迁移到Android Studio:如何更好地配置logcat视图

迁移到AndroidX在Android Studio上不起作用

使用Gradle从Eclipse + ADT插件迁移到android studio

在 Android 设备上运行 Android Studio

Android Studio提示错误,无法运行该应用

错误:迁移到android x后,包android.support.v7.app不存在

Android Studio无法在设备上安装应用

Android Studio应用可在真实设备上运行,但无法在模拟器上运行

在启用即时运行的Gradle 2.14.1上,新的Android Studio 2.2无法运行该应用

将sqlite数据库从android studio应用迁移到Xamarin.Forms应用

在Android Studio中自动在多个设备上运行应用