Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9142139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:44:17+00:00 2026-06-17T09:44:17+00:00

Hi to all. I’m having a problem with the imports. It’s showing me errors

  • 0

Hi to all.

I’m having a problem with the imports. It’s showing me errors on the imports and if I remove them the JpegImageMetadata, Sanselan, ImageReadException, TiffImageMetadata, ExifTagConstants can’t be resolved to a type.

I’m using Android 2.3.3 and also tried Android 3.2, still had the same problem. Here are the imports:

import org.apache.sanselan.ImageReadException;
import org.apache.sanselan.Sanselan;
import org.apache.sanselan.formats.jpeg.JpegImageMetadata;
import org.apache.sanselan.formats.tiff.TiffImageMetadata;
import org.apache.sanselan.formats.tiff.constants.ExifTagConstants;

And this is the other part of the code that is showing the error (I can post the whole code if needed):

private int degreeRotated(String filePath) {
        try {
            JpegImageMetadata meta = ((JpegImageMetadata) Sanselan.getMetadata(new File(filePath)));
            TiffImageMetadata data = null;
            if (meta != null) {
                data = meta.getExif();
            }
            int orientation = 0;
            if (data != null) {
                orientation = data.findField(ExifTagConstants.EXIF_TAG_ORIENTATION).getIntValue();
            } else {
                String[] projection = { Images.ImageColumns.ORIENTATION };
                Cursor c = getContentResolver().query(Uri.fromFile(new File(filePath)), projection, null, null, null);

                if (c != null && c.moveToFirst()) {
                    orientation = c.getInt(0);
                }
            }
            switch (orientation) {
                case 6:
                    return 90;
                case 8:
                    return 270;
                default:
                    return 0;

            }
            /*
             * } catch (JpegProcessingException e1) { e1.printStackTrace(); }
             * catch (MetadataException e) { e.printStackTrace(); }
             */} catch (ImageReadException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return 0;
    }

And this is the error log:

Description   Resource   Path   Location   Type
ImageReadException cannot be resolved to a type   Viewer.java   /Main/src/com/owleyes/moustache   line 687   Java Problem
ExifTagConstants cannot be resolved to a variable   Viewer.java   /Main/src/com/owleyes/moustache   line 666   Java Problem
TiffImageMetadata cannot be resolved to a type   Viewer.java   /Main/src/com/owleyes/moustache   line 660   Java Problem
Sanselan cannot be resolved   Viewer.java   /Main/src/com/owleyes/moustache   line 659   Java Problem
JpegImageMetadata cannot be resolved to a type   Viewer.java   /Main/src/com/owleyes/moustache   line 659   Java Problem
JpegImageMetadata cannot be resolved to a type   Viewer.java   /Main/src/com/owleyes/moustache   line 659   Java Problem
The import org.apache.sanselan cannot be resolved   Viewer.java   /Main/src/com/owleyes/moustache   line 11   Java Problem
The import org.apache.sanselan cannot be resolved   Viewer.java   /Main/src/com/owleyes/moustache   line 10   Java Problem
The import org.apache.sanselan cannot be resolved   Viewer.java   /Main/src/com/owleyes/moustache   line 9   Java Problem
The import org.apache.sanselan cannot be resolved   Viewer.java   /Main/src/com/owleyes/moustache   line 8   Java Problem
The import org.apache.sanselan cannot be resolved   Viewer.java   /Main/src/com/owleyes/moustache   line 7   Java Problem
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:44:17+00:00Added an answer on June 17, 2026 at 9:44 am

    Clearly you don’t have the needed library: Apache Sanselan.

    Download the binaries here: http://commons.apache.org/imaging/download_sanselan.cgi, and extract the archive. Put the sanselan-{version}.jar in your project’s libs directory. Recompile, and the errors should be gone.

    Remember – Android doesn’t have Sanselan library included out of the box.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, How can I bind the array of drop down list items returned from
all. We're trying to get some intersect collisions working, but the problem experience is
All my files can be found on GitHub: https://github.com/Integralist/Passage (just in case you need
All, There is a website that doesn't seem legitimate that and keeps showing all
All of the information I can find online is about writing web servers, but
All the examples I can find using DLLImport to call C++ code from C#
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
all. In bash's parameter syntax, name=val val does not get pathname-expansion. How can I
All, If I run a query like the following: $qry = Select wrong_column from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.