Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassNotFoundException: ollie.AdapterHolderImpl #51

Closed
saket opened this issue Mar 2, 2015 · 14 comments
Closed

ClassNotFoundException: ollie.AdapterHolderImpl #51

saket opened this issue Mar 2, 2015 · 14 comments

Comments

@saket
Copy link

saket commented Mar 2, 2015

Hi, so I have just integrated Ollie in my newest app and it is giving me strange errors. It compiles without any errors, but crashes right on startup.

Here's the stacktrace: https://gist.github.com/anonymous/a8d3fcb2fb4cd92a2dc4

I believe I've added it using Gradle the right away:

compile 'com.michaelpardo:ollie:0.3.1'
provided 'com.michaelpardo:ollie-compiler:0.3.1'

Here's the model:

@Table(SavedDefinitions.TABLE_NAME)
public class SavedDefinitionEntry extends Model {

    // Data
    @Column(SavedDefinitions.KEY_WORD)              public String mWord;
    @Column(SavedDefinitions.KEY_PHONETIC_TEXT)     public String mPhoneticText;

    public SavedDefinitionEntry(String mWord, String mPhoneticText) {
        this.mWord = mWord;
        this.mPhoneticText = mPhoneticText;
    }

}

I am having a hard time solving this error. Any ideas? :(

@pardom-zz
Copy link
Owner

What do the generated sources look like?

@saket
Copy link
Author

saket commented Mar 2, 2015

I'm sorry, but where do I find them?

@pardom-zz
Copy link
Owner

Depends on your build tool.

@saket
Copy link
Author

saket commented Mar 2, 2015

SDK build tool do you mean? My project is using v21.1.1

Also, I have seen generated java files of other libraries (like ButterKnife) inside \build\generated\source\apt but I cannot find anything for Ollie there

@saket
Copy link
Author

saket commented Mar 2, 2015

Update: I cannot find any generated files. I can see them for my other project inside \build\intermediates\classes\debug\ollie, but none for this one.

@pardom-zz
Copy link
Owner

Try using APT.

@saket
Copy link
Author

saket commented Mar 2, 2015

Can you please elaborate a bit? I don't what APT is. Does it have to do anything with this library:

https://bitbucket.org/hvisser/android-apt

@pardom-zz
Copy link
Owner

Yeah, I thought you were processing with apt.

@saket
Copy link
Author

saket commented Mar 2, 2015

This is the first time I have heard about APT. I now feel like a noob. Adding android-apt to my project. Will let you know how it goes from there.

@pardom-zz
Copy link
Owner

If you're not already doing that then there's no use. Ollie will work with javac. I assume there are not compiler errors?

@saket
Copy link
Author

saket commented Mar 2, 2015

No, AndroidStudio isn't showing any compile errors and that's what has me puzzled.

@saket
Copy link
Author

saket commented Mar 2, 2015

Interestingly, my other project (where Ollie is working perfectly) does not include apt in its build.gradle file. I tried removing it from this project as well, but I'm then having Gradle errors.

Update: Gradle errors solved. But Ollie's intermediate files are still not being generated.

Update 2: So yeah. Some gradle changes, removal of apt (which was there by default) and Ollie is now working! \m/

@saket saket closed this as completed Mar 2, 2015
@ciprig
Copy link

ciprig commented Apr 17, 2015

I have same error but I need apt for dagger, and it used to work.

@SeaSheep
Copy link

I search AdapterHolderImpl.java file in source.
But I did't find it.
Where the file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants