Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while trying to integrate the Carbon library #196

Open
oumaima12 opened this issue Jan 22, 2025 · 0 comments
Open

Issue while trying to integrate the Carbon library #196

oumaima12 opened this issue Jan 22, 2025 · 0 comments

Comments

@oumaima12
Copy link

While integrating the Carbon library into my project, I followed the steps provided in the official documentation. However, I encountered and resolved a couple of issues during the process:

  1. iOS Issue: Pod Installation
    When running the pod install command, I encountered an error. This was resolved by running the following command to ensure CocoaPods was properly installed:
    sudo gem install cocoapods

  2. Android Issue: Font Assets Configuration
    While running the app on Android Studio, an issue occurred with the assets configuration. The problem arose because the assets configuration is not directly available in the android block of the build.gradle file. To fix this:

Open the android/app/build.gradle File:
Locate the android block.
Add the sourceSets Configuration:
Update the file to reference the src/main/assets/fonts directory. The final configuration should look like this:

android {
...
sourceSets {
main {
assets.srcDirs += 'src/main/assets'
}
}
}

This ensures that the fonts in src/main/assets/fonts are included in the build.

  1. Rebuilding the Android Project
    After making the adjustments, I followed these steps to clean and rebuild the project:

Clean the Project:
cd android
./gradlew clean

Rebuild the Project:
cd ..
npx react-native run-android

With these fixes, I was able to successfully set up the Carbon library and run the application on both iOS and Android.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant