2017-02-08 21 views
0

初めてAndroidアプリを作成しようとしています。この目的のために私はAndroid Studio 2.2.3を使用します。私は単一のアクティビティを持つシンプルなアプリケーションを作成しましたが、それは何もしません。空の画面とそれ以上のものはありません。Androidスタジオでアプリをインストールできない

私はMeizuのMX6で開発していると私は、次のオプションに切り替える:

  • セキュリティアプリケーション - > USBのインストール・モニター
  • 設定] - > [指紋とsecuriry - >元不明
  • 設定 - >アクセシビリティ - >開発者向けオプション - > USBデバッグ

設定済みのudevルールもあります。

私が実行ボタンを押すと、私はこのメッセージを参照してください。

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? 

をし、[OK]を、このログはコンソール出力に表示されます押した後:

$ 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 

誰かがこの問題を解決する方法を説明できますか?

+0

誰かが同じような問題を抱えているようです:http://stackoverflow.com/questions/40534271/android-studio-failure-install-failed-user-restrictedそして解決策があります。 – vincenth

+0

重複している可能性があります - http://stackoverflow.com/questions/40534271/android-studio-failure-install-failed-user-restricted – Dibzmania

+0

[Androidスタジオ:Failure \ [INSTALL \ _FAILED \ _USER \ _RESTRICTED \]の重複している可能性があります。 ](http://stackoverflow.com/questions/40534271/android-studio-failure-install-failed-user-restricted) – hustas88

答えて

0

現在のユーザーがroot権限を持っているかどうかを確認します。これをやっていなければ開発者モードを有効にしてください。

0

一時フォルダをクリアしてプロジェクト内のビルドディレクトリを削除した後、もう一度ビルドしてください。

関連する問題