Android encryption unsuccessful error can show up due to various issues in your device or its software but we cannot pinpoint a single reason.Corrupted and clogged cache is also one of the main reasons for Android encryption unsuccessful error. Such an error cannot get phone encrypt state, which means that encryption unsuccessful error forces your device not to encrypt normally and thus, causes an obstruction in using it. Even when you reboot your phone several times, the encryption unsuccessful message shows up every time.
How to resolve it
Wiping data in Android Virtual Device Manager helped me in my case.
Tools -> Android -> AVD Manager -> Actions (triangle down) -> Wipe Data
