skip to Main Content

I see this error when emulating my application on Android

[ERROR] TiExceptionHandler: (main) [90,2129] Binary XML file line #5: Binary XML file line #5: Error inflating class android.support.v4.widget.DrawerLayout
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiApplication$1.uncaughtException(TiApplication.java:366)
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:769)
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)
[ERROR] TiExceptionHandler:     android.app.Activity.performCreate(Activity.java:6975)
[ERROR] TiExceptionHandler:     android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.-wrap11(Unknown Source:0)
[ERROR] TiExceptionHandler:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
[ERROR] TiExceptionHandler:     android.os.Handler.dispatchMessage(Handler.java:105)

titanium version 11.1.1 SDK

2

Answers


  1. Chosen as BEST ANSWER

    this is my build.gradle code

    
    apply plugin: 'com.android.library'
    
    android {
        compileSdkVersion 31
        defaultConfig {
            minSdkVersion 21
            targetSdkVersion 32
            manifestPlaceholders = project.ext.tiManifestPlaceholders
            aaptOptions {
                // Android build tools ignores asset directories with leading underscores, but iOS supports it.
                // So, we must redefine ignore string with underscore pattern removed to support this too.
                ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
            }
        }
        lintOptions {
            checkReleaseBuilds false
        }
    }
    

  2. The error message you provided indicates an issue with inflating the DrawerLayout class from the android.support.v4.widget (This error is typically encountered when there is a mismatch between the support library versions used in your project.)

    I would recomend updating Titanium SDK: As you mentioned you are using Titanium version 11.1.1 SDK, it’s worth considering updating to a newer version of the Titanium SDK. Newer versions often include bug fixes and compatibility improvements, which may resolve the issue you are facing.

    If that does not work I would review your layout XML file:

    1. Check the XML layout file where the DrawerLayout is defined (the file mentioned in the error message).
    2. Ensure that the XML markup is correct and does not contain any errors or typos that could cause the inflation problem.
    3. If neither work, Check your dependencies: Verify that all the dependencies in your project, including external libraries and frameworks, are compatible with each other. It’s possible that a particular library or component you are using requires a specific version of the support library.
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search