The application can not work on devices running Android 7.1 after the transition to Android Studio 3

After upgrading to Android Studio 3, the application cannot be installed on the Android 5 and 7 devices that we tried - if I send myself an APK, it says “Application has not been installed” and if I try to build from AS, it will reboot the phone with damage memory block in the logs.

The application can be installed on emulators that support these versions of Android.

The application can be installed on Android 7.1.1 and 8, on which we tested.

I tried Java 8 compatibility, both on and off - the same result.

Minification is included. Included in additional 2 modules.

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"
}

Here is the error message

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@framework@boot.oat

EDIT: -, https://issuetracker.google.com/issues/64434571

+4
1

, , CyanogenMOD/LineageOS , , , , .

- AAPT2 ( , )

Google 27, , ?

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

EDIT: - , , File → Invalidate caches/Restart, Build → Clean , , APK, RUN, , Build → Build APK (s)

+2

Source: https://habr.com/ru/post/1688513/


All Articles