0

I'm trying to create my first android application. For this purposes I use Android Studio 2.2.3. I have created the simple app with the single activity and which does nothing, just empty screen and no more else.

I'm developing on Meizu MX6 and I switched ON the next options:

  • Security App -> USB installation monitor
  • Settings -> Fingerprint and securiry -> Unknown sources
  • Settings -> Accessibility -> Developer Options -> USB debugging

Also have configured udev rules.

When I press the Run button I see this message:

Installation failed with message INSTALL_FAILED_USER_RESTRICTED.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

And after pressing OK this log appears in the console output:

$ adb push /home/***/dev/android/HelloAndroid/app/build/outputs/apk/app-debug.apk /data/local/tmp/com.android.hello.helloandroid
$ adb shell pm install -r "/data/local/tmp/com.android.hello.helloandroid"
pkg: /data/local/tmp/com.android.hello.helloandroid
Failure [INSTALL_FAILED_USER_RESTRICTED]


$ adb shell pm uninstall com.android.hello.helloandroid
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APK

Can somebody explain how to fix this?

hustas88
  • 307
  • 3
  • 15
  • Seems like someone had the same kind of trouble : http://stackoverflow.com/questions/40534271/android-studio-failure-install-failed-user-restricted and has a solution. – vincenth Feb 08 '17 at 14:27
  • Possible duplicate of - http://stackoverflow.com/questions/40534271/android-studio-failure-install-failed-user-restricted – Dibzmania Feb 08 '17 at 14:32
  • Possible duplicate of [Android Studio: Failure \[INSTALL\_FAILED\_USER\_RESTRICTED\]](http://stackoverflow.com/questions/40534271/android-studio-failure-install-failed-user-restricted) – hustas88 Feb 08 '17 at 14:59

2 Answers2

0

Check if current user have root access. And enable developer mode if you didn't do this yet.

Anton Malmygin
  • 3,406
  • 2
  • 25
  • 31
0

Please build once again, after clearing temp folder and remove build directory in project.

kavita
  • 417
  • 4
  • 8