Basics of Android App development: How to use RecyclerView in Android Studio and how to connect Android with PHP, MySQL. Series of Android …
Original source
Basics of Android App development: How to use RecyclerView in Android Studio and how to connect Android with PHP, MySQL. Series of Android …
Original source
16 responses to “How to Use RecyclerView in Android Studio 2017 (Part 5): Connect Android with PHP & MySQL”
netstack: LIB_MGR – Error loading lib libdnshostprio.so im facing this pro help me out please
Hey KosalGeek, first of all thank you for your videos. you are more helpful than some of the native-english speaking videos online. i have a problem with the response, i get an error "Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1"..i checked my JSON Malform…my notepad++ encode menu option already has "encode in UTF-8" highlited…what can be the problem? this is my JSON response in my LOG.
{"0":{"p_id":"4","name":"shaver","quantity":"6","price":"50","image_url":"img/image1.jpg"},"success":true,
"1":{"p_id":"3","name":"toy","quantity":"5","price":"5","image_url":"img/image8.jpg"},
"2":{"p_id":"2","name":"cat","quantity":"2","price":"200","image_url":"img/image3.jpg"},
"3":{"p_id":"1","name":"dog","quantity":"1","price":"800","image_url":"img/image6.jpg"}}
teacher please help me with search data with volley and recycler view
Hello!
Thank you very much for your lessons.
But I need your help. I get a Json-string from the server, but when I start the application in CardView, only one TextView is displayed. Neither the picture, nor other TextView from my xml layout is not displayed.
Hello!
I need a help because i am receiving the following error:
Cold swapped changes.
$ adb shell am start -n "database.cardview.recyclerviewdemo/database.cardview.recyclerviewdemo.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 4575 on device Nexus_5_API_23_x86 [emulator-5554]
I/art: Not late-enabling -Xcheck:jni (already on)
W/System: ClassLoader referenced unknown path: /data/app/database.cardview.recyclerviewdemo-3/lib/x86
I/InstantRun: Instant Run Runtime started. Android package is database.cardview.recyclerviewdemo, real application class is null.
W/System: ClassLoader referenced unknown path: /data/app/database.cardview.recyclerviewdemo-3/lib/x86
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
[ 02-16 16:28:23.895 4575: 4575 D/ ]
HostConnection::get() New Host Connection established 0xa2956700, tid 4575
[ 02-16 16:28:23.899 4575: 4575 W/ ]
Process pipe failed
[ 02-16 16:28:23.952 4575: 4598 D/ ]
HostConnection::get() New Host Connection established 0xa2956d40, tid 4598
I/OpenGLRenderer: Initialized EGL, version 1.4
E/EGL_emulation: tid 4598: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaaa0c5a0, error=EGL_BAD_MATCH
E/RecyclerView: No adapter attached; skipping layout
E/RecyclerView: No adapter attached; skipping layout
D/MainActivity: com.android.volley.TimeoutError
E/EGL_emulation: tid 4598: eglSurfaceAttrib(1165): error 0x3009 (EGL_BAD_MATCH)
W/OpenGLRenderer: Failed to set EGL_SWAP_BEHAVIOR on surface 0xaff06d20, error=EGL_BAD_MATCH
V/RenderScript: 0xa173e000 Launching thread(s), CPUs 2
E/Surface: getSlotFromBufferLocked: unknown buffer: 0xae3f1690
Application terminated.
Thank you so much teacher. but i have some problem When i get String response i get only one record but in phpmyadmin i have a lot of record .
Thank you so much… means a lot for me , 😉
Poderia disponibilizar os slides. É para uma Apresentação minha…
Thank you so much!
SkImageDecoder::Factory returned null this is the error I am getting. it loads the image from drawable and then all images disappear. I think it could be the + product.ivImg. !!!!!!!!!!!!!!!!!!!!!! OK FIXED the problem was in the database I added the images/name of image.jpg in the db then in the android path I added images/ So the url would be images/images/pic.jpg
Thank you so much for your tutorials. But i have a little problem. I connected my client to database, it works, but images don't download from db. All items on client show drawable/pp picture. Maybe it's happen because i run a project on my smartphone. I don't use a genymotion . I hope u can help me.
P.S. Also I chanched path image url on my database like http://myip/customer/img/image1.jpg but it still doesn't work.
P.S.S. sorry for my question, i found my mistake, it was incorrect ip address on product adapter))
rocess: com.wytemagic.anew.wytemagic, PID: 11772
com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 8.3 at line 4 column 22
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241)
at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
at com.google.gson.Gson.fromJson(Gson.java:803)
at com.google.gson.Gson.fromJson(Gson.java:768)
at com.google.gson.Gson.fromJson(Gson.java:717)
at com.kosalgeek.android.json.JsonConverter.toArrayList(JsonConverter.java:42)
at com.wytemagic.anew.wytemagic.Home.onResponse
how to fix this???
Profesor sus vídeos son buenísimos! gracias 🙂 … saludos desde El Salvador
thankyou sir for tutorial, its great.. but how we can refresh the recyclerview when we add new data like news app
hi sir m thnaku so much for this video , i have a little query here
i want to fetch data on particular id i changed url path according to like this
http://localhost/news/fetchhomeimages.php?user_id=
but i cant fetch data ,should i changed my mysql query ?
i used your exemple but igot an error
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1