Tag: android-support-library

Android error – Caused by: java.lang.NoClassDefFoundError: android.support.v4.util.SparseArrayCompat

I have these log errors when launching my app: > 05-20 01:48:35.312: E/AndroidRuntime(23032): FATAL EXCEPTION: main 05-20 01:48:35.312: E/AndroidRuntime(23032): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tomsyweb.suna/com.tomsyweb.suna.MainActivity}: android.view.InflateException: Binary XML file line #9: Error inflating class com.origamilabs.library.views.StaggeredGridView 05-20 01:48:35.312: E/AndroidRuntime(23032): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651) 05-20 01:48:35.312: E/AndroidRuntime(23032): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) 05-20 01:48:35.312: E/AndroidRuntime(23032): at android.app.ActivityThread.access$1500(ActivityThread.java:117) 05-20 01:48:35.312: E/AndroidRuntime(23032): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) […]

Instrumented tests failure with AndroidJUnitRunner 1.0.0 and AssertJ

I’m trying to update my project to recently released Android Test Support library version 1.0.0. But if I add assertj-core dependency Gradle instrumented test tasks start to fail with “No tests found” message. I can successfully run individual tests from IDE though. It is easy to reproduce the problem: Create new project from Android Studio […]

Replace deprecated android.support.v4.app.ActionBarDrawerToggle with support.v7 version cause drawer not works on Jelly Bean

Following the answer in this question i have replaced ActionBarDrawerToggle of support v4 library that in latest update(rev 21) has been deprecated with the latest ActionBarDrawerToggle of support-v7 library. Now the drawer works on Andrid Lollipop Emulator without deprecation warnings but when I test the app on a Jelly Bean real device no drawer and […]

AutoCompleteTextView float hint

I’ve tried a lot, but can’t make work an AutoCompleteTextView float hint using the TextInputLayout from support. It’s possible or I need to use an external library?

error: Error retrieving parent for item: No resource found that matches the given name 'Widget.AppCompat.ActionButton'

I am following the documentation here to install the Android SupportV7 Libary into my project. There are two things that I notice: 1)When I am browsing my SDK installation directory and the Support Library folder, there is no folder named “appcompat” 2)When I install the entire V7 folder anyways I get this error: error: Error […]

Why is DialogFragment.onCreateView called when Activity is being Destroyed?

I’m using the android support library v4 revision 11 and time to time, I see the stack trace below ; I suspect it’s happening due to a launch from recents, hence the model I’m trying to access is null. Anyhow, this trace has made me wonder why onCreateView is called when the activity is being […]

SearchView on support.v7.appcompat library issue: default 9-patch background not renders properly

I’m developing an app with ActionBar using support.v7.appcompat library. The action bar works, the SearchView is shown, the hint shows. The only problem is that the background of the SearchView is not scalling properly. Insead of the usual, it appears big and with the 9-patch black lines. Using: Developing from command line, using ant debug […]

Flaky Android Espresso Test – Snackbar

1) All devices/emulators being tested have animations disabled. 2) I have an @BeforeClass which builds my Credentials object. 3) I have an IntenServiceIdlingResource and an EventBusIdlingResource, registered in @Before. 4) When the sign in button is clicked, the IntentService fires off. In this case, the server (a mocked server) is returning a 500 error. That […]

CoordinatorLayout with two floating action buttons

I have two Fabs located inside a CoordinateLayout view. When I show a Snackbar, I expect the two Fabs go up all together, but the result is that only one of the Fab (lower one) responds and go up (see picture). what do I miss here? berfore after Calling snack bar mSnackbar = Snackbar.make(getActivity().findViewById(R.id.coords_wrapper), “Loading”, […]

Fragment must be a public static class to be properly recreated from instance state

After updating to the latest support repository, compile ‘com.android.support:appcompat-v7:24.2.0’ compile ‘com.android.support:design:24.2.0’ compile ‘com.android.support:percent:24.2.0’ compile ‘com.android.support:recyclerview-v7:24.2.0′ I’m getting the weird exception. java.lang.IllegalStateException: Fragment null must be a public static class to be properly recreated from instance state. at android.support.v4.app.BackStackRecord.doAddOp(BackStackRecord.java:435) at android.support.v4.app.BackStackRecord.add(BackStackRecord.java:414) at android.support.v4.app.DialogFragment.show(DialogFragment.java:154) at com.androidapp.base.BaseActivity.showDialogFragment(BaseActivity.java:78) at com.androidapp.MainActivity.showNewDialog(MainActivity.java:304) at com.androidapp.MainActivity$6.onClick(MainActivity.java:228) In my BaseActivity class, I’ve created a […]

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.