title: failed to merge manifest
body: <blockquote>
    <p>an activity cannot be launched and the application is getting crashed</p>
    
    <p>i tried to add some dependencies but it is failing to merge the
    manifest</p>
  </blockquote>
  
  <pre><code>   package com.example.penaliz;
  
  import android.Manifest;
  import android.content.Intent;
  import android.content.pm.PackageManager;
  import android.support.annotation.NonNull;
  import android.support.v4.app.ActivityCompat;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.util.Log;
  import android.util.SparseArray;
  import android.view.SurfaceHolder;
  import android.view.SurfaceView;
  import android.view.View;
  import android.widget.Button;
  import android.widget.TextView;
  
  import com.google.android.gms.vision.CameraSource;
  import com.google.android.gms.vision.Detector;
  import com.google.android.gms.vision.text.TextBlock;
  import com.google.android.gms.vision.text.TextRecognizer;
  
  import java.io.IOException;
  
  
  public class camActivity extends AppCompatActivity {
  
      SurfaceView cameraView;
  
      String s1;
      TextView textView;
      CameraSource cameraSource;
      final int RequestCameraPermissionID = 1001;
  
      @Override
      public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
          switch (requestCode) {
              case RequestCameraPermissionID: {
                  if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
                      if (ActivityCompat.checkSelfPermission(this, Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
                          return;
                      }
                      try {
                          cameraSource.start(cameraView.getHolder());
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
  
                  }
              }
              break;
          }
      }
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_cam);
  
          cameraView = (SurfaceView) findViewById(R.id.surface_view);
          textView = (TextView) findViewById(R.id.text_view);
  
          TextRecognizer textRecognizer = new TextRecognizer.Builder(getApplicationContext()).build();
          if (!textRecognizer.isOperational()) {
              Log.w("MainActivity", "Detector dependencies are not yet available");
          } else {
  
              cameraSource = new CameraSource.Builder(getApplicationContext(), textRecognizer)
                      .setFacing(CameraSource.CAMERA_FACING_BACK)
                      .setRequestedPreviewSize(1280, 1024)
                      .setRequestedFps(2.0f)
                      .setAutoFocusEnabled(true)
                      .build();
              cameraView.getHolder().addCallback(new SurfaceHolder.Callback() {
                  @Override
                  public void surfaceCreated(SurfaceHolder surfaceHolder) {
  
                      try {
                          if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED) {
  
                              ActivityCompat.requestPermissions(camActivity.this,
                                      new String[]{Manifest.permission.CAMERA},
                                      RequestCameraPermissionID);
                              return;
                          }
                          cameraSource.start(cameraView.getHolder());
                      } catch (IOException e) {
                          e.printStackTrace();
                      }
                  }
  
                  @Override
                  public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i1, int i2) {
  
                  }
  
                  @Override
                  public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
                      cameraSource.stop();
                  }
              });
  
              textRecognizer.setProcessor(new Detector.Processor&lt;TextBlock&gt;() {
                  @Override
                  public void release() {
  
                  }
  
                  @Override
                  public void receiveDetections(Detector.Detections&lt;TextBlock&gt; detections) {
  
                      final SparseArray&lt;TextBlock&gt; items = detections.getDetectedItems();
                      if(items.size() != 0)
                      {
                          textView.post(new Runnable() {
                              @Override
                              public void run() {
                                  StringBuilder stringBuilder = new StringBuilder();
                                  for(int i =0;i&lt;items.size();++i)
                                  {
                                      TextBlock item = items.valueAt(i);
                                      stringBuilder.append(item.getValue());
                                      stringBuilder.append("\n");
                                  }
                                  textView.setText(stringBuilder.toString());
  
                              }
                          });
  
                          Button btn = (Button) findViewById(R.id.btn1);
                          btn.setOnClickListener(new View.OnClickListener() {
                              @Override
                              public void onClick(View view) {
                                  s1=textView.getText().toString();
  
                                  Intent i = new Intent(camActivity.this,Affance.class);
                                  i.putExtra("message",s1);
                                  startActivity(i);
                              }
                          });
  
                      }
                  }
              });
          }
  
  
      }
  }
  </code></pre>
  
  <blockquote>
    <p>it is showing the below log i cant understand it
    do i have to add some dependencies to make this work,
    i can run the app on android device, but when i try to launch the
    activityit is getting crashed</p>
  </blockquote>
  
  <pre><code>   '''`E/AndroidRuntime: FATAL EXCEPTION: main
          Process: com.example.penaliz, PID: 31333
          java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zztl;
              at com.google.android.gms.vision.internal.client.zza.zzcls(Unknown Source:13)
              at com.google.android.gms.vision.text.internal.client.zzg.&lt;init&gt;(Unknown Source:7)
              at com.google.android.gms.vision.text.TextRecognizer$Builder.build(Unknown Source:6)
              at com.example.penaliz.camActivity.onCreate(camActivity.java:63)
              at android.app.Activity.performCreate(Activity.java:7136)
              at android.app.Activity.performCreate(Activity.java:7127)
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
              at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
              at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
              at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1838)
              at android.os.Handler.dispatchMessage(Handler.java:106)
              at android.os.Looper.loop(Looper.java:193)
              at android.app.ActivityThread.main(ActivityThread.java:6715)
              at java.lang.reflect.Method.invoke(Native Method)
              at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911)
           Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zztl" on path: DexPathList[[zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/base.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_resources_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/lib/arm64, /system/lib64]]
              at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
              at com.google.android.gms.vision.internal.client.zza.zzcls(Unknown Source:13) 
              at com.google.android.gms.vision.text.internal.client.zzg.&lt;init&gt;(Unknown Source:7) 
              at com.google.android.gms.vision.text.TextRecognizer$Builder.build(Unknown Source:6) 
              at com.example.penaliz.camActivity.onCreate(camActivity.java:63) 
              at android.app.Activity.performCreate(Activity.java:7136) 
              at android.app.Activity.performCreate(Activity.java:7127) 
              at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271) 
              at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926) 
              at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081) 
              at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
              at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
              at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1838) 
              at android.os.Handler.dispatchMessage(Handler.java:106) 
              at android.os.Looper.loop(Looper.java:193) 
              at android.app.ActivityThread.main(ActivityThread.java:6715) 
              at java.lang.reflect.Method.invoke(Native Method) 
              at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
              at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:911) 
              Suppressed: java.io.IOException: No original dex files found for dex location /data/app/com.example.penaliz-Y6sjCxlQmwAdFU1Jik2q8A==/split_lib_resources_apk.apk
              at dalvik.system.DexFile.openDexFileNative(Native Method)
              at dalvik.system.DexFile.openDexFile(DexFile.java:354)
              at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:101)
              at dalvik.system.DexFile.&lt;init&gt;(DexFile.java:75)
              at dalvik.system.DexPathList.loadDexFile(DexPathList.java:394)
              at dalvik.system.DexPathList.makeDexElements(DexPathList.java:354)
              at dalvik.system.DexPathList.&lt;init&gt;(DexPathList.java:164)
              at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:74)
              at dalvik.system.BaseDexClassLoader.&lt;init&gt;(BaseDexClassLoader.java:65)
              at dalvik.system.PathClassLoader.&lt;init&gt;(PathClassLoader.java:64)
      E/AndroidRuntime:     at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:73)
              at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:88)
              at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:74)
              at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:40)
              at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:727)
              at android.app.LoadedApk.getClassLoader(LoadedApk.java:810)
              at android.app.LoadedApk.getResources(LoadedApk.java:1032)
              at android.app.ContextImpl.createAppContext(ContextImpl.java:2346)
              at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5789)
              at android.app.ActivityThread.access$1200(ActivityThread.java:208)
              at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1680)
                      ... 6 more`
  </code></pre>
  
  <blockquote>
    <p>what could i correct to make that activity too work
    this is the dependencies file</p>
  </blockquote>
  
  <pre><code>    apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.example.penaliz"
          minSdkVersion 15
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          vectorDrawables.useSupportLibrary = true;
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
  
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      //noinspection GradleCompatible
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      implementation 'com.google.firebase:firebase-auth:16.1.0'
      implementation 'com.google.firebase:firebase-core:16.0.7'
      implementation 'com.google.firebase:firebase-database:16.0.6'
      implementation 'com.google.firebase:firebase-storage:16.0.5'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
      implementation 'com.android.support:recyclerview-v7:28.0.0'
      implementation 'org.jetbrains:annotations-java5:15.0'
      implementation 'com.android.support:cardview-v7:28.0.0'
      implementation 'com.google.android.gms:play-services-vision:9.8.0'
  
  
  
  
  
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <blockquote>
    <p>and this is the manifest</p>
  </blockquote>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      package="com.example.penaliz"&gt;
  
      &lt;uses-permission android:name="android.permission.CAMERA" /&gt;
      &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
      &lt;application
          android:allowBackup="true"
          android:icon="@mipmap/sc"
          android:label="@string/app_name"
          android:roundIcon="@mipmap/roundlogo"
          android:supportsRtl="true"
          android:theme="@style/AppTheme"
          &gt;
  
          &lt;activity android:name=".SplashScreen"&gt;
              &lt;intent-filter&gt;
                  &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                  &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
          &lt;activity android:name=".ResetPassword" /&gt;
          &lt;activity android:name=".camActivity"&gt;
  
  
  
          &lt;/activity&gt;
          &lt;activity android:name=".FineList" /&gt;
          &lt;activity android:name=".Email_Send" /&gt;
          &lt;activity android:name=".Affance" /&gt;
          &lt;activity android:name=".MainActivity" /&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>