I'm trying to make a very simple android app using Android Studio, it should open with a splash screen, then open a WebView.
I made it, and it works perfectly on my phone (with android 4.4.2), but when I try to use it on other device, I only get a white screen. I tried to use on a phone with android 4.1.2 and 6.0, none of them worked.
Any ideas where could be the error?
Edit:
Here's the files
https://github.com/gethuliogripp/kitexp
I've come across this problem and I was getting no errors as well. You have to make sure the images you use in the app such as your web view and splashcreen actually fit the screen so the app doesn't run out of memory. So make sure your images in your drawable are almost the same size as your phone screen, for my background i made the image 3in by 5in and my app works on all devices now.
Related
I have been facing this issue while creating any android program/app using android studio. Whatever I design in android studio, it is not displaying properly as designed in android studio while running the app on my phone.
In short, sometimes size and the places of the controls get changed while running the app on my android phone. Please help. Thank you.
That's probably because of the difference in screen sizes of your preview and your physical phone . I've recently started using constraint layout and I think it's the best so far, a bit confusing at first but easy to understand it, it even has an option for percentage of width/height of the total screen for a view. Try that out.
I'm working on a Cordova mobile app that uses jQuery Mobile. On this app, we've created buttons using icons from the Font Awesome library. In Chrome, everything works great -- the icons appear as they should. However, if we compile the app and run it on our Android test devices then the icons will start to randomly replace other icons on the same page.
If we use Chrome DevTools to inspect the page while the mobile app is running on the phone, the icons display correctly on the desktop inspector, but not on the mobile device.
Here's a screenshot of the icons displaying correctly. This is from Chrome DevTools inspecting the mobile app while it's running live on the mobile device.
Here's a capture of the same screen taken from the device. I've indicated in red where the differences in icons are.
More pertinent observations and facts:
Our primary test devices are Samsung S7s running Android 7.0 -- all of these devices have this same problem.
The icons do not start to replace one another until we've changed pages a couple times.
It's not consistent which icons get replaced. It will vary each time we fire up the app. One icon that gets replaced one time might be left untouched the next time.
This problem does not occur on our older Android test device (Droid Razr Maxx HD running Android 4.4.2).
I've tried re-compiling the app with the android-targetSdkVersion removed, set to 22 and set to 25. In all instances, the icons continue to swap randomly on the newer Androids.
We've upgraded cordova-android to the latest version (6.2.3 as of writing) and the issue remains.
If I use Chrome DevTools to manually remove the Font Awesome icon CSS class (e.g., fa-user-plus) and then re-add it again, the icon will then display correctly on the device.
We've noticed that sometimes (as you can see in the screenshot below) a small white line might appear underneath an icon that has been replaced.
Does anyone know what might be causing this? Any theories on how it's possible for Chrome DevTools to show one thing while the device shows another would also be helpful.
I stumbled across a solution for this problem while debugging a separate issue on the same app where position:relative elements would disappear while I was scrolling on a mobile device.
While I haven't been testing on an iPad, the solution provided in this question iPad Safari scrolling causes HTML elements to disappear and reappear with a delay fixed both issues.
What I did was apply -webkit-transform: translate3d(0,0,0) to the class .ui-btn (the jQuery Mobile class for buttons). After a re-compile, the icons would no longer randomly swap with one another.
I have little insight as to why -webkit-transform: translate3d(0,0,0) fixes this apparent WebView rendering bug. If anyone has a deeper understanding of what's going on, please leave a comment!
I created a small app using following this tutorial.
App runs fine on Android but after running on 2 mobiles both running Android 4.1.2, I find that in one mobile the layout was broken. I mean button borders are broken.
Any suggestions on what is going wrong here ?
Using latest ionic framework and cordova.
This mostly happens because different mobile screen size.
You should create different layout files for different screen sizes
For more information go here:
http://developer.android.com/training/multiscreen/screensizes.html
I have an app that has an widget preview image. I recently updated this image on the app, but in a device with Lollipop (5.0) version of android, the preview image of the widget shows the old image (the one I replaced). The same doesn't occur in devices without Lollipop.
I turned the resources folder upside down searching for the old image, but it is correctly updated in all the places (actually, it is only in one folder, as I have only one image of the preview).
Just to give more info, I'm using Android Studio 1.0-rc1, and this problem only occurs in my Nexus 4 with lollipop (5.0) running on it.
I tested in some emulators with Lollipop, and the same happened.
It's important to highlight that if I never installed any previous version of the app (with the old widget preview image), when I install the new version the preview image appears to be correct.
Is anyone having the same problem, or knows how to solve this?
Thanks.
I had the same problem. I managed to work around it (on Nexus 5) by going to the settings of the launcher app (Settings -> Apps -> Google App) and deleting the cache.
I also had this same issue and the answer by #spookypeanut put me on the right track.
My phone is running CyanogenMod so I had to go to app Launcher3 (com.cyanogenmod.trebuchet), clear cache and force stop it. After it reloaded all the previews updated.
So I am developing an app and I am not sure what had happened. I have everything set up correctly on the ADT but the emulator and my device show up differently. I'm not sure what code to put up. I have tabs with scrollview and text on the ADT but my device just has no tabs and the text overlaying eachother
First thing I would personally try would be to uninstall the application from the mobile device and rerun the code. Second thing to check would be the resolution off both devices? Maybe your mobile has lower resolution than the emulator and as a result the displayed output is a mess? Are you getting the expected output displayed in the emulator? I am nowhere near good at android development, but that's what I would try. Hope I helped at least a bit.