Slice signatures are inconsistent with android studio default run

旧时模样 提交于 2019-12-05 09:42:15

问题


I've configured gradle for signing with:

android {
    ...
    signingConfigs{
        debug {
            storeFile file("...");
            storePassword '...'
            keyAlias '...'
            keyPassword '...'
        }
    }
}

Now when I run the Gradle task installDebug the app is signed and installed correctly and I can run the app as expected. But when I run the app module (android studio default run, which is much preferred for debugging). I get the message:

Failed to finalize session : INSTALL_FAILED_INVALID_APK:
/data/app/vmdl2083307194.tmp/1_slice__ signatures are inconsistent

This happens even when No apk is yet installed.

I think it has to do with android studio splitting the apk improperly. So if nobody knows how to make it sign correctly a way to keep android studio from splitting the apk will probably also work.


回答1:


I just ran into the exact problem after defining the signature for the debug build. After deleting the previous app from the test device, Clean Project / Rebuild Project did the trick for me.



来源:https://stackoverflow.com/questions/42668955/slice-signatures-are-inconsistent-with-android-studio-default-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!