I'm getting an error message stating "inMutable cannot be resolved or is not a field" and I believe this is because this was introduced in API 11 and I was previously using API 8.
I've upgraded my manifest to use minSDK 19, and updated my build path to include the external JAR for SDK 19, cleaned the project and I'm not sure what else I can do at this point in order to resolve this issue.
Source:
private Bitmap getThumb(String s)
{
//Bitmap bmp = Bitmap.createBitmap(150, 150, Bitmap.Config.RGB_565);
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inMutable = true;
Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.sqwhite, opt);
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.animoto.android"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="19" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".DraggableGridViewSampleActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Make sure your project's build SDK to API level is 11 or higher.
In Eclipse/ADT you can do this in Properties -> Android -> Project Build Target or editing
project.properties
. After changing it, clean and rebuild.From comments:
The build SDK takes precedence over project libs.
BitmapFactory.Options
resolves to your android-8 SDK and in there there's noinMutable
field.Make sure that the following two changes are done:
You should have something like this in your Manifest file:
You should always target the latest API, and have the latest API linked to the project, and set the minimum as I have included to whatever your true minimum is. If you do this, you can selectively use new features in the API if available.