# UIKit 2.2.4 에서 couldn't retrieve channel 이라고 Toast 가 뜹니다

**URL:** <https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650>\
**Category:** Android\
**Created:** [May 13, 2022, 10:46am UTC](https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650 "2022-05-13T10:46:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![uangelsjp](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/uangelsjp/32/2465_2.png) [@uangelsjp](https://community.sendbird.com/u/uangelsjp)\
**Post date:** [May 13, 2022, 10:46am UTC](https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650/1 "2022-05-13T10:46:51Z")

</div>

먼저 좋은 서비스 제공에 감사합니다.

sendbird의 UIKit 을 경험하기 위해 하기 가이드를 참고하여 진행하였습니다.  
([| UIKit Android SDK | Sendbird Docs](https://sendbird.com/docs/uikit/v1/android/quickstart/send-first-message) )

너무 쉽게 잘 가이드되어 앱 빌드 및 실행까지는 했지만  
첫화면이 흰바탕에 “couldn’t retrieve channel” 이라고 Toast 만 뜹니다.

BaseApplication.java 의 APP\_ID 값도 sendbird 콘솔에서 생성한 Application ID 값으로 입력하였고  
Channel 과 User도 DashBoard 에서 추가 하였습니다.

워낙 가이드가 심플하고 잘 되어있어 그대로 따라 하기 쉬웠는데 혹시 제가 놓친 부분이 있을까요?

- UIKit : 2.2.4
- android OS : 11

바쁘시겠지만 확인 부탁드립니다.

감사합니다.

---

<div class="post-metadata">

**Author:** ![Miyoung\_Han](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/miyoung_han/32/183_2.png) [@Miyoung\_Han](https://community.sendbird.com/u/Miyoung_Han)\
**Post date:** [May 13, 2022, 9:18pm UTC](https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650/2 "2022-05-13T21:18:40Z")

</div>

안녕하세요 @uangelsjp ,  
센드버드 커뮤니티에 오신 걸 환영합니다!

제공해 주신 정보만으로 문제를 찾기는 조금 어려울것 같습니다.  
가능하시다면, SendbirdUIKit initialize부분의 코드를 제공해 주실 수 있나요?  
혹은, 아래의 샘플코드를 참조해 보실 수 있습니다.

> **[sendbird-uikit-android/uikit-sample at main · sendbird/sendbird-uikit-android](https://github.com/sendbird/sendbird-uikit-android/tree/main/uikit-sample)**
>
> main/uikit-sample

---

<div class="post-metadata">

**Author:** ![uangelsjp](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/uangelsjp/32/2465_2.png) [@uangelsjp](https://community.sendbird.com/u/uangelsjp)\
**Post date:** [May 17, 2022, 12:42am UTC](https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650/3 "2022-05-17T00:42:32Z")

</div>

안녕하세요.

먼저 빠른 답변 감사합니다.

제가 작성한 initialize 코드는 하기와 같습니다.

```auto
public class BaseApplication extends Application {
   @Override
   public void onCreate() {
      super.onCreate();

      SendBirdUIKit.init(new SendBirdUIKitAdapter() {
         @Override
         public String getAppId() {
            return "1C06786A-BCCD-4EF5-A8C0-8EEE52B120DF"; // Specify your Sendbird application ID.
         }

         @Override
         public String getAccessToken() {
            return "";
         }

         @Override
         public UserInfo getUserInfo() {
            return new UserInfo() {
               @Override
               public String getUserId() {
                  return "user1"; // Specify your user ID.
               }

               @Override
               public String getNickname() {
                  return "user1"; // Specify your user nickname.
               }

               @Override
               public String getProfileUrl() {
                  return "";
               }
            };
         }

         @Override
         public InitResultHandler getInitResultHandler() {
            return new InitResultHandler() {
               @Override
               public void onMigrationStarted() {
                  // DB migration has started.
               }

               @Override
               public void onInitFailed(SendBirdException e) {
                  // If DB migration fails, this method is called.
               }

               @Override
               public void onInitSucceed() {
                  // If DB migration is successful, this method is called and you can proceed to the next step.
                  // In the sample app, the `LiveData` class notifies you on the initialization progress
                  // And observes the `MutableLiveData<InitState> initState` value in `SplashActivity()`.
                  // If successful, the `LoginActivity` screen
                  // Or the `HomeActivity` screen will show.
               }
            };
         }
      }, this);
   }
}

```

또한 uikit-sample 은 정상적으로 동작합니다만…  
제가 궁금한 부분은 …하기와 같이 ChannelListActivity 를 상속만으로 기본적인 UIKit UI 가 노출되는 것으로 가이드를 이해하였으나 예상대로 되지 않아 문의드린 내용입니다.

```auto
public class MainActivity extends ChannelListActivity {
    // Add this line.
    // If you’re going to inherit `ChannelListActivity`, don’t implement `setContentView()` in the activity.
}

```

감사합니다.

---

<div class="post-metadata">

**Author:** ![Miyoung\_Han](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/miyoung_han/32/183_2.png) [@Miyoung\_Han](https://community.sendbird.com/u/Miyoung_Han)\
**Post date:** [May 24, 2022, 9:39pm UTC](https://community.sendbird.com/t/uikit-2-2-4-couldnt-retrieve-channel-toast/4650/4 "2022-05-24T21:39:00Z")

</div>

@uangelsjp 답변이 늦어져서 죄송합니다.

UIKit initialize 코드에는 문제가 없어 보입니다.  
`BaseApplication`클래스를 생성하신후, AndroidManifest.xml파일에 등록하셨는지 확인 부탁드립니다.  
다음 예제는 basic 코드입니다.

```auto
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example. **********">

    <application
        android:name=".BaseApplication"
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.SBTalkMi0best"
        tools:targetApi="31">
        <activity android:name=".MainActivity" android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

```

그리고, ChannelListActivity의 상속 만으로 아래와 같이 그룹채널 리스트 UI가 노출됩니다.

 ![image](https://us1.discourse-cdn.com/flex020/uploads/sendbird/original/2X/2/2e5d6035a44d637eec10a1dbdd86ae74fa8e3150.jpeg)
