Robolectric Unit Test failing with Android Studio 2.3 updates

All my Unit Test started throwing this error: No such manifest file: build\intermediates\bundles\debug\AndroidManifest.xml java.lang.NullPointerException at org.robolectric.shadows.ShadowAssetManager.getAndResolve(ShadowAssetManager.java:375) at org.robolectric.shadows.ShadowAssetManager.getResourceValue(ShadowAssetManager.java:117) at android.content.res.AssetManager.getResourceValue(AssetManager.java) at android.content.res.Resources.getValue(Resources.java:1347) at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:332) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190) at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:711) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195) at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:81) at android.support.v7.app.AppCompatDelegateImplBase.__constructor__(AppCompatDelegateImplBase.java:131) at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java) at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java) at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java) at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java) at android.support.v7.app.AppCompatDelegateImplV23.<init>(AppCompatDelegateImplV23.java) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:203) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:185) at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:519) at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71) at […]

How to make Activity, not covering full screen

I want my activity to take smaller area of the screen e.g. toast doesn’t cover all of the screen, it is just shown over other things and rest of the contents can be seen behind the toast. But it’s a dialog, and I want my screen to be shown above other things e.g. above Home […]

How reliable is LocationManager's getLastKnownLocation and how often is it updated?

I am building an app that can use a user’s current location on certain actions. Location is more of a benefit to the user rather than a critical part of the process. I’m only interested in very rough accuracy and it can be off by 5 or even 10 miles and still be of value. […]

Drawing a line with a certain pixel width

I would like to display X/Y data on a canvas using lines with a certain width (in pixels, or “dp” ideally). I have tried the setStrokeWidth(..) method of Paint, and that indeed does change the line width but it isn’t what I need. In my case I’ve scaled my canvas to “real Engineering units” using […]

Robust file transfer from mobile devices to server

What I need is a solution(a library) for file transfer from mobile devices(iOS, Android) to sever(PHP). The basic requirement is that files should be split into chunks so that if data connection is lost in the middle of sending file, I don’t need to re-send the whole file. Low memory usage is also obligatory. I […]

Tiled background is pushing it's View size

I have a tiled bitmap that I’m using as the View background. This View, let’s say, has android:layout_height=”wrap_content”. The problem is that the height of the bitmap used in the background is participating in the measurement of the view, increasing the View height. This can be noticed when the size of the content of View […]

SwipeyTabs – how to create Swipey Tabs using ActionBarSherlock Library?

I have created swipey tabs using ViewPagerExtensions but this time i am using only one library ActionBarSherlock in my App and i dont know how to create swipey tabs like google play store. If you can help me to get it done, i’d be very thankful to you. This is the onCreate method of my […]

Espresso freezing on view with looping animation

I have a view in which an element is animated with the following in an infinite loop: <translate android:fromXDelta=”0%” android:toXDelta=”100%” android:duration=”10000″ android:repeatCount=”-1″ android:repeatMode=”reverse”/> When Espresso opens my activity, it’s able to perform some operations but quickly freezes. I suppose Espresso is waiting for the UI thread to become idle which never happens in this case. […]

Correspondence between ImageView coordinates and Bitmap Pixels – Android

In my application I want the user to be able to select some content of an Image contained inside an ImageView. To select the content I subclassed the ImageView class making it implement the OnTouchListener so to draw over it a rectangle with borders decided by the user. Here is an example of the result […]

How does robospice manage activity lifecycle?

I’m looking for a technical answer to how the android robospice library manages activity lifecycle. From the getting started page: https://github.com/octo-online/robospice/wiki/Starter-Guide “As an inner class of your Activity (or other context), add a RequestlListener that will update your UI. Don’t worry about memory leaks, RoboSpice manages your activity’s life cycle.” My question is how does […]

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