Start barcode sapmle in android studio

Hello,

please provide information how to get barcode sample working in android studio 3.1 with device emulator.

What is important? What should I pay attention for? Because now I can start the actual barcode sample 6.9 for Android 3.1 but it crashed. And I don't know why.

Thanks!

This is manifest file:

<?xml version="1.0" encoding="utf-8"?>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

    package="com.symbol.barcodesample1">

    <uses-permission android:name="com.symbol.emdk.permission.EMDK"/>

    <application

        android:allowBackup="true"

        android:icon="@mipmap/ic_launcher"

        android:label="@string/app_name"

        android:theme="@style/AppTheme" >

        <uses-library android:name="com.symbol.emdk" android:required="false"/>

        <activity

            android:name=".MainActivity"

            android:configChanges="orientation|screenSize|keyboardHidden"

            android:label="@string/app_name" >

            <intent-filter>

                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />

            </intent-filter>

        </activity>

    </application>

</manifest>

and this is app file

apply plugin: 'com.android.application'

android {

  compileSdkVersion 28
   buildToolsVersion '27.0.3'

   defaultConfig {

  applicationId "com.symbol.barcodesample1"
   minSdkVersion 21
   targetSdkVersion 26
   versionCode 11
   versionName "6.9.0"
   }

  buildTypes {

  release {

  minifyEnabled false
   proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
   }

  }

}

dependencies {

  Properties properties = new Properties()

  properties.load(project.rootProject.file('local.properties').newDataInputStream())

   def sdkDir = properties.getProperty('sdk.dir')

  compileOnly fileTree(include: ['com.symbol.emdk.jar'], dir: sdkDir+'/add-ons/addon-symbol_emdk-symbol-26/libs/')

}