question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Usage within Android Library modules

See original GitHub issue

I just moved an epoxy model “MessageIssueModel” from app module into an Android library project say “sample-library”

import library.sample.R;
@EpoxyModelClass(layout = R.layout.message_item_model)
public abstract class MessageIssueModel extends EpoxyModel<MessageIssueView> {
    @EpoxyAttribute
    String title;
}

also i moved all related xml file into sample-library e.g. layout/message_item_model.xml . Android studio will complain that R.layout.message_item_model Attribute value must be constant. That cause the MessageIssueModel_ will not be generated automatically.

in my smaple-library’s build.gradle i try 2.0,0 and 2.1.0, the same compile problem.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
elihartcommented, Jul 7, 2017

I’ve updated the readme with instrustructions on using the plugin for library projects https://github.com/airbnb/epoxy/blob/master/README.md#library-projects

0reactions
elihartcommented, Jul 7, 2017

Butterknife 8.7.0 was released with the updated R2 gradle plugin. that should work for everybody needing library project support

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create an Android library - Android Developers
Use your library from within the same project · Navigate to File > Project Structure > Dependencies. · Select the Module in which...
Read more >
What are benefit to use library module in Android Studio?
Android library module -> Android library compiles into an Android Archive (AAR) file that you can use as a dependency for an Android...
Read more >
Create an Android Library and use it in your Android Project
This blog is providing information that why modular code structure is important and how the android library can play an important role in...
Read more >
Creating libraries for Android applications - Tutorial
2.1. Using custom library modules ... An Android library module can contain Java classes, Android components and resources. Only assets are not supported....
Read more >
How To Create Library Module For Android Applications
To use the library add it as a dependency in your project select File Project Structure. Select the app entry. Switch to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found