我已经在Flutter中构建了一个应用程序。它在模拟设备和真实设备上运行良好,在Iphone X和android手机上也是如此。
上传到苹果应用商店进行得很好,但我不是为Google play商店构建的。
每次我都会遇到几次失败,现在我已经没钱了。我只是不明白代码在说什么,我必须做什么。
(作为一个初学者,我也对制作一个可以上传的文件的困难方式和许多步骤感到惊讶。我发现它比编程更难。我希望他们会让这件事变得更容易,比如它是在模拟器上运行的,所以将其作为构建文件。)
在Android上运行它。跟着fluttersite上的脚步走。
* Error running Gradle:
abnormally:
Starting a Gradle Daemon (subsequent builds will be faster)
> Configure project :app
WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with
'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command
line to display more information.
WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with
'variant.getMergeAssetsProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration- avoidance.
To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command
line to display more information.
WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with
'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration- avoidance.
To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the
command line to display more information.
*********************************************************
WARNING: This version of shared_preferences will break your Android build if it or its dependencies aren't
compatible with AndroidX.
See (had to remove this url) for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be
unrelated.
*********************************************************
Please review your Gradle project setup in the android/ folder.发布于 2019-08-04 04:34:16
我所有的失败都是因为我按照Flutter文档中的步骤做错了事情。
最后我找到了一段MTECHVIRAL的YouTube视频,就像他做的那样,我得到了一个可以上传的apk文件。对于其他遇到同样错误的flutterfriends,请先试试这个。为您节省了大量的时间和挫折:
https://www.youtube.com/watch?v=nGvPNG-f1-o
注意:在有钥匙的句子中,他打错了: 1000,必须是10000。因此,复制并通过颤动指令页面的句子。
https://stackoverflow.com/questions/57338789
复制相似问题