Closed Jonathan5579 closed 9 months ago
Hey @Jonathan5579 ,
Thanks for pointing this out. I'll dive into the TypeAdapterFactory
import and the kapt
integration issue. I'll circle back once I've had a closer look.
Cheers!
Can you try to reproduce this with the new release 1.0.0
?
error still the same even release 1.0.0.0
e: file:///Users/xxxx/projects/android/VibaruaApp/app/src/main/java/tz/yy/xxx/vibarua/di/AppModule.kt:5:29 Unresolved reference: TypeAdapterFactor
On Tue, Jan 30, 2024 at 6:59 PM Ahmed Ali @.***> wrote:
Closed #55 https://github.com/infinum/kotlin-jsonapix/issues/55 as completed.
— Reply to this email directly, view it on GitHub https://github.com/infinum/kotlin-jsonapix/issues/55#event-11644007474, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABULXNH25CDA2E37OEUAWTDYREKFHAVCNFSM6AAAAAA6MIZE4CVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGY2DIMBQG42DONA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- nelson zacharia mscomputer and mobile phone : +255 (0) 713 127 045 my cv : nelsonzacharia.freetzi.com web : mscomputer.freetzi.com
Hey @nelsonzacharia
Can you provide us with a sample project with your case, so we can try it?
Sure, no problem. I'm trying to connect an Android application to an existing Laravel JSON API server that also has a web interface built with JavaScript. I'm attempting to use the same endpoints for both interfaces.
attached are files from my android project
On Thu, Feb 29, 2024 at 7:46 PM Ahmed Ali @.***> wrote:
Hey @nelsonzacharia https://github.com/nelsonzacharia
Can you provide us with a sample project with your case, so we can try it?
— Reply to this email directly, view it on GitHub https://github.com/infinum/kotlin-jsonapix/issues/55#issuecomment-1971544033, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABULXNHYS4PXCQQK2MVVRDTYV5NQBAVCNFSM6AAAAAA6MIZE4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRGU2DIMBTGM . You are receiving this because you were mentioned.Message ID: @.***>
-- nelson zacharia mscomputer and mobile phone : +255 (0) 713 127 045 my cv : nelsonzacharia.freetzi.com web : mscomputer.freetzi.com
any recommendation
On Thu, Feb 29, 2024 at 8:55 PM Nelson Zacharia @.***> wrote:
Sure, no problem. I'm trying to connect an Android application to an existing Laravel JSON API server that also has a web interface built with JavaScript. I'm attempting to use the same endpoints for both interfaces.
attached are files from my android project
On Thu, Feb 29, 2024 at 7:46 PM Ahmed Ali @.***> wrote:
Hey @nelsonzacharia https://github.com/nelsonzacharia
Can you provide us with a sample project with your case, so we can try it?
— Reply to this email directly, view it on GitHub https://github.com/infinum/kotlin-jsonapix/issues/55#issuecomment-1971544033, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABULXNHYS4PXCQQK2MVVRDTYV5NQBAVCNFSM6AAAAAA6MIZE4CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRGU2DIMBTGM . You are receiving this because you were mentioned.Message ID: @.***>
-- nelson zacharia mscomputer and mobile phone : +255 (0) 713 127 045 my cv : nelsonzacharia.freetzi.com web : mscomputer.freetzi.com
-- nelson zacharia mscomputer and mobile phone : +255 (0) 713 127 045 my cv : nelsonzacharia.freetzi.com web : mscomputer.freetzi.com
Hi @nelsonzacharia , we changed the TypeAdapterFactory
class to contain only one generic function for returning both the single instance of a class and a list instance. So the TypeAdapterFactory().getListAdapter
function does not exist anymore.
You can use it like this now:
Gets adapter for a single instance of Person
val adapter = TypeAdapterFactory().getAdapter(PersonModel::class)
Gets adapter for a list of Person instances
val listAdapter = TypeAdapterFactory().getAdapter(PersonList::class)
Was that your problem? If not, please provide a sample, we cannot see any files in your previous messages.
I'm trying to assemble an example project, followed the imports in the readme but I'm getting a unresolved reference for TypeAdapterFactory. Searching in the projects files found the import "import com.infinum.jsonapix.TypeAdapterFactory" to then use the TypeAdapterFactory().getListAdapter(), but I'm not being able to import it. I'm not getting any Sync error, I think I'm not adding the kapt compiler pluging correctly and thus the jsonapix:processor is not being imported.
The code that I'm trying to run is this, from the Readme:
This is what I've mofidied from the graddle files:
build.graddle:app
this is my build.graddle:app. I added the last three Id's in plugins and the first five implementations.
build.graddle:project
In the build.graddle:project I added the dependencies in the buildscript, and the last two plugin ids.
settings.graddle project
Lastly this is my settings.graddle project, the mavenCentral module was already included.