Setup uikit android

Hello All, Cant seem to setup and initialize the UIKit. When i follow this https://docs.amity.co/amity-uikit/android/community/using-as-a-whole-feature-with-the-default-settings is seem to always get a bug

Process: com.turelabs.tkmovement, PID: 16136
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;
at androidx.databinding.DataBindingUtil.(DataBindingUtil.java:32)
at com.amity.socialcloud.uikit.community.databinding.AmityActivityCreateCommunityBinding.inflate(AmityActivityCreat

Hello, please ensure that you’re utilizing our open-source UIKit in your implementation. Could you please try following the steps here:

The deprecated uikit is what is close to working and i can only load upto (https://docs.amity.co/amity-uikit/android/community/using-only-some-components/community-creation-page)

The error i get when i use

val intent = Intent(this, AmityCommunityHomePageActivity::class.java)
startActivity(intent)

is

Process: com.turelabs.tkmovement, PID: 22284
kotlin.UninitializedPropertyAccessException: lateinit property config has not been initialized
at com.amity.socialcloud.uikit.common.config.AmityUIKitConfigController.getGlobalTheme(AmityUIKitConfigController.kt:28)
at com.amity.socialcloud.uikit.community.compose.ui.theme.ThemeKt.AmityComposeTheme(Theme.kt:38)
at com.amity.socialcloud.uikit.community.compose.ui.base.AmityBaseComponentKt.AmityBaseComponent(AmityBaseComponent.kt:44)
at com.amity.socialcloud.uikit.community.compose.story.target.global.AmityStoryGlobalTargetTabComponentKt.AmityStoryGlobalTargetTabComponent(AmityStoryGlobalTargetTabComponent.kt:61)
at com.amity.socialcloud.uikit.community.compose.story.target.global.ComposableSingletons$AmityStoryGlobalFeedFragmentKt$lambda-1$1.invoke(AmityStoryGlobalFeedFragment.kt:19)
at com.amity.socialcloud.uikit.community.compose.story.target.global.ComposableSingletons$AmityStoryGlobalFeedFragmentKt$lambda-1$1.invoke(AmityStoryGlobalFeedFragment.kt:18)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)

As it’s already deprecated with no further development, and you have just started the project, we strongly recommend integrating our UIKit’s open-source version for the best quality and access to the latest features. Our open-source version offers more flexibility. Additionally, using outdated versions may lead to further issues.

Installing our open-source solution won’t take long, and you’ll experience smoother operation with it :slight_smile:

Trying to that and getting errors still

Build file ‘/Users/eugene/AndroidStudioProjects/TestSocial/amity-uikit/build.gradle’ line: 1

A problem occurred evaluating project ‘:amity-uikit’.

Could not read script ‘/Users/eugene/AndroidStudioProjects/TestSocial/buildsystem/activity.gradle’ as it does not exist.

The error suggests that the file ‘activity.gradle’ doesn’t exist in the specified directory ‘/Users/eugene/AndroidStudioProjects/TestSocial/buildsystem/’. Could you please check the path and file existence or sync the project in Android Studio?

Thank you. Just to understand, when i import where is this folder located Amity-Social-Cloud-UIKit-Android-OpenSource because i get this error when i add this to the build.gradle(project)

apply( “…/Amity-Social-Cloud-UIKit-Android-OpenSource/buildsystem/dependencies.gradle”)

Error

Build file ‘/Users/eugene/AndroidStudioProjects/TKMovement/build.gradle.kts’ line: 7

Could not read script ‘/Users/eugene/AndroidStudioProjects/Amity-Social-Cloud-UIKit-Android-OpenSource/buildsystem/dependencies.gradle’ as it does not exist.

  • Try:

Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

  • Exception is:
    org.gradle.api.resources.MissingResourceException: Could not read script ‘/Users/eugene/AndroidStudioProjects/Amity-Social-Cloud-UIKit-Android-OpenSource/buildsystem/dependencies.gradle’ as it does not exist.

@amitysupport Any luck? Been stuck for days

Hello, may I confirm if you are adding our UI kit to an existing project or starting fresh?

@amitysupport Im adding to an existing project

Hello, please ensure that in the top-level gradle, you have correctly specified the path within your computer. Before doing this, make sure you complete the necessary steps and select the correct directory for UIKit, Chat, Social, and other components. You can follow the guide provided here: Installation Guide for Android.

Thanks @amitysupport which agp version are you using? I have created a new project and followed exact procedure but still stuck. The location path has been set correctly on my end

I have attached my sample code here so that you can advise where im going wrong

@tkmovement Let me pass this on to my team, and I’ll get back to you soon.

@tkmovement Our team recently attempted to run your project and it appears that some files are missing, which has hindered progress.

To effectively resolve this issue, we recommend two potential courses of action:

  1. Please consider pulling our open-source UIKit and using that project as a reference. This might provide the necessary files and setup required for a successful implementation.
  2. Alternatively, you could create a repository and invite us to it. This would allow us to directly contribute to solving the issues and streamline the collaboration process.