With androidx.appcompat library FirebaseRecyclerAdapter not working
When upgrading build tool version
and target SDK version
to API 28 we have to use new support libraries with androidx
prefix. I have replaced all libs with new libs here they are
// Libs for newer API 28
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
Now FirebaseRecyclerAdapter from the import below, asking me to extend my ViewHolder class from android.support.v7
.
import com.firebase.ui.database.FirebaseRecyclerAdapter;
And has this suggestion
Type parameter
'com.domain_name.app_name.FriendsFragment.FindFriendsViewHolder' is
not within its bound; should extend
'android.support.v7.widget.RecyclerView.ViewHolder'
I'm extending ViewHolder
from API 28 with the below import
androidx.recyclerview.widget.RecyclerView;
User Sam Stern on github suggested to add below two lines in gradle.properties
file
android.useAndroidX=true
android.enableJetifier=true
But with these lines, my adapter class do not recognize onCreateViewHolder
method and says "Method 'onCreateViewHolder(android.view.ViewGroup, int)' is never used".
Please let me know how to make it work with new libs from androidx
. I will be thankful for this.
android firebase android-studio adapter android-adapter
add a comment |
When upgrading build tool version
and target SDK version
to API 28 we have to use new support libraries with androidx
prefix. I have replaced all libs with new libs here they are
// Libs for newer API 28
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
Now FirebaseRecyclerAdapter from the import below, asking me to extend my ViewHolder class from android.support.v7
.
import com.firebase.ui.database.FirebaseRecyclerAdapter;
And has this suggestion
Type parameter
'com.domain_name.app_name.FriendsFragment.FindFriendsViewHolder' is
not within its bound; should extend
'android.support.v7.widget.RecyclerView.ViewHolder'
I'm extending ViewHolder
from API 28 with the below import
androidx.recyclerview.widget.RecyclerView;
User Sam Stern on github suggested to add below two lines in gradle.properties
file
android.useAndroidX=true
android.enableJetifier=true
But with these lines, my adapter class do not recognize onCreateViewHolder
method and says "Method 'onCreateViewHolder(android.view.ViewGroup, int)' is never used".
Please let me know how to make it work with new libs from androidx
. I will be thankful for this.
android firebase android-studio adapter android-adapter
Libarary doesnot have update to androidx, you can check the code here github.com/firebase/FirebaseUI-Android/blob/master/database/src/… it still imports from support library not androidx.
– Karan Mer
Nov 14 '18 at 7:49
Hmm so should I create a new issue on lib's github page?
– Inzimam Tariq IT
Nov 14 '18 at 8:00
Btw it is not mandatory to use androidx libraries if target sdk is 28. you can still use support libraries v28.x.x
– Mohammed Junaid
Nov 14 '18 at 8:24
you can also pull and do the modifications yourself and include library as module.
– Karan Mer
Nov 14 '18 at 8:34
add a comment |
When upgrading build tool version
and target SDK version
to API 28 we have to use new support libraries with androidx
prefix. I have replaced all libs with new libs here they are
// Libs for newer API 28
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
Now FirebaseRecyclerAdapter from the import below, asking me to extend my ViewHolder class from android.support.v7
.
import com.firebase.ui.database.FirebaseRecyclerAdapter;
And has this suggestion
Type parameter
'com.domain_name.app_name.FriendsFragment.FindFriendsViewHolder' is
not within its bound; should extend
'android.support.v7.widget.RecyclerView.ViewHolder'
I'm extending ViewHolder
from API 28 with the below import
androidx.recyclerview.widget.RecyclerView;
User Sam Stern on github suggested to add below two lines in gradle.properties
file
android.useAndroidX=true
android.enableJetifier=true
But with these lines, my adapter class do not recognize onCreateViewHolder
method and says "Method 'onCreateViewHolder(android.view.ViewGroup, int)' is never used".
Please let me know how to make it work with new libs from androidx
. I will be thankful for this.
android firebase android-studio adapter android-adapter
When upgrading build tool version
and target SDK version
to API 28 we have to use new support libraries with androidx
prefix. I have replaced all libs with new libs here they are
// Libs for newer API 28
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.1.0-alpha01'
implementation 'androidx.cardview:cardview:1.0.0'
Now FirebaseRecyclerAdapter from the import below, asking me to extend my ViewHolder class from android.support.v7
.
import com.firebase.ui.database.FirebaseRecyclerAdapter;
And has this suggestion
Type parameter
'com.domain_name.app_name.FriendsFragment.FindFriendsViewHolder' is
not within its bound; should extend
'android.support.v7.widget.RecyclerView.ViewHolder'
I'm extending ViewHolder
from API 28 with the below import
androidx.recyclerview.widget.RecyclerView;
User Sam Stern on github suggested to add below two lines in gradle.properties
file
android.useAndroidX=true
android.enableJetifier=true
But with these lines, my adapter class do not recognize onCreateViewHolder
method and says "Method 'onCreateViewHolder(android.view.ViewGroup, int)' is never used".
Please let me know how to make it work with new libs from androidx
. I will be thankful for this.
android firebase android-studio adapter android-adapter
android firebase android-studio adapter android-adapter
asked Nov 14 '18 at 7:32
Inzimam Tariq ITInzimam Tariq IT
4,25062351
4,25062351
Libarary doesnot have update to androidx, you can check the code here github.com/firebase/FirebaseUI-Android/blob/master/database/src/… it still imports from support library not androidx.
– Karan Mer
Nov 14 '18 at 7:49
Hmm so should I create a new issue on lib's github page?
– Inzimam Tariq IT
Nov 14 '18 at 8:00
Btw it is not mandatory to use androidx libraries if target sdk is 28. you can still use support libraries v28.x.x
– Mohammed Junaid
Nov 14 '18 at 8:24
you can also pull and do the modifications yourself and include library as module.
– Karan Mer
Nov 14 '18 at 8:34
add a comment |
Libarary doesnot have update to androidx, you can check the code here github.com/firebase/FirebaseUI-Android/blob/master/database/src/… it still imports from support library not androidx.
– Karan Mer
Nov 14 '18 at 7:49
Hmm so should I create a new issue on lib's github page?
– Inzimam Tariq IT
Nov 14 '18 at 8:00
Btw it is not mandatory to use androidx libraries if target sdk is 28. you can still use support libraries v28.x.x
– Mohammed Junaid
Nov 14 '18 at 8:24
you can also pull and do the modifications yourself and include library as module.
– Karan Mer
Nov 14 '18 at 8:34
Libarary doesnot have update to androidx, you can check the code here github.com/firebase/FirebaseUI-Android/blob/master/database/src/… it still imports from support library not androidx.
– Karan Mer
Nov 14 '18 at 7:49
Libarary doesnot have update to androidx, you can check the code here github.com/firebase/FirebaseUI-Android/blob/master/database/src/… it still imports from support library not androidx.
– Karan Mer
Nov 14 '18 at 7:49
Hmm so should I create a new issue on lib's github page?
– Inzimam Tariq IT
Nov 14 '18 at 8:00
Hmm so should I create a new issue on lib's github page?
– Inzimam Tariq IT
Nov 14 '18 at 8:00
Btw it is not mandatory to use androidx libraries if target sdk is 28. you can still use support libraries v28.x.x
– Mohammed Junaid
Nov 14 '18 at 8:24
Btw it is not mandatory to use androidx libraries if target sdk is 28. you can still use support libraries v28.x.x
– Mohammed Junaid
Nov 14 '18 at 8:24
you can also pull and do the modifications yourself and include library as module.
– Karan Mer
Nov 14 '18 at 8:34
you can also pull and do the modifications yourself and include library as module.
– Karan Mer
Nov 14 '18 at 8:34
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53295106%2fwith-androidx-appcompat-library-firebaserecycleradapter-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53295106%2fwith-androidx-appcompat-library-firebaserecycleradapter-not-working%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Libarary doesnot have update to androidx, you can check the code here github.com/firebase/FirebaseUI-Android/blob/master/database/src/… it still imports from support library not androidx.
– Karan Mer
Nov 14 '18 at 7:49
Hmm so should I create a new issue on lib's github page?
– Inzimam Tariq IT
Nov 14 '18 at 8:00
Btw it is not mandatory to use androidx libraries if target sdk is 28. you can still use support libraries v28.x.x
– Mohammed Junaid
Nov 14 '18 at 8:24
you can also pull and do the modifications yourself and include library as module.
– Karan Mer
Nov 14 '18 at 8:34