title: Execution failed for task ':sms:verifyReleaseResources' and Exception in thread "main" java.lang.NullPointerException on Flutter app build
body: <p>Hey I am facing an issue building my app as release.
  The error only came when I try to build the apk as a release I can debug it and I can build the app as debug I tried changing compileSDKVersion to 28 and targetSdkVersion also to 28</p>
  
  <p>Here's the response that I get on <code>flutter build apk --release</code> commande.</p>
  
  <blockquote>
    <p>flutter build apk</p>
  </blockquote>
  
  <pre><code>You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
  If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
      To generate an app bundle, run:
          flutter build appbundle --target-platform android-arm,android-arm64,android-x64
          Learn more on: https://developer.android.com/guide/app-bundle
      To split the APKs per ABI, run:
          flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
          Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
  Running Gradle task 'assembleRelease'...                                
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:15: error: package android.support.annotation does not exist
  import android.support.annotation.VisibleForTesting;
                                   ^
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:16: error: cannot find symbol
  import android.support.v4.app.ActivityCompat;
                               ^
    symbol:   class ActivityCompat
    location: package android.support.v4.app
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:17: error: package android.support.v4.content does not exist
  import android.support.v4.content.FileProvider;
                                   ^
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerFileProvider.java:3: error: package android.support.v4.content does not exist
  import android.support.v4.content.FileProvider;
                                   ^
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerFileProvider.java:10: error: cannot find symbol
  public class ImagePickerFileProvider extends FileProvider {}
                                               ^
    symbol: class FileProvider
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerPlugin.java:8: error: package android.support.annotation does not exist
  import android.support.annotation.VisibleForTesting;
                                   ^
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:68: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_CODE_CHOOSE_IMAGE_FROM_GALLERY = 2342;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:69: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_CODE_TAKE_IMAGE_WITH_CAMERA = 2343;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:70: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_EXTERNAL_IMAGE_STORAGE_PERMISSION = 2344;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:71: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_CAMERA_IMAGE_PERMISSION = 2345;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:72: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_CODE_CHOOSE_VIDEO_FROM_GALLERY = 2352;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:73: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_CODE_TAKE_VIDEO_WITH_CAMERA = 2353;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:74: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_EXTERNAL_VIDEO_STORAGE_PERMISSION = 2354;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:75: error: cannot find symbol
    @VisibleForTesting static final int REQUEST_CAMERA_VIDEO_PERMISSION = 2355;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:77: error: cannot find symbol
    @VisibleForTesting final String fileProviderName;
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:164: error: cannot find symbol
    @VisibleForTesting
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerDelegate
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerPlugin.java:40: error: cannot find symbol
    @VisibleForTesting
     ^
    symbol:   class VisibleForTesting
    location: class ImagePickerPlugin
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:122: error: cannot find symbol
              return ActivityCompat.checkSelfPermission(activity, permissionName)
                     ^
    symbol: variable ActivityCompat
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:128: error: cannot find symbol
              ActivityCompat.requestPermissions(activity, new String[] {permissionName}, requestCode);
              ^
    symbol: variable ActivityCompat
  C:\Users\iAbdou\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\image_picker-0.4.12+1\android\src\main\java\io\flutter\plugins\imagepicker\ImagePickerDelegate.java:140: error: cannot find symbol
              return FileProvider.getUriForFile(activity, fileProviderName, file);
                     ^
    symbol: variable FileProvider
  20 errors
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':image_picker:compileReleaseJavaWithJavac'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 3m 10s
  Running Gradle task 'assembleRelease'...                        
  Running Gradle task 'assembleRelease'... Done                     193.4s (!)
  The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the
  incompatibility.
  Building plugin flutter_plugin_android_lifecycle...
  Running Gradle task 'assembleAarRelease'...
  Running Gradle task 'assembleAarRelease'... Done                    0.6s
  
  Exception in thread "main" java.lang.NullPointerException
          at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:34)
          at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:25)
          at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
          at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
  
  
  The plugin flutter_plugin_android_lifecycle could not be built due to the issue above.
  </code></pre>
  
  <p>My Flutter Doctor response.</p>
  
  <blockquote>
    <p>flutter doctor</p>
  </blockquote>
  
  <pre><code>Doctor summary (to see all details, run flutter doctor -v):
  [√] Flutter (Channel stable, v1.12.13, on Microsoft Windows [Version 10.0.18362.720], locale en-US)
  
  [√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
  [√] Android Studio (version 3.4)
  [!] IntelliJ IDEA Ultimate Edition (version 2019.1)
      X Flutter plugin not installed; this adds Flutter specific functionality.
      X Dart plugin not installed; this adds Dart specific functionality.
  [√] VS Code (version 1.43.1)
  [!] Connected device
      ! No devices available
  
  ! Doctor found 
  </code></pre>
  
  <p>issues in 2 categories.</p>