Repository: flutter
Issue: unresolved supertypes: androidx.lifecycle.LifecycleOwner
Labels: c: crash,platform-android,tool,t: gradle,dependency: android,a: build,P2,team-android,triaged-android

## Steps to Reproduce

1. create new flutter project in vscode
2. add to new repo
3. git clone using another computer (and another user)
4. flutter build apk


**Target Platform:** flutter 

<details>
  <summary>flutter run --verbose</summary>

```bash
[  +46 ms] executing: [C:\flutter_files\SDK\flutter\] git log -n 1 --pretty=format:%H
[ +143 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[   +5 ms] 68587a0916366e9512a78df22c44163d041dd5f3
[  +39 ms] executing: [C:\flutter_files\SDK\flutter\] git describe --match v*.*.* --first-parent --long --tags
[ +141 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[   +1 ms] v1.9.1+hotfix.6-0-g68587a091
[  +21 ms] executing: [C:\flutter_files\SDK\flutter\] git rev-parse --abbrev-ref --symbolic @{u}
[ +197 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/stable
[   +1 ms] executing: [C:\flutter_files\SDK\flutter\] git ls-remote --get-url origin
[ +105 ms] Exit code 0 from: git ls-remote --get-url origin
[   +1 ms] https://github.com/flutter/flutter.git
[ +211 ms] executing: [C:\flutter_files\SDK\flutter\] git rev-parse --abbrev-ref HEAD
[ +109 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +2 ms] stable
[ +307 ms] executing: H:\ANDROID_HOME\platform-tools\adb.exe devices -l
[  +50 ms] Exit code 0 from: H:\ANDROID_HOME\platform-tools\adb.exe devices -l
[   +4 ms] List of devices attached
[  +19 ms] No supported devices connected.
[ +120 ms] "flutter run" took 598ms.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
#1      RunCommand.validateCommand (package:flutter_tools/src/commands/run.dart:281:7)
<asynchronous suspension>
#2      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:465:11)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:407:33)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#5      _rootRun (dart:async/zone.dart:1124:13)
#6      _CustomZone.run (dart:async/zone.dart:1021:19)
#7      _runZoned (dart:async/zone.dart:1516:10)
#8      runZoned (dart:async/zone.dart:1463:12)
#9      AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#10     FlutterCommand.run (package:flutter_tools/src/runner/flutter_command.dart:397:20)
#11     CommandRunner.runCommand (package:args/command_runner.dart:197:27)
<asynchronous suspension>
#12     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:402:21)
<asynchronous suspension>
#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#14     _rootRun (dart:async/zone.dart:1124:13)
#15     _CustomZone.run (dart:async/zone.dart:1021:19)
#16     _runZoned (dart:async/zone.dart:1516:10)
#17     runZoned (dart:async/zone.dart:1463:12)
#18     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#19     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:356:19)
<asynchronous suspension>
#20     CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#21     new Future.sync (dart:async/future.dart:224:31)
#22     CommandRunner.run (package:args/command_runner.dart:112:14)
#23     FlutterCommandRunner.run (package:flutter_tools/src/runner/flutter_command_runner.dart:242:18)
#24     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:22)
<asynchronous suspension>
#25     _rootRun (dart:async/zone.dart:1124:13)
#26     _CustomZone.run (dart:async/zone.dart:1021:19)
#27     _runZoned (dart:async/zone.dart:1516:10)
#28     runZoned (dart:async/zone.dart:1500:12)
#29     run.<anonymous closure> (package:flutter_tools/runner.dart:61:18)
<asynchronous suspension>
#30     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:29)
<asynchronous suspension>
#31     _rootRun (dart:async/zone.dart:1124:13)
#32     _CustomZone.run (dart:async/zone.dart:1021:19)
#33     _runZoned (dart:async/zone.dart:1516:10)
#34     runZoned (dart:async/zone.dart:1463:12)
#35     AppContext.run (package:flutter_tools/src/base/context.dart:153:18)
<asynchronous suspension>
#36     runInContext (package:flutter_tools/src/context_runner.dart:59:24)
<asynchronous suspension>
#37     run (package:flutter_tools/runner.dart:50:10)
#38     main (package:flutter_tools/executable.dart:65:9)
<asynchronous suspension>
#39     main (file:///C:/flutter_files/SDK/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#40     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:303:32)
#41     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
```

</details>



**flutter analyze :**
```bash
flutter analyze
Analyzing code_001...
No issues found! (ran in 8.2s)
```


**flutter doctor -v :**
```bash
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.116], locale en-US)
    • Flutter version 1.9.1+hotfix.6 at C:\flutter_files\SDK\flutter
    • Framework revision 68587a0916 (3 months ago), 2019-09-13 19:46:58 -0700
    • Engine revision b863200c37
    • Dart version 2.5.0


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at H:\ANDROID_HOME
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = H:\ANDROID_HOME
    • ANDROID_SDK_ROOT = H:\ANDROID_HOME
    • Java binary at: C:\Program Files\Java\jre1.8.0_221\bin\java
    • Java version Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
    • All Android licenses accepted.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[√] VS Code (version 1.40.2)
    • VS Code at C:\Users\MH\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.7.0

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.
```

<details>
  <summary>flutter build apk </summary>

```bash
You are building a fat APK that includes binaries for android-arm, android-arm64.
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
        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 --split-per-abi
        Learn more on:  https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
Initializing gradle...                                              2.5s
Resolving dependencies...                                          13.0s
Running Gradle task 'assembleRelease'...
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath:
    class io.flutter.embedding.android.FlutterActivity, unresolved supertypes: androidx.lifecycle.LifecycleOwner
    class io.flutter.embedding.engine.FlutterEngine, unresolved supertypes: androidx.lifecycle.LifecycleOwner

e: C:\flutter_files\projects\code_001\android\app\src\main\kotlin\com\example\taj\MainActivity.kt: (3, 28): Unresolved reference: NonNull        
e: C:\flutter_files\projects\code_001\android\app\src\main\kotlin\com\example\taj\MainActivity.kt: (9, 42): Unresolved reference: NonNull        
e: C:\flutter_files\projects\code_001\android\app\src\main\kotlin\com\example\taj\MainActivity.kt: (10, 48): Type mismatch: inferred type is FlutterEngine but PluginRegistry! was expected
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                     146.8s (!)
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Gradle task assembleRelease failed with exit code 1
```

</details>