Q: how to resolve installation problem in device ionic 4 I'm trying install .APK in my divece but I get the following error "app was not installed", I'm using ionic v 4 and my divece is android 6.0.1, any idea ?

A: Use this command for V4 :
ionic cordova build --release android

This will generate unsigned apk file under 

platforms/android/build/outputs/apk/your-project-name.apk

And simply download apk file to your phone and install it. More details can be found here

A: I faced this error before and the cause was that using unsigned APK or the device contains app with same "App Id" 
So to Solve it, Please Follow this instructions: 
Use this Command 
ionic cordova build android --prod

Then Try to remove any other apps from your phone that may have same app id (any old versions or sample apps) or change your app id from config.xml (before build of course)
<widget id="com.android.YOUR_UNIQE_APP_ID" ... >

