Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在release模式下报错,无法运行 #15

Closed
luckysmg opened this issue Oct 16, 2019 · 1 comment
Closed

在release模式下报错,无法运行 #15

luckysmg opened this issue Oct 16, 2019 · 1 comment

Comments

@luckysmg
Copy link

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:preReleaseBuild'.

Android dependency 'androidx.versionedparcelable:versionedparcelable' has different version for the compile (1.0.0-rc01) and runtime (1.0.0) classpath. You should manually set the same version via DependencyResolution

  • 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 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 audioplayers...
Running Gradle task 'assembleAarRelease'...
Built build/app/outputs/repo.
Building plugin camera...
Running Gradle task 'assembleAarRelease'...
Built build/app/outputs/repo.
Building plugin connectivity...
Running Gradle task 'assembleAarRelease'...

Task :assembleAarRelease UP-TO-DATE
Task :preBuild UP-TO-DATE
Task :preReleaseBuild UP-TO-DATE
Task :compileReleaseAidl NO-SOURCE
Task :compileReleaseRenderscript UP-TO-DATE
Task :checkReleaseManifest UP-TO-DATE
Task :generateReleaseBuildConfig
Task :generateReleaseResValues UP-TO-DATE
Task :generateReleaseResources UP-TO-DATE
Task :packageReleaseResources
Task :processReleaseManifest
Task :generateReleaseRFile UP-TO-DATE
Task :prepareLintJar UP-TO-DATE
Task :generateReleaseSources
Task :javaPreCompileRelease UP-TO-DATE

Task :compileReleaseJavaWithJavac FAILED

Task :mergeReleaseConsumerProguardFiles UP-TO-DATE
Task :mergeReleaseShaders
Task :compileReleaseShaders UP-TO-DATE
Task :generateReleaseAssets UP-TO-DATE
Task :packageReleaseAssets
Task :packageReleaseRenderscript NO-SOURCE
Task :processReleaseJavaRes NO-SOURCE
Task :compileReleaseNdk NO-SOURCE
Task :mergeReleaseJniLibFolders
Task :transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
Task :transformNativeLibsWithStripDebugSymbolForRelease UP-TO-DATE
Task :transformNativeLibsWithSyncJniLibsForRelease UP-TO-DATE
18 actionable tasks: 7 executed, 11 up-to-date
/Users/luckysmg/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.5/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityPlugin.java:31: 错误: 无法访问LifecycleOwner
*********************************************************
setupChannels(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
WARNING: This version of connectivity will break your Android build if it or its dependencies aren't compatible with AndroidX.
^
找不到android.arch.lifecycle.LifecycleOwner的类文件
注: /Users/luckysmg/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.5/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityBroadcastReceiver.java使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
See https://goo.gl/CP92wY for more information on the problem and how to fix it.
1 个错误

FAILURE: Build failed with an exception.

  • What went wrong:
    This warning prints for all Android build failures. The real root cause of the error may be unrelated.
    Execution failed for task ':compileReleaseJavaWithJavac'.

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 1s

Finished with error: The plugin connectivity could not be built due to the issue above.

@luckysmg
Copy link
Author

加了你这个才会报错,不加不报错,找了半天没找到原因,,,可否看一下😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant