Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Fix Manifest versionCode not found #1076

Merged

Conversation

kangwang1988
Copy link
Contributor

@kangwang1988 kangwang1988 commented Jan 13, 2019

For each plugin, make sure example/android/app/build.gradle has proper versionCode/versionName setting. Henceforth, keep up with the flutter create --template=plugin plugin_test logic and solve a versionCode check problem introduced by flutter/flutter@55f3da7af

Before this fix, when running flutter run on a android device using flutter master:

/Users/kylewong/Codes/Flutter/alibaba-flutter/flutter/bin/flutter run -d GWY7N16B02004245
Launching lib/main.dart on MHA AL00 in debug mode...
Initializing gradle...                                       1.2s
Resolving dependencies...                                    1.9s
Gradle task 'assembleDebug'...                                   
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
 
Gradle task 'assembleDebug'... Done                          8.1s
Built build/app/outputs/apk/debug/app-debug.apk.
Error running io.flutter.plugins.androidalarmmanagerexample. Manifest
versionCode not found
Unable to read manifest info from
/Users/kylewong/Codes/Flutter/alibaba-flutter/plugins/packages/android_alarm_man
ager/example/build/app/outputs/apk/app.apk.

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Crash report sent (report ID: 91d27cf06d186a94)
Crash report written to /Users/kylewong/Codes/Flutter/alibaba-flutter/plugins/packages/android_alarm_manager/example/flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues.

My flutter environment:

KyleWongdeMacBook-Pro:example kylewong$ /Users/kylewong/Codes/Flutter/alibaba-flutter/flutter/bin/flutter doctor -v
[✓] Flutter (Channel master, v1.1.10-pre.44, on Mac OS X 10.14.3 18D32a, locale
    en-CN)
    • Flutter version 1.1.10-pre.44 at
      /Users/kylewong/Codes/Flutter/alibaba-flutter/flutter
    • Framework revision 6c7fb88059 (2 days ago), 2019-01-11 23:18:48 -0500
    • Engine revision 5722a9685e
    • Dart version 2.1.1 (build 2.1.1-dev.1.0 f0c7d971c4)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/kylewong/Library/Android/sdk
    • Android NDK at /Users/kylewong/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ Verify that all connected devices have been paired with this computer in
      Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may
      require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    ! CocoaPods out of date (1.5.0 is recommended).
        CocoaPods is used to retrieve the iOS platform side's plugin code that
        responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work
        on iOS.
        For more info, see https://flutter.io/platform-plugins
      To upgrade:
        brew upgrade cocoapods
        pod setup

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build
      1.8.0_152-release-1136-b06)

[✓] VS Code (version 1.30.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.21.1

[✓] Connected device (2 available)
    • MHA AL00 • GWY7N16B02004245                         • android-arm64 •
      Android 8.0.0 (API 26)
! Doctor found issues in 1 category.

…r versionCode/versionName setting. Henceforth, keep up with the `flutter create --template=plugin plugin_test` logic and solve a versionCode check problem introduce by #55f3da7af
Copy link
Contributor

@mklim mklim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

lgtm

@mklim mklim merged commit 43ee28c into flutter:master Jan 14, 2019
andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
For each plugin, make sure example/android/app/build.gradle has proper versionCode/versionName setting. Henceforth, keep up with the `flutter create --template=plugin plugin_test` logic and solve a versionCode check problem introduced by flutter/flutter@55f3da7af
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
For each plugin, make sure example/android/app/build.gradle has proper versionCode/versionName setting. Henceforth, keep up with the `flutter create --template=plugin plugin_test` logic and solve a versionCode check problem introduced by flutter/flutter@55f3da7af
Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
For each plugin, make sure example/android/app/build.gradle has proper versionCode/versionName setting. Henceforth, keep up with the `flutter create --template=plugin plugin_test` logic and solve a versionCode check problem introduced by flutter/flutter@55f3da7af
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants