Please, anytime I create a project with CardViews, my android emulator can't successfully run the app. Please help me, it's been happening for 2 days now. I followed this tutorial to learn how to use card views, which returned no errors but my emulator can't run the app successfully https://www.androidhive.info/2016/05/android-working-with-card-view-and-recycler-view/
Related
so i am working on android app programmed in java which shows a list of animals sounds in recycler view. The app works fine when i install it on my device from android studio but when i upload the apk to play console and install from play store the adapter becomes real mess and apps gets crashing untill i clear cache and app data from settings.
Here is what app looks like on first install from play store (https://i.stack.imgur.com/OTQkX.jpg)
When i clear cache and app data from settings and relaunch the app it works absolutely fine.(https://i.stack.imgur.com/HPbgM.jpg)
I have tries all possible solutions which i found online but they could not help. Can anybody explain why this occurs and whats the solution to this?
Update: Following #Tenfour4,s comment i switched to production build in android studio but surprisingly app is working fine . The issue only occurs when app is uploaded to play console and installed from there.
I am trying to run my app on an android studio emulator, it says that it lunch successfully but it does not work anda small window like the image pops
It might be because of random issue you can wipe the data from the AVD manager and relaunch your application in it. Hope it works fine.
it's happening because of several reasons, try to clean project and Rebuild project! then restart Android studio , sometimes it helps
I downloaded the Pixel emulator and Android API 25, but when running it
appears for a few seconds and then disappears
In the Event Log, this is what appears
I need help pls
The same Problem got me a few months ago:
I fixed it by doing this:
Whenever you run the project or app you have to clear the data of that AVD
To wipe the data of Emulator follow these steps-
Go To AVD Manager then you will see all emulators there then simply wipe data. ie- like in this image shown.
step 1
step 2
step 3
I also had random emulator crashes, everything would work for a short while, but then the emulator would just disappear as if it had stopped. The emulator.exe would still be running task manager, no way to recover the window and the .lock file couldn't be removed.
Even just starting the emulator and swiping the home screen left and right (not even starting my app), or going into the the apps drawer and back would cause the the emulator to stop working properly.
What worked for me was to always start Android Studio as "Run as administrator". So right click on the startmenu shortcut and select Run as administrator.
Not sure why it randomly stops working otherwise, I'm sure the Android Studio QA team thoroughly tests this on real-world laptops outside of Google labs right...? /s
I debugged an app on android studio to test it, I entered some values inside the app.
But when I debugged it again I found that those values still exist in the app.
I cleaned and build again but did not work.
Can anyone help please? and thank you in advace :)
On the device, close the app using task manager before running it again.
Alternatively, uninstall and reinstall it.
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
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.
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.
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.
I have a solution for you:
Install Bluestacks Android Emulator.
Go to Tools, Android and click on Enable Adb Integration to disable it.
In android studios one Android Device for Bluestacks will appear while installation.
Share the installed app through shareit.
It will work on other device.
Hope it helps
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.
Simply follow these steps:
Double click on shift and search for build apk and click on it.
Locate that apk file.
Copy to your physical device or your friend's device... whatever, it will work.