title: Flutter app run not work after change compileSdkVersion
body: <p>I changed my file <code>build.gradle</code></p>
  <p><strong>From:</strong></p>
  <pre><code>compileSdkVersion 29
  minSdkVersion 16
  targetSdkVersion 29
  </code></pre>
  <p><strong>To:</strong></p>
  <pre><code>compileSdkVersion 28
  minSdkVersion 18
  targetSdkVersion 29
  </code></pre>
  <p>Then get error with message:</p>
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:processDebugResources'.
  &gt; A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
     &gt; Android resource linking failed
       D:\Development\Projects\Dart\Flutter\tires\build\location\intermediates\library_manifest\debug\AndroidManifest.xml:13:9-17:56: AAPT: error: attribute android:foregroundServiceType not found.
  
  
  * 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 22s
  Running Gradle task 'assembleDebug'...                                  
  Running Gradle task 'assembleDebug'... Done                        23,1s
  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                    1,1s
  
  D:\Development\Packages\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-1.0.11\android\src\main\java\io\flutter\embedding\engine\plugins\lifecycle\FlutterLifecycleAdapter.java:8: error: package androidx.lifecycle does not exist
  import androidx.lifecycle.Lifecycle;
                           ^
  D:\Development\Packages\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_plugin_android_lifecycle-1.0.11\android\src\main\java\io\flutter\embedding\engine\plugins\lifecycle\FlutterLifecycleAdapter.java:22: error: cannot find symbol
    public static Lifecycle getActivityLifecycle(
                  ^
    symbol:   class Lifecycle
    location: class FlutterLifecycleAdapter
  2 errors
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':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 0s
  
  
  Exception: The plugin flutter_plugin_android_lifecycle could not be built due to the issue above.
  </code></pre>