Android- Error:Execution failed for task ':app:transformClassesWithDexForRelease'

The Problem is that i am able to run my app when i change to debug mode but it fails when i switch to release mode. Exception: FAILURE: Build failed with an exception. Execution failed for task ‘:app:transformClassesWithDexForRelease’. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/bin/java” finished with non-zero exit value 1 When i ran […]

How to handle an AsyncTask during Screen Rotation?

I read a lot on how to save my instance state or how to deal with my activity getting destroyed during screen rotation. There seem to be a lot of possibilities but I haven’t figured out which one works best for retrieving results of an AsyncTask. I have some AsyncTasks that are simply started again […]

Application Skeleton to support multiple screen

As we know Android coming with various device which having different Features, Resolution and Screen-size so while developing an Application which support multiple(small and big) screen there is an obstacle of size and layout. This leads to different combinations of screen sizes, resolutions and DPIs and creates quite a challenge when designing and developing for […]

Making a triangle shape using xml definitions?

Is there a way that I can specify a triangle shape in an xml file? <shape xmlns:android=”http://schemas.android.com/apk/res/android” android:shape=”triangle”> <stroke android:width=”1dip” android:color=”#FFF” /> <solid android:color=”#FFF” /> </shape> can we do this with a path shape or something? I just need an equilateral triangle. Thanks

Local image caching solution for Android: Square Picasso vs Universal Image Loader

I am looking for an asynchronous image loading and caching library in Android. I was going to use Picasso, but I found Universal Image Loader is more popular on GitHub. Does anyone know about these two libraries? A summary of pros and cons would be great. (All my images are on disk locally, so I […]

FragmentPagerAdapter getItem is not called

I am not able to reuse fragment in FragmentPagerAdapter.. Using destroyItem() method, It is deleting the fragment but still does not called getItem() again..There are just 2-3 Images so I am using FragmentPagerAdapter Instead of FragmentStatePagerAdapter.. public class ExamplePagerAdapter extends FragmentPagerAdapter { ArrayList < String > urls; int size = 0; public ExamplePagerAdapter(FragmentManager fm, ArrayList […]

How do I set a different theme for a Spinner's dropdown?

An example usage: The Spinner is dark themed, but I want the dropdown to be light themed.

Unsupported major.minor version 52.0 when rendering in Android Studio

When I try to render a layout preview in Android Studio I get error: Unsupported major.minor version 52.0

How to prevent a scrollview from scrolling to a webview after data is loaded?

So I have a fascinating problem. Despite the fact that I’m not manually or programmatically scrolling my view, my WebView is being automatically scrolled to after the data inside it loads. I’ve got a fragment in a viewpager. When I first load the pager, it works as expected and everything is shown. But once I […]

Remove notification after clicking

I want that the notification will be closed after the user is clicking on it. I saw that everybody saying to use flags, but I can’t find the flags anywhere because I’m using NotificationCompat.Builder class and not Notification class. Someone have any idea how to make the notification remove by her self? Here is my […]

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