Skip to content Skip to sidebar Skip to footer

Inmutable Cannot Be Resolved Or Is Not A Field

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.

Solution 1:

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:

I right clicked on the project and click properties > java build path > libraries > I clicked add external JAR and selected and added c:\sdk\platform-tools\android-19 in project.properties I have 8

The build SDK takes precedence over project libs. BitmapFactory.Options resolves to your android-8 SDK and in there there's no inMutable field.

Solution 2:

Make sure that the following two changes are done:

  1. The minimum API should be at least 11 in the Android manifest file
  2. The correct API should be linked to your project, as @laalto demonstrated hour

You should have something like this in your Manifest file:

<uses-sdkandroid:minSdkVersion="11"android:targetSdkVersion="19"/>

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.

Post a Comment for "Inmutable Cannot Be Resolved Or Is Not A Field"