Skip to content
Advertisement

Tag: crash

Using GridView in XML, getting java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView

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

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

Advertisement