title: 'Source code does not match byte code' Android Studio
body: <p>I'm developing an Android video editing app using FFmpeg libraries in Android Studio version 4.01. When I try to debug, the debugger steps into the decompiler and flashes, 'Source code does not match byte code' across multiple steps through the decompiled code. The debugger also seems to be jumping around the decompiled code semi-randomly, for example: <a href="https://i.stack.imgur.com/rgJJ6.png" rel="nofollow noreferrer">here</a>, where logSlowDispatch is false but the debugger steps into the contents of the if statement anyway without checking and flashes 'Source code does not match byte code'. I've looked at alot of posts about this problem and have tried many of the suggested solutions from invalidate cache/restart to a fresh install of Android Studio to no avail. I've read that redundant or outdated gradle dependencies might have something to do with this, but removing some of these dependencies hasn't helped:</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 29
      defaultConfig {
          applicationId &quot;com.example.capstoneapplication&quot;
          minSdkVersion 21
          targetSdkVersion 29
          versionCode 1
          versionName &quot;1.0&quot;
          testInstrumentationRunner &quot;android.support.test.runner.AndroidJUnitRunner&quot;
          ndkVersion &quot;21.3.6528147&quot;
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
  
      implementation 'com.android.support.constraint:constraint-layout:2.0.0'
  
      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.writingminds:FFmpegAndroid:0.3.2'
  
      implementation 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
  
      implementation 'com.intuit.sdp:sdp-android:1.0.6'
  }
  </code></pre>
  <p>My code seems to be running properly and executing the ffmpeg command on the desired video between these jumps to the decompiler, but the video does not save. Here is a snippet from the java class that might be causing this:</p>
  <pre><code>    @Override
      public boolean onOptionsItemSelected(MenuItem menuItem){
          if(menuItem.getItemId()==R.id.trim){
              final AlertDialog.Builder alertDialog = new AlertDialog.Builder(com.example.capstoneapplication.VideoTrimmer.this);
  
              LinearLayout linLay = new LinearLayout(com.example.capstoneapplication.VideoTrimmer.this);
              linLay.setOrientation(LinearLayout.VERTICAL);
              LinearLayout.LayoutParams layPar = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
              layPar.setMargins(50, 0, 50, 100 );
              final EditText input = new EditText(com.example.capstoneapplication.VideoTrimmer.this);
              input.setLayoutParams(layPar);
              input.setGravity(Gravity.TOP|Gravity.START);
              input.setInputType(InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
              linLay.addView(input,layPar);
  
              alertDialog.setMessage(&quot;Enter Video Name&quot;);
              alertDialog.setTitle(&quot;Change Video Name&quot;);
              alertDialog.setView(linLay);
              alertDialog.setNegativeButton(&quot;Cancel&quot;, new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface dialog, int which) {
                      dialog.dismiss();
                  }
              });
              alertDialog.setPositiveButton(&quot;Submit&quot;, new DialogInterface.OnClickListener() {
                  @Override
                  public void onClick(DialogInterface dialog, int which) {
                      fileName = input.getText().toString();
  
                      try {
                          snipVideo(videoDurBar.getAbsoluteMinValue().intValue(), videoDurBar.getSelectedMaxValue().intValue(), fileName);
                      } catch ( FFmpegNotSupportedException e) {
                          e.printStackTrace();
                      }
  
  
                  }
              });
              alertDialog.show();
          }
          return super.onOptionsItemSelected(menuItem);
      }
  
      private void snipVideo( int min, int max, String fileName) throws FFmpegNotSupportedException {
  
          File destFolder = new File(&quot;storage/emulated/0&quot; + &quot;/EditingApeSnippedVideos&quot;);
          if(!destFolder.exists()){
              destFolder.mkdir();
          }
          String fileExtension = &quot;.mp4&quot;;
          destination = new File(destFolder, fileName + fileExtension);
          inputVideoPath = getPathFromUri(getApplicationContext(),uri);
  
  
          command = new String[]{&quot;-ss&quot;, &quot;&quot; + min/1000 , &quot;-y&quot;, &quot;-i&quot;, inputVideoPath, &quot;-t&quot;, &quot;&quot;+ (max-min)/1000 ,&quot;-vcodec&quot;, &quot;mpeg4&quot;, &quot;-b:v&quot;,&quot;2097152&quot;,&quot;-b:a&quot;, &quot;48000&quot;, &quot;-ac&quot;,&quot;2&quot;,&quot;-ar&quot;,&quot;22050&quot;, destination.getAbsolutePath()};
  
          //testing command
          //command = new String []{&quot;-y&quot;, &quot;-i&quot;, inputVideoPath, &quot;-ss&quot;, &quot;00:00:02&quot; , &quot;-to&quot;, &quot;00:00:03&quot;, &quot;-c&quot;, &quot;copy&quot;, destination.getAbsolutePath()};
          final FFmpeg ff = FFmpeg.getInstance(this);
          ff.loadBinary(new FFmpegLoadBinaryResponseHandler() {
  
              @Override
              public void onStart() {
  
                  Log.i(&quot;VideoTrimmer&quot;,&quot;onStart&quot;);
              }
  
              @Override
              public void onFinish() {
                  Log.i(&quot;VideoTrimmer&quot;,&quot;onFinish&quot;);
              }
  
              @Override
              public void onFailure() {
                  Log.i(&quot;VideoTrimmer&quot;,&quot;onFailure&quot;);
              }
  
              @Override
              public void onSuccess() {
                  Log.i(&quot;VideoTrimmer&quot;,&quot;Success&quot;);
                  try {
                      ff.execute(command, new ExecuteBinaryResponseHandler());
                  } catch (FFmpegCommandAlreadyRunningException e) {
                      Log.i(&quot;VideoTrimmer&quot;,&quot;FFmpegAlreadyRunning Exception&quot;);
  
                  }
              }
          });
      }
  </code></pre>
  <p>Has anyone found a solution to this debugger issue?</p>