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

java.lang.IllegalStateException StartNewChatActivity You need to use a Theme.AppCompat theme #11

Closed
ahmedsalamay opened this issue Dec 6, 2022 · 1 comment

Comments

@ahmedsalamay
Copy link

ahmedsalamay commented Dec 6, 2022

Flutter SDK: 3.0.5
compileSdkVersion 33
minSdkVersion 21
targetSdkVersion 33
classpath 'com.android.tools.build:gradle:7.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
implementation 'com.github.Teknasyon-Teknoloji:desk360-livechat-android-sdk:1.2.3'
dataBinding: true

I am getting this error while trying to do a simple test just like the example inside the docs

   val liveChatManager = LiveChatManager.Builder()
            .setDomainAddress("https://8orders.desk360.com")
            .setToken("token")
            .setLanguageCode("tr")
            .setUserName("Luke")
            .setUserEmailAddress("luke@emailadress.com")
            .setSmartPlug(settings)
            .build()
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.test/com.desk360.livechat.presentation.activity.livechat.StartNewChatActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3308)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3457)
       at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
       at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:224)
       at android.app.ActivityThread.main(ActivityThread.java:7562)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
@ahmedsalamay
Copy link
Author

The issue has been resolved by adding android:theme="@style/Theme.AppCompat.Light" inside application tag

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

No branches or pull requests

1 participant