{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/511","labels_url":"https://api.github.com/repos/realm/realm-java/issues/511/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/511/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/511/events","html_url":"https://github.com/realm/realm-java/issues/511","id":47036088,"number":511,"title":"Create an Android library depending on Realm","user":{"login":"GauthierButel","id":2751536,"avatar_url":"https://avatars.githubusercontent.com/u/2751536?v=3","gravatar_id":"","url":"https://api.github.com/users/GauthierButel","html_url":"https://github.com/GauthierButel","followers_url":"https://api.github.com/users/GauthierButel/followers","following_url":"https://api.github.com/users/GauthierButel/following{/other_user}","gists_url":"https://api.github.com/users/GauthierButel/gists{/gist_id}","starred_url":"https://api.github.com/users/GauthierButel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GauthierButel/subscriptions","organizations_url":"https://api.github.com/users/GauthierButel/orgs","repos_url":"https://api.github.com/users/GauthierButel/repos","events_url":"https://api.github.com/users/GauthierButel/events{/privacy}","received_events_url":"https://api.github.com/users/GauthierButel/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-java/labels/Enhancement","name":"Enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"emanuelez","id":473050,"avatar_url":"https://avatars.githubusercontent.com/u/473050?v=3","gravatar_id":"","url":"https://api.github.com/users/emanuelez","html_url":"https://github.com/emanuelez","followers_url":"https://api.github.com/users/emanuelez/followers","following_url":"https://api.github.com/users/emanuelez/following{/other_user}","gists_url":"https://api.github.com/users/emanuelez/gists{/gist_id}","starred_url":"https://api.github.com/users/emanuelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emanuelez/subscriptions","organizations_url":"https://api.github.com/users/emanuelez/orgs","repos_url":"https://api.github.com/users/emanuelez/repos","events_url":"https://api.github.com/users/emanuelez/events{/privacy}","received_events_url":"https://api.github.com/users/emanuelez/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2014-10-28T14:58:40Z","updated_at":"2015-01-21T19:23:53Z","closed_at":null,"body":"Hello Realm,\r\n\r\nFirst of all, let me say that I find that you're doing a great work with Realm, which is really an elegant solution for database management. So keep up the good work!\r\n\r\nI'm facing an issue, which is most a question regarding a limitation I found on Realm.\r\n\r\nI'm trying to build an Android library integrating Realm, so that several Android applications can use a common data model system, thanks to this library.\r\nThe use case I want to achieve is that the developer of the application can have its own Realm database and can integrate the library which will deal with the common data model system at the same time.\r\n\r\nUnfortunately, when trying to do so, I encounter the following error:\r\nUNEXPECTED TOP-LEVEL EXCEPTION:\r\ncom.android.dex.DexException: Multiple dex files define Lio/realm/ValidationList; \r\n\r\nMy understanding is that Realm creates this ValidationList class according to the classes that extend RealmObject inside the project, and so there is a ValidationList class created for the library and another one created for the application, which result in this Multiple dex files define error.\r\nI also understand that the ValidationList has to be created at a unique location, inside the io.realm package.\r\n\r\nSo, my question is: is this a known limitation for Realm? Can we consider the use case feasible in a future version of Realm?\r\n\r\nOnce again, congratulations for the work done so far with Realm: it's very easy to understand and use!\r\n\r\nThanks,\r\n\r\nGauthier\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/70903544","html_url":"https://github.com/realm/realm-java/issues/511#issuecomment-70903544","issue_url":"https://api.github.com/repos/realm/realm-java/issues/511","id":70903544,"user":{"login":"tbsandee","id":1088116,"avatar_url":"https://avatars.githubusercontent.com/u/1088116?v=3","gravatar_id":"","url":"https://api.github.com/users/tbsandee","html_url":"https://github.com/tbsandee","followers_url":"https://api.github.com/users/tbsandee/followers","following_url":"https://api.github.com/users/tbsandee/following{/other_user}","gists_url":"https://api.github.com/users/tbsandee/gists{/gist_id}","starred_url":"https://api.github.com/users/tbsandee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbsandee/subscriptions","organizations_url":"https://api.github.com/users/tbsandee/orgs","repos_url":"https://api.github.com/users/tbsandee/repos","events_url":"https://api.github.com/users/tbsandee/events{/privacy}","received_events_url":"https://api.github.com/users/tbsandee/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T19:23:53Z","updated_at":"2015-01-21T19:23:53Z","body":"I found this enhancement already open after preparing this repro in github, so might as well share it in case it's helpful:\r\n\r\nhttps://github.com/tbsandee/realm-lib-app-failure.\r\n\r\nWould love to see first-class support for using realm in a library and app together, but until then we will just move the realm support our of our library projects and push them up to the app."}}