I made an Android App and on every hardware device I tested it, it runs. This goes from 2.1.x to 4.2. But now I wanted to make sure, that it looks good on every screen size, so I tried the app in different emulators.
No single emulator configuration could run this app and I cant understand why. I always get this error
java.lang.RuntimeException: Unable to start activity ComponentInfo{*class*}: android.view.InflateException: Binary XML file line #325: Error inflating class android.widget.GridLayout
I think most of the error code is uneccessary to post, but there are 5 lines like this
E/AndroidRuntime(425): at android.view.LayoutInflater.rInflate(LayoutInflater.java:724)
I would understand an app that runs only in emulators (I once had this problem until I went to usb debugging with "real" devices), but an app that only gets along with real devices seems a bit weird to me. Someone has an idea?
EDIT
Lots of people have this error because of RAM problems, but my app uses not more than 5 MB
Related
new freelancer dev here.
I've been developing an Android App with Android Studio as apart of some freelance work I've been doing. I do all my testing and debugging on a virtual emulator of an android device while my client reviews the app on his tablet after the testing is done. With this latest version, everything worked perfectly on my emulator, but the app won't even start on my client's tablet. He tried testing the app on a different tablet and while the app runs, it doesn't function properly (Such as buttons not running different methods, crashing after specific inputs, etc.). We are both very confused at what is going on and don't know how to begin tackling this problem. Previous versions of the app work, but they do not have all the required functionality. Nothing major a lot was added or changed from the last version and this most current version. The app has worked on a variety of different emulator settings as well.
I am using the Android Studio built in emulator tools for testing and using Android Studio as my IDE. My app is written in full java while using XML for the layouts of the different pages of the app.
I'm not looking for any immediate fixes/solutions, but more of a general direction to go, because I don't even know how to start fixing this issue.
Also, I'd like to reiterate, previous versions of the app have worked perfectly fine, and all versions of the app work fine on my emulator. The most recent version only fails to start/run properly when run on my client's tablet(s).
I've tried matching my emulator to my client's tablet as closely as possible to try to recreate any potential issues, but I haven't been able to get any of the errors or bugs to appear during debugging. Since we're pretty far apart, I haven't been able to have access to either of the two tablets that he has tried running the app on. My client formatted the original tablet that he was using to test the app but is still having the same issue of the app not starting.
I launched my app in the alpha channel, and my Google Play Console pre-launch report details page shows an error occurred on Android 12 (SDK 31).
The stack trace that show me is:
ANR in com.google.android.apps.safetyhub;PID: 11778;Broadcast of Intent { act=com.google.android.gms.phenotype.UPDATE flg=0x30 pkg=com.google.android.apps.safetyhub cmp=com.google.android.apps.safetyhub/com.google.apps.tiktok.experiments.phenotype.ConfigurationUpdatedReceiver_Receiver (has extras) };
I don't see the name of my package anywhere.
Can you help me to understand what is causing the error?
If you are not using those packages of the ANR it is warning you about, it is likely a bug in the Google Play Console testing platform and/or simulated device. This is especially the case an error only appears on one device. It tests on numerous different emulated devices, so if it's just happening on one, it's probably just a one-off glitch that's unrelated. Good news is you don't need to pass the pre-launch report in order to release, so you can ignore it!
In any case, you should double check the full logcat. Click 'show more' then click the -> to the right of the device, then click download full log cat. If it doesn't seem like your app initiated any calls, it's probably just a background crash that is unrelated to your app and you can disregard it.
I have a little problem, I used to be able to see everything in the logcat (I am using Android Studio), in particular when a Java error occured (e.g. NullPointerException) I could see it quite precisely in the logcat. However since a while, I can see my System.out.print, and my Log (i.e. Log.i, Log.d etc) for instance but not the errors...
Hence my app crashes and I have absolutely no clue why.
Anyone having the same issue?
Best,
Alex
I just made a game with LibGdx and was trying to run it on the android device, however, I got a error like the following below. I read some article about a similar issue on stackoverflow, however, it did not help me.
If there are some developers out here who knows about the issue, It would be a great if you can give me a helping hand. I would love to hear from you !
19:05:29 Throwable: Unexpected error: package manager reports that package com.mygame.android has not been installed: Expected string 'Package [com.mygame.android]' not found in output:
19:05:36 Gradle build finished in 1 sec
You didn't specify which article you saw, but here's one which has an accepted answer from the original poster. So give these things a try if you haven't already.
Unable to deploy basic android app
Also, have you tried testing the default libgdx project (that displays the badlogic logo image) on your android device? Does this run ok or does this also not work?
So I downloaded the ADT bundle at the android website. I tried making a simple project, the one with HelloWord program. I already added an AVD and tried to run my application. At first, I got stuck at
"Waiting for HOME ('android :process:acore') to be launched"
but after searching the net, I learned that I must right click my project and click run as Android Application and then it was able to proceed with the next lnes in the console.
But after some lines, it gets stuck at the line in the console saying
"Starting activity.com.example.myfirstapp.MainActivity on device emulator:5554"
it's been an hour since that line and nothing has happened in the AVD. I tried using 2 ADT bundles, one for my 32-bit computer and one for my 64-bit computer. Both get stuck at the same line. How do I solve this? I've been working with this issue the whole day. Just when I thought it would be a simple installation.
Launch your emulator from Android Virtual Device(AVD) Manager and run your application
One thing that can really stick your program is a virtual device that is eating up too many resources. Try lowering the amount of RAM your virtual device has. Also be sure you have the latest JDK/JRE installed.
Just picked this book up:
http://www.amazon.com/Android-Development-From-Eclipse-ebook/dp/B00EEI5NHO/
Decently well written an very easy to follow. Walks through building an app in decent detail.
Actually the AVD works very slow on normal configuration systems, it requires a very high config PC to run smooth, you have to wait for sometime to continue with AVD, it will start don't worry. But I would recommend you to run and test your apps on a real android device using the USB debugging feature.