Raymond P
Raymond P

Reputation: 752

Errors in imported library

I want to use this library to crop images, since the crop intent can cause problems on certain devices: https://github.com/lvillani/android-cropimage

If I import it in Eclipse however, I get some errors in Eclipse.

In the Util class I get an error on this

options.inNativeAlloc = true;

inNativeAlloc cannot be resolved. Also I get another error in the CropImage class:

MenuHelper.showStorageToast(this);

The MenuHelper class isn't included in the library.

Since if seen these kind of errors on another library I want to know if there is something that I'm missing or doing wrong.

I'm saving the library as a zip file, extract the zipfile and import the library folder in Eclipse by using import > Existing Android Code into Workspace. I think this is ok since I checked the source on Github to comfirm if I'm missing something.

Upvotes: 0

Views: 321

Answers (3)

Anton Vasilev
Anton Vasilev

Reputation: 104

About inNativeAlloc - it is a hidden field... To set a "true" value to it you must use this code: setInNativeAllocTrue(opts)

Upvotes: 0

user
user

Reputation: 87074

This isn't a new issue for the project as you can see on the issue page. To solve it you could follow the recommendations made in that post or you could download/get the develop(the same way) branch which, at a quick look, doesn't seem to have those problems.

Upvotes: 2

Phuong Nguyen
Phuong Nguyen

Reputation: 909

The project that you are using already is an android library. You should just download the entire source folder and use Import existing project (the .project file is already in github).

Then in your own project create a reference to it by going into project properties -> android -> library -> add

Upvotes: 0

Related Questions