-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
Question: PropertiesManager #75
Comments
From my understanding, this happens because Android is missing most of the classes in java.beans package in its runtime environment (see for example java.beans package on JDK5). Afaik, at the moment this can't be solved unless I reimplement those classes inside OWNER itself, or I find some library working with android that does the same job. Thanks for opening the question on stackoverflow, I'll monitor that answer and see if someone comes with a suggestion about this. I can definitely fix OWNER to work on android: a solution to this issue should not be difficult to implement, if there is something already available or if I can find a quick way to port the few java.beans classes used inside OWNER itself and package in an optional dependency (like owner-android-support.jar) |
I'll try to come out with a quick solution asap, and provide you a fixed jar so you can test it on android/gradle and tell me if this is fixed. |
Oh I see, well that explains it. Yeah that would be awesome. 👍 : ) |
Would you be available to help me testing OWNER on android? After fixing this issue, I can't exclude that some other issue can show up, since - afaik - nobody yet tried to use OWNER on android. So, if I can count on some help (also just for testing) from an android guy, I can for sure make OWNER android-compatible, I think. |
First, I should let you know that I'm not an "Android-guy" per se. I've been involved in a couple of projects but it's not my forte. In this case I'm using it in a pure java library that Android then depends on, so I'll only find issues that are proximate. This might mean that I would miss things that would be issues if used directly in an Android project. I will say this though, I like what I've seen so far and will probably attempt to use it again when I find myself in need of configuration (which is likely to be soon). So no promises, but I'll likely be able to tell you when it breaks, and we do test our code. : ) |
No worries. You have already been very helpful. Now I'm planning to set up some environment to test android compatibility, and offer full fledged support for android. The problem is always time shortage to do all the things I would like to do. But this issue should be easy to fix. |
Will you let me know when there's a version out that solves this? : ) |
Of course! Thank you. |
Can you please try the following jar and see if it works on your android project? |
I will try it sometime during the day. : ) |
Alas! Does not seem to work. I tried running it with just the jar you attached and got this:
When I added in the gradle repository as a dependency aswell this happend:
So it seems.. well. Not quite there yet! :D Unless I am doing something wrong on my end. |
@Coinhunter from the above Stacktrace, I think you are still picking the old jar: |
:O Strange. I will check again. Note that the second error message was generated while using both your new .jar file and the gradle dependency from mavenCentral, since only including the jar causes the first crash in the above post. ServerConfig (the one it can't find - extends Config ofc.) |
It looks like I'm using the right jar. For the first error atleast. The second is probably using the old one, as you said. |
For my understanding, the first error is saying that the JVM doesn't find |
Well, it's possible but I doubt it. It finds my other classes from the same package and submodule just fine, so I believe that the problem lies with attempting to reach the extension of that class. The reason I think this is that I have an alternate constructor for my API client with arguments instead of the owner cfg.userId() or similar and using that one works fine.
Is where things go wrong a.t.m. so perhaps this isn't getting sent along for some reason, but I can't fathom why that would be. What is your setup? Are you using gradle to build? EDIT: Actually, I will make sure I'm not wasting your time by asking someone around here to rubber-duck me just to make sure I'm not insane. |
Okay. The problem I am having has to do with gradle not adding all of the transitive dependencies. More specifically the problem is that it doesn't seem to bundle the compiled classes from dependencies of other submodules. I created an Android project and tried to use owner in that and so far it works fine for default values but it doesn't pick up the properties from ServerConfig.properties. Looking into it. EDIT: Here's a repo-link to my example without working .properties file: https://github.com/Coinhunter/OwnerAndroidExample |
Actually, this is also pretty good info:
EDIT: http://stackoverflow.com/questions/23084678/gradle-submodule-has-unresolvable-dependencies |
Unfortunately I know very little about android development and nothing about gradle. My plan is to create an android test project to run all the existing junit tests using the android-sdk instead of the jdk. Can't help you with gradle. |
Do you have any news about this? Did you manage to make it work, or is the issue still open? |
Should still be open. Havn't solved it yet. Not working on it actively a.t.m. :O |
👍 |
👍 |
@vbauer do you have any news or information about this issue? |
First, I'd like to say that this is likely more of a problem with gradle than it is owner, but since this is an issue that's likely to crop up for many projects wishing to utilize this lib I thought I'd post it anyway, and perhaps someone else will do some additional digging. So... I'm having problems using owner in a project because it seems not all of the beans get transitively added to the apk that I am building. The setup is of a multi-module type in android studio, because the android and java plugins for gradle don't quite get along, and the owner code resides in a pure java library.
The module that contains owner directly is free from this issue. What are your recommendations?
Also created a Stack Overflow q for this type of problem:
http://stackoverflow.com/questions/22988376/missing-runtime-dependencies-with-owner-gradle-for-android
If you feel this is completely removed from what you're trying to do here, don't hesitate to close the issue. : )
The text was updated successfully, but these errors were encountered: