How to fix “Conversion to Dalvik format failed with error 1” when you make Export Unsigned Application Package in Eclipse

Today I’ve got the “Conversion to Dalvik format failed with error 1” error when make “Android Tools–>Export Unsigned Application Package” I have ADT 23.0.2 The problem was in the Proguard. To fix it you can disable Proguard in “project.properties” (Note that it is bad idea) or update Proguard. The Proguard Read more…

Centering source image (android:src) for ImageButton in Android

For centering android:src in the ImageButton I use the next solution. First I need create 9-patch src image using next rules. Please look at the screenshot from draw9patch utility from Android SDK. Next you need add the 9-patch image into ImageButton like this: <ImageButton android:layout_width=”200dp” android:layout_height=”match_parent” android:scaleType=”fitXY” android:src=”@drawable/src_image” /> And Read more…

How to fix “Can not perform this action after onSaveInstanceState” on Android Fragments

Recent I’ve this bug on my project. This bug comes when app awake from sleep. I’ve spent a lot of time to fix it. And finally I got the solution. My project is Activity with Fragments. The error text is: java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3113) Read more…