1

i just made a simple android app with 6 buttons. Each button on click opens a new activity. I installed the app on my device via USB cable from Android studio and it runs fine on my device.

But here rises the problem, when I installed the app on my friends device after sharing via SHAREit the app installed on his device but did not run.

What could be the reason for this? And how can I solve this?

Please help. Thank you

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
stodgy.nerd
  • 601
  • 4
  • 9
  • 17

6 Answers6

1

You dont need to create a signed APK if you only want to test it on your friends device and not to run it in a production progress. Android Studio creates an apk automatically which is signed for 365 days. Just open your project in your explorer and go to [ProjectName]\app\build\outputs\apk and select the app-debug.apk.

Johannes Gnadlinger
  • 1,339
  • 1
  • 12
  • 32
  • The app is running on my device but it's not running when I share it with someone, I want to fix this. If one wants to use the app I can't give them every time via explorer. – stodgy.nerd Mar 26 '17 at 04:36
  • 1
    What exacty happens when you try to run it on another device? Can you install the apk? Can you run the app? Crash the app? – Johannes Gnadlinger Mar 26 '17 at 07:01
  • Yes the app installs on other device but does not run it says `App has stopped responding` – stodgy.nerd Mar 26 '17 at 07:04
  • To share it via github you have to open your project in Android Studio and go to **VCS->Import into Version Control -> Share Project on Github** then log in with your github credentials and share the link here – Johannes Gnadlinger Mar 26 '17 at 08:18
  • For me, after i share to another device, i cannot install on that Device...App not installed is shown simply.. – raghu raman Nov 09 '20 at 00:09
1

Make sure instance run in android studio is disabled.

Because if Instance run is enabled when you debug the app on real device through usb debugging it will work properly . but if u share the apk from your device to other device it will not work. It might show an error . App Name Unfortunately Stoped.

If Instance run is enable. you must disable the instance run first. If you don't know how to disable it just google it. After disable the instance run, you must clean project and Build new apk. It will work on all the other devices without generating signed apk.

Hope it may help you.

Bhuvan Arora
  • 154
  • 2
  • 13
0

While building the app what MinSDK version you defined? Do both devices satisfy that criteria?

If you suspect that installing through sharing app is a problem then try attaching your friend device to your laptop and try running the app. Or Send the apk through email and let your friend download the apk and install the apk through apkInstaller app.

  • Minimum APK was 4.3 Jellybean. I have Lollipop(out of box) and my friend has Marshmallow (custom ROM) – stodgy.nerd Mar 25 '17 at 18:59
  • Not sure if Custom ROM is culprit. Can you quickly move your code in try catch block and pop up a notification in catch block. Let your friend run that app and tell you if he is seeing any stack trace on his screen. Another way is to run your app in Android studio simulator using Marshmallow API and see if you face same issue. – vikram singh Mar 25 '17 at 19:11
0

I have a solution for you:

  1. Install Bluestacks Android Emulator.
  2. Go to Tools, Android and click on Enable Adb Integration to disable it.
  3. In android studios one Android Device for Bluestacks will appear while installation.
  4. Share the installed app through shareit.
  5. It will work on other device.

Hope it helps

0

Here is the link, where you will find your solution. https://developer.android.com/studio/publish/ check the point 'publish your app', In left column.

Amol J
  • 111
  • 2
  • 12
0

Simply follow these steps:

  1. Double click on shift and search for build apk and click on it.
  2. Locate that apk file.
  3. Copy to your physical device or your friend's device... whatever, it will work.
Felipe Desiderati
  • 2,414
  • 3
  • 24
  • 42