Every time I try to start my app it crashes leaving this message in logcat Caused by: android.view.InflateException: Binary XML file line #15 in com.example.connect3game:layout/activity_main: addView(View, LayoutParams) is not supported in AdapterView Caused by: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView This is my code: MainActivity.java activity_main.xml Answer your GridView is lacking numColumns property and also its children must
Tag: crash
App crashes when connection is lost while using HttpUrlConnection
i’m making a class that get json data from an external url, it is working fine if there is a connection. also shows an error if there isn’t. the problem is if the connection lost while the class is getting data the app crashes. here is my code: so guys is there any solution to prevent the app from crashing?
Making a Snackbar Without a View?
I want to show a snackbar as soon as the user opens the Google Maps activity, but the thing is that there’s no views in the activity to use as the first parameter of the activity (in the findViewById() of Snackbar.make()). What do I put there? Here’s the java class code: Also, here is the activity xml code: And lastly,
Android Fatal Signal 11
In the app I’m developing on Android, I keep getting a Fatal Signal 11 error. I think it’s something to do with the way that I’m accessing the memory but I can’t figure out what is causing it. Here’s the LogCat: Answer I had been trying to call an uninitialised Canvas inside another Class so when it was trying to