Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

color value drawable resource issue

Tags:

I have an image that is 1900*1200 in a folder called drawable-sw600dp that id like to have used on a nexus 7. When I try to run the app the main activity the screen is white and I get the following error:

java.lang.NumberFormatException: Color value '@drawable-sw600dp/background5' must start with #
at com.android.layoutlib.bridge.impl.ResourceHelper.getColor(ResourceHelper.java:71)
at com.android.layoutlib.bridge.impl.ResourceHelper.getDrawable(ResourceHelper.java:248)
at android.content.res.BridgeTypedArray.getDrawable(BridgeTypedArray.java:782)

Could it be that the image is too large to use? Or what could cause this error to happen?

This is in my activity_main.xml where the background is set:

xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background5"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
android:id="@+id/MainLayout"
tools:context=".MainActivity">

In my other folders drawable-hdpi,-mdpi there is no problem. However I made the .jpg image a higher resolution and now it creates this error, thats why I suspect the high resolution is causing the issue.