{"id":"87588131-d1a1-4fac-acd8-7b8013bb805c","shortId":"aEBVP3","kind":"skill","title":"cometchat-android-v5-troubleshooting","tagline":"Diagnose and fix problems with a CometChat Android integration. Gradle errors, runtime crashes, rendering issues, and version compatibility.","description":"> **Companion skills:** `cometchat-android-v5-core` covers correct init/login patterns;\n> `cometchat-android-v5-production` covers ProGuard rules.\n\n## Purpose\n\nThis skill teaches how to diagnose CometChat Android integration problems systematically. It covers Gradle build errors, runtime crashes, rendering issues, and version compatibility.\n\n---\n\n## Use this skill when\n\n- \"CometChat isn't working\"\n- \"I'm getting a build error\"\n- \"The chat screen is blank\"\n- \"Messages aren't loading\"\n- Gradle sync failures\n- Runtime crashes with CometChat in the stack trace\n\n## Do not use this skill when\n\n- Setting up a new integration → use `cometchat-android-v5-core`\n- Customizing appearance → use `cometchat-android-v5-theming`\n\n---\n\n## 1. Common issues\n\n| Symptom | Likely cause | Fix |\n|---|---|---|\n| `Could not resolve com.cometchat:chat-uikit-android` | Missing Maven repo | Add `maven { url \"https://dl.cloudsmith.io/public/cometchat/cometchat/maven/\" }` to repositories |\n| `Duplicate class com.cometchat.*` | Multiple CometChat versions | Check dependency tree: `./gradlew app:dependencies` |\n| Blank conversation list | Not logged in, or no conversations exist | Verify `getLoggedInUser() != null`. Send a test message from dashboard. |\n| `CometChatException: ERR - Authentication null` | `init()` not called or failed | Call `init()` before `login()`. Check `isSDKInitialized()`. |\n| `CometChatException: appIdErr` | App ID not set in UIKitSettings | Verify `setAppId()` in UIKitSettingsBuilder |\n| Components show but no data | Login succeeded but wrong region | Verify region matches dashboard: `\"us\"`, `\"eu\"`, `\"in\"` |\n| `ClassNotFoundException` in release build | ProGuard stripping CometChat classes | Add `-keep class com.cometchat.** { *; }` to proguard-rules.pro |\n| `UnsupportedOperationException: Failed to resolve attribute` when inflating CometChat views | App theme inherits `Theme.AppCompat.*` or `Theme.Material3.*` — the kit's attrs are resolved against Material 2 (`CometChatTheme.DayNight` itself parents on `Theme.MaterialComponents.DayNight.NoActionBar`) | Change app theme parent to `CometChatTheme.DayNight` |\n| `NetworkOnMainThreadException` | Calling CometChat sync methods on main thread | Use callbacks (all CometChat methods are async) |\n| `minSdkVersion 21` error | CometChat requires API 24+ | Set `minSdkVersion 24` in build.gradle |\n| Message list shows wrong messages | `setUser()`/`setGroup()` called with wrong object | Verify UID/GUID matches the intended conversation |\n| Calling buttons not showing | Calling SDK not added | Add `com.cometchat:calls-sdk-android:4.+` dependency |\n| `java.lang.NoSuchMethodError` | Version mismatch between UI Kit and Chat SDK | Use compatible versions — UI Kit 5.x requires Chat SDK 4.x |\n\n---\n\n## 2. Diagnostic steps\n\n1. **Check init:** `CometChatUIKit.isSDKInitialized()` — must be `true`\n2. **Check login:** `CometChatUIKit.getLoggedInUser()` — must not be `null`\n3. **Check Gradle:** `./gradlew app:dependencies | grep cometchat` — verify versions\n4. **Check manifest:** Verify `INTERNET` permission\n5. **Check region:** Must match dashboard exactly\n6. **Check logs:** Filter logcat for `CometChat` tag\n\n---\n\n## Hard rules\n\n- **Always check init + login first.** 90% of \"it's not working\" issues are init/login failures.\n- **Never guess at the cause.** Check logcat, check the dependency tree, check the dashboard.\n- **ProGuard is the #1 release-build issue.** Always add keep rules before the first release build.","tags":["cometchat","android","troubleshooting","skills","agent-skills","ai-agent","chat","claude-code","cursor","messaging","nextjs","react"],"capabilities":["skill","source-cometchat","skill-cometchat-android-v5-troubleshooting","topic-agent-skills","topic-ai-agent","topic-chat","topic-claude-code","topic-cometchat","topic-cursor","topic-messaging","topic-nextjs","topic-react","topic-react-native","topic-ui-kit"],"categories":["cometchat-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/cometchat/cometchat-skills/cometchat-android-v5-troubleshooting","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add cometchat/cometchat-skills","source_repo":"https://github.com/cometchat/cometchat-skills","install_from":"skills.sh"}},"qualityScore":"0.463","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 27 github stars · SKILL.md body (3,492 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:04:45.550Z","embedding":null,"createdAt":"2026-05-07T13:05:04.652Z","updatedAt":"2026-05-18T19:04:45.550Z","lastSeenAt":"2026-05-18T19:04:45.550Z","tsv":"'/gradlew':161,378 '/public/cometchat/cometchat/maven/':149 '1':126,360,440 '2':264,357,367 '21':292 '24':297,300 '3':375 '4':334,355,385 '5':350,391 '6':398 '90':413 'ad':327 'add':144,235,328,446 'alway':408,445 'android':3,13,28,37,51,115,123,140,333 'api':296 'app':162,200,250,271,379 'appear':119 'appiderr':199 'aren':87 'async':290 'attr':259 'attribut':245 'authent':185 'blank':85,164 'build':58,79,230,443,453 'build.gradle':302 'button':321 'call':189,192,277,310,320,324,331 'callback':285 'calls-sdk-android':330 'caus':131,427 'chang':270 'chat':82,138,343,353 'chat-uikit-android':137 'check':158,196,361,368,376,386,392,399,409,428,430,434 'class':153,234,237 'classnotfoundexcept':227 'com.cometchat':136,154,238,329 'cometchat':2,12,27,36,50,71,96,114,122,156,233,248,278,287,294,382,404 'cometchat-android-v5-core':26,113 'cometchat-android-v5-production':35 'cometchat-android-v5-theming':121 'cometchat-android-v5-troubleshooting':1 'cometchatexcept':183,198 'cometchattheme.daynight':265,275 'cometchatuikit.getloggedinuser':370 'cometchatuikit.issdkinitialized':363 'common':127 'companion':24 'compat':23,66,346 'compon':210 'convers':165,172,319 'core':30,117 'correct':32 'could':133 'cover':31,40,56 'crash':18,61,94 'custom':118 'dashboard':182,223,396,436 'data':214 'depend':159,163,335,380,432 'diagnos':6,49 'diagnost':358 'dl.cloudsmith.io':148 'dl.cloudsmith.io/public/cometchat/cometchat/maven/':147 'duplic':152 'err':184 'error':16,59,80,293 'eu':225 'exact':397 'exist':173 'fail':191,242 'failur':92,422 'filter':401 'first':412,451 'fix':8,132 'get':77 'getloggedinus':175 'gradl':15,57,90,377 'grep':381 'guess':424 'hard':406 'id':201 'inflat':247 'inherit':252 'init':187,193,362,410 'init/login':33,421 'integr':14,52,111 'intend':318 'internet':389 'isn':72 'issdkiniti':197 'issu':20,63,128,419,444 'java.lang.nosuchmethoderror':336 'keep':236,447 'kit':257,341,349 'like':130 'list':166,304 'load':89 'log':168,400 'logcat':402,429 'login':195,215,369,411 'm':76 'main':282 'manifest':387 'match':222,316,395 'materi':263 'maven':142,145 'messag':86,180,303,307 'method':280,288 'minsdkvers':291,299 'mismatch':338 'miss':141 'multipl':155 'must':364,371,394 'networkonmainthreadexcept':276 'never':423 'new':110 'null':176,186,374 'object':313 'parent':267,273 'pattern':34 'permiss':390 'problem':9,53 'product':39 'proguard':41,231,437 'proguard-rules.pro':240 'purpos':43 'region':219,221,393 'releas':229,442,452 'release-build':441 'render':19,62 'repo':143 'repositori':151 'requir':295,352 'resolv':135,244,261 'rule':42,407,448 'runtim':17,60,93 'screen':83 'sdk':325,332,344,354 'send':177 'set':107,203,298 'setappid':207 'setgroup':309 'setus':308 'show':211,305,323 'skill':25,45,69,105 'skill-cometchat-android-v5-troubleshooting' 'source-cometchat' 'stack':99 'step':359 'strip':232 'succeed':216 'symptom':129 'sync':91,279 'systemat':54 'tag':405 'teach':46 'test':179 'theme':125,251,272 'theme.appcompat':253 'theme.material3':255 'theme.materialcomponents.daynight.noactionbar':269 'thread':283 'topic-agent-skills' 'topic-ai-agent' 'topic-chat' 'topic-claude-code' 'topic-cometchat' 'topic-cursor' 'topic-messaging' 'topic-nextjs' 'topic-react' 'topic-react-native' 'topic-ui-kit' 'trace':100 'tree':160,433 'troubleshoot':5 'true':366 'ui':340,348 'uid/guid':315 'uikit':139 'uikitset':205 'uikitsettingsbuild':209 'unsupportedoperationexcept':241 'url':146 'us':224 'use':67,103,112,120,284,345 'v5':4,29,38,116,124 'verifi':174,206,220,314,383,388 'version':22,65,157,337,347,384 'view':249 'work':74,418 'wrong':218,306,312 'x':351,356","prices":[{"id":"2c325367-b87e-4b07-bf05-59029942b8d2","listingId":"87588131-d1a1-4fac-acd8-7b8013bb805c","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"cometchat","category":"cometchat-skills","install_from":"skills.sh"},"createdAt":"2026-05-07T13:05:04.652Z"}],"sources":[{"listingId":"87588131-d1a1-4fac-acd8-7b8013bb805c","source":"github","sourceId":"cometchat/cometchat-skills/cometchat-android-v5-troubleshooting","sourceUrl":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v5-troubleshooting","isPrimary":false,"firstSeenAt":"2026-05-07T13:05:04.652Z","lastSeenAt":"2026-05-18T19:04:45.550Z"}],"details":{"listingId":"87588131-d1a1-4fac-acd8-7b8013bb805c","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"cometchat","slug":"cometchat-android-v5-troubleshooting","github":{"repo":"cometchat/cometchat-skills","stars":27,"topics":["agent-skills","ai-agent","chat","claude-code","cometchat","cursor","messaging","nextjs","react","react-native","ui-kit"],"license":null,"html_url":"https://github.com/cometchat/cometchat-skills","pushed_at":"2026-05-18T05:04:24Z","description":"Add CometChat chat to any React, Next.js, React Native, Angular, Android, iOS, or Flutter project through your AI coding agent. Works with Claude Code, Cursor, Codex, VS Code Copilot, Windsurf, Cline, Kiro, and 50+ more agents.","skill_md_sha":"f09e46e12fddb9e1297f0fc95e6fdc746a4fc2c4","skill_md_path":"skills/cometchat-android-v5-troubleshooting/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/cometchat/cometchat-skills/tree/main/skills/cometchat-android-v5-troubleshooting"},"layout":"multi","source":"github","category":"cometchat-skills","frontmatter":{"name":"cometchat-android-v5-troubleshooting","license":"MIT","description":"Diagnose and fix problems with a CometChat Android integration. Gradle errors, runtime crashes, rendering issues, and version compatibility.","compatibility":"Android 7.0+; Java 8+; Kotlin 1.8+; com.cometchat:chat-uikit-android:5.x"},"skills_sh_url":"https://skills.sh/cometchat/cometchat-skills/cometchat-android-v5-troubleshooting"},"updatedAt":"2026-05-18T19:04:45.550Z"}}