I'm requesting your help because I've made an app on Android studio, which works fine on my phone with usb debugging.
I tried to build the unsigned apk with gradle but it won't install and my phone says that "the package must be corrupted" when I try to install it. I also managed to install a debug version apk on my friend's phone, it installed but kept on crashing regularly and was unusable.
I probably have wrong settings in my project, but I'm new to this and don't really know what to do.
Thanks for your help
Goto Build Option->Choose Build APK(S) and then generate debug APK and that APK you can install in your device
Related
This file does not have an app associated with it for performing this action. please install an app or, if one is already installed, create an association in the default apps setting page android studio build Apk this file does not have an app associated with it for performing this action. please install an app or, if one is already installed, create an association in the default apps setting page.
Make sure that your instant run is enable or not? If so then i had similar experience and i solved by disable instant run as follows.
If you are sure that the apk is build, check whether the file is having the apk extension (appname .apk ).
Better way is to let Android Studio install it for you instead of building apk and manually installing it:
Enable 'USB debugging' from you phones 'Developers Options' .
Connect your Phone to your PC and Click on 'Run' app option in Android Studio.
Select your device from the popup window.
If there is any already installed app, or any internal errors, Android Studio will take care of it.
I just made a simple android app with 2 buttons. Each button onClick 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
This issue is most probably due to the Android instant run features. Try the following steps to get this working,
Step 1: From Android Studio, click on Build => Build APK. Once the build is complete, you will see an option to view the APK in explorer. Copy the app-debug.apk to a folder of your choice.
Step 2: Open a command line. Switch to the folder which contains app-debug.apk. Run the following command to install your APK on phone,
adb install -r app-debug.apk
Step 3: From your phone, use Share-it to copy the APK to your friend's phone. Now the app should run.
This is happening sometime, when do some changes in app configuration/ gradle by unknowingly,
DO THIS THING FOR SOULUTION:
Close Project in Android Studio.
Close Android Studio completely.
Rename your Project name.
Open Studio and import Project
Clean and Try to Run
I am facing an issue with Instant Run when using an Emulator.
I follow the directory and delete that
"slice_8" But it's still The Same Error Message ?!
Any ideas how I can solve it?
Disable(uncheck) instant run in settings > build,execution,deployment > Instant run
then clean your project in Build > clean project
if still problem not solved, then build > make project
run app
Most likely, you installed the currently installed APK from Google Play or some other source that means the certificate used to sign doesn't fully match the existing. A debug and a release certificate is different. The solution is simple. Uninstall it. Press OK and install the app. You can also uninstall it manually from the device/emulator.
If you keep getting the same error even though the certificate is the same, that is a different issue
It has to do with the flavors of the app. For an instance debug and release. Debug has one certificate, release has a different one. While the package may match, and from the ANdroid OS point of view, these apps are the same. But the one you install compared to the existing APK. The apps are the same, but the certificates do not match. So you need to uninstall the existing, as you cannot install an APK if there is a certificate mismatch.
If you're using BlueStacks as an emulator, you could go into Settings >> Preferences, then scroll down to Platform Settings and check (enable) "Enable Android Debug Bridge (ADB)".
I assume it's the same type of deal if you are using another emulator, just make sure the ADB is on.
I recently made a simple android app .Its working fine in my device but not running on any other phone when i share it via SHAREit or other means. I have already disabled Instant Run and I am currently working on API 22(Lollipop) and have tried it the phones with higher API's such as API 23 (Marshmallow). Can anybody please fix it. Thanks in advance.
Debug apk that is installed to the phone by Android studio will always gets some error when shared using SHAREit and similar softwares.
Bulid -> Rebuild Project
Bulid -> Build apk or Generate signed apk
Try sending the newly generated apk.
Go to build options in toolbar and click on build APK. After that use that APK it works in all devices.
I was testing my app in my AVD and the AVD no longer uploads the apk to the device. It used to work and I have reinstalled eclipse and the android SDK but it does'nt run the app. Any Suggestions to get it working???
There is one workaround, but a little bit more work, well for me i think its good, after u run/build on eclipse, there is an apk file in the /bin folder. I used to copy that .apk over there to my microsd and install and reinstall for comparison when you are on the go.