Android Unsigned App not able to install on device

2019-05-05 06:50发布

My app able run on simulator and I export it as Unsigned App.

On my phone's Setting-->>Applications--->>Unknown sources checked.

I download the .apk into phone storage through USB.

Then under File Manager, I found that stored .apk and hit install button and it try to install,

But finally it says Application Not installed. but why? wht's wrong?

Also I try ./adb install -r myapp.apk but it said error:device not found

5条回答
The star\"
2楼-- · 2019-05-05 07:35

If you are using Eclipse, you don't need to export your app as "unsigned apk". Simply enable "Allow Unknown Sources" on the phone, and right click on project and hit "Run As".

Unsigned apks are generated by signing them with the debug.keystore key that's stored in the Android SDK. It could be possible that his key is corrupted. To verify, check to see if any other project also gives a similar problem. To resolve th key corruption, delete your SDK and install again (shouldn't take more than 15mins).

In case other projects work fine, which means your debug.keystorekey is NOT corrupt, you need to uninstall any previous versions of this app on your phone and restart your phone.

It could also be possible that the adb server could be messed up. In that case, restart your Eclipse or do adb kill-server from command line.

Also, seems like other people have faced similar issues. Did you search similar StackOverflow questions and try out the solutions? Here's one: 'App not Installed' Error on Android

查看更多
放我归山
3楼-- · 2019-05-05 07:37

All applications must be signed in order to install on emulator or real device, check out the official dev guide signing your application:

  • All applications must be signed. The system will not install an application on an emulator or a device if it is not signed.
  • To test and debug your application, the build tools sign your application with a special debug key that is created by the Android SDK build tools.
查看更多
看我几分像从前
4楼-- · 2019-05-05 07:46

I have never tested an app on a device by using your method... When I am NOT debugging on my device using usb and I just want to install it on my phone, I do the following:

  1. If you have run it on the emulator then there is an .apk file in the bin directory of your project.

  2. Move that .apk to your phone via usb or another method (I use dropbox).

  3. Open the .apk and install on your phone.

The previous answers are correct, it must be signed. But by doing my method it will be signed with your debug key.

You will obviously want to actually sign it with a real key before publishing it to the market.

查看更多
Melony?
5楼-- · 2019-05-05 07:47

Unsigned APK can be installed in real mobile devices for purpose of testing.

Just follow these steps on images:

enter image description here

enter image description here

Locate the APK and send it to your mobile through gmail etc..

查看更多
We Are One
6楼-- · 2019-05-05 07:48

Specifically how are you getting the APK to the device? Try dab install <path to APK>. Also, you can install APKs from the Android browser by uploading it to any web server and navigating to its URL.

You must export and sign with a debug certificate before installing. Read about publishing.

查看更多
登录 后发表回答