Jan 19 | 8:55 AM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Jan 19 | 9:25 AM |
Ivano | has entered the room |
Jan 19 | 9:30 AM |
Mark M. |
hello, Ivano!
|
Mark M. |
how can I help you today?
|
Ivano |
Good (US) morning Mark I would like to learn better how to troubleshot Gradle challenges, for instance yesterday I was installing firebase-auth and i noticed that a transitive dependency twitter something did not allow to make the compilation possible, so I looked in stack overflow and
|
Ivano |
i discovered that the solution was to add a maven repository in the all repositories build.gradle :
|
Ivano | |
Ivano |
now...
|
Ivano |
why happens this? is because gradle have to conect with a remote updated maven repository that retrieve a library that fix a bug?
|
Jan 19 | 9:35 AM |
Ivano |
i runned ./gradlew app:dependencies as you recommended in so, but did not help too much
|
Ivano |
stop
|
Mark M. |
by firebase-auth, do you mean https://bintray.com/danijax/maven/firebase-auth ?
|
Mark M. |
or, what is the exact compile statement you put into build.gradle in the dependencies closure to pull in firebase-auth?
|
Ivano |
was firebase-auth:1.1.1
|
Mark M. |
that is not the complete compile statement
|
Ivano |
now i resolved backgrading
|
Ivano | |
Ivano |
I found really strange there is nothing on internet, even not a blog that explain how to manage the most common issues in gradle for android
|
Mark M. |
well, none of this really has much to do with Gradle
|
Mark M. |
your problem seems to line up with https://github.com/firebase/FirebaseUI-Android/...
|
Jan 19 | 9:40 AM |
Ivano |
amazing
|
Mark M. |
and the Fabric requirement is covered in the documentation for that library: https://github.com/firebase/FirebaseUI-Android/...
|
Ivano |
I see
|
Mark M. |
the problem is that the Maven repository system does not handle inter-repository links very well
|
Ivano |
aaah
|
Ivano |
so you need to add manually
|
Mark M. |
you need to add the repositories manually, yes
|
Mark M. |
once the full set of repositories is available, then inter-repository links are fine
|
Ivano |
and the guy that replied on SO, just looked up on the git known issues, where the dev explain
|
Ivano |
great
|
Ivano |
I struggle often with gradle
|
Mark M. |
if you happen to have a C/C++ background, it's akin to having one #include reference another #include -- so long as all the include paths are set up right, everything works
|
Ivano |
instead to look to SO, I would like some logic guidelines to follow
|
Ivano |
I knew include but not as reference to another #include
|
Ivano |
anyway clear
|
Ivano |
thank you very much
|
Mark M. |
the build error you received should have said something to the effect of "could not resolve fabric-such-and-so", where fabric-such-and-so is the artifact that it could not find
|
Mark M. |
(I'm not sure the exact Fabric artifact that firebase-auth depends upon)
|
Ivano |
mmh did not see, I peeked into the messages errors
|
Ivano |
but great tip to follow next time
|
Mark M. |
if you get the "could not resolve" message, then you need to determine where that particular artifact comes from
|
Ivano |
aah
|
Ivano |
now i understand
|
Jan 19 | 9:45 AM |
Mark M. |
you will get the same sort of problem if you use some library from Maven Central/JCenter that happens to depend upon one of my CWAC libraries
|
Ivano |
is what i got. could not resolve compile 'com.google.firebase:firebase-auth:1.1.1'
|
Mark M. |
as I too use a custom Maven repository for my libraries, instead of Maven Central/JCenter
|
Ivano |
aah
|
Ivano |
never had problems with your projects
|
Mark M. |
hmmm.... I would have expected that error message if Gradle could not find com.google.firebase:firebase-auth itself
|
Mark M. |
I have never used Firebase, and so I do not know where they publish their artifacts
|
Ivano |
you are right
|
Ivano |
the error message was
|
Ivano |
could not find twitter something
|
Ivano |
and i saw with your app:dependency magic command
|
Ivano |
that twitter was a transitive dependency under firebase-auth
|
Ivano |
I thought to exclude
|
Ivano |
but then downgrading worked as a charm
|
Mark M. |
yes, the GitHub issue I linked to suggests that the dependency upon Fabric is fairly new
|
Ivano |
ehy... by the way
|
Ivano |
could I ask you please a second question?
|
Mark M. |
go right ahead
|
Ivano |
thanks
|
Ivano |
I read a LOOOOOOT of blogs over MVP that is the most popular way to arrange classes and packages in android, and regarding the lifecycle.... I have some
|
Jan 19 | 9:50 AM |
Ivano |
doubts, some blogs say you should not save the lifecycle. others you should save on the View as usual, others that you should save to the presenter. I am reading all and the contrary of all, and I am going to convert my god class big ball of mud to MVP and I am scared that I could cause some damage not respecting the lifecycle do you have some tips. Please consider my idea is to move the Cursor Loaders in the Model
|
Ivano |
stop
|
Mark M. |
Android's UI system does not directly lend itself to MVC, MVP, MVVM, etc.
|
Mark M. |
any implementation of such an architecture will have some points where the architecture is pure and some points where the architecture has to be bent to accommodate Android
|
Ivano |
(true is conceived as a simple model view as far as i read)
|
Ivano |
I see
|
Mark M. |
and there are lots of different approaches that I have seen for MVP/MVVM for dealing with those places where the architecture needs to be bent
|
Mark M. |
personally, I tend to focus less on maintaining the purity of any such UI architecture
|
Mark M. |
but, I also tend to work on smaller projects
|
Ivano |
true
|
Ivano |
your repository
|
Mark M. |
this is why I do not have a GUI architecture chapter in my book, nor am I planning on one any time soon
|
Mark M. |
my focus tends to be: make the Android stuff work
|
Jan 19 | 9:55 AM |
Ivano |
sure, you are doing a great job to keep up with all the new stuff imo
|
Mark M. |
thanks!
|
Ivano |
is true
|
Ivano |
OK Mark
|
Ivano |
have a pleasant day
|
Mark M. |
you too!
|
Ivano |
I remain on line to intercept new comments
|
Ivano |
from new visitors
|
Mark M. |
well, there are only ~5 minutes left in the chat
|
Mark M. |
it is unlikely that anyone else will show up at this point
|
Ivano |
time is relative as EInstein said
|
Ivano |
so i give you my shutdown
|
Ivano |
see you soon
|
Mark M. |
bye!
|
Jan 19 | 10:00 AM |
Mark M. |
that is a wrap for today's chat
|
Mark M. |
the transcript will be uploaded to https://commonsware.com/office-hours/ shortly
|
Mark M. |
the next chat is Tuesday at 9am US Eastern
|
Ivano | has left the room |
Mark M. | turned off guest access |