柚子快報(bào)激活碼778899分享:Flutter 開發(fā)錯(cuò)誤集合一
柚子快報(bào)激活碼778899分享:Flutter 開發(fā)錯(cuò)誤集合一
Xcode?The sandbox is not in sync with the Podfile.lock.
The sandbox is not in sync with the Podfile.lock. Run ‘pod install’ or update your CocoaPods installation.
解決方案:
Android Studio 執(zhí)行命令flutter build ios
Cannot fit requested classes in a single dex file (# methods: 68807 > 65536)
Running Gradle task ‘a(chǎn)ssembleDebug’…
D8: Cannot fit requested classes in a single dex file (# methods: 68807 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
D8: Cannot fit requested classes in a single dex file (# methods: 65671 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:132)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:119)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:445)
at com.android.build.gradle.internal.tasks.Workers$ActionFacade.run(Workers.kt:348)
at org.gradle.workers.internal.AdapterWorkAction.execute(AdapterWorkAction.java:50)
at org.gradle.workers.internal.DefaultWorkerServer.execute(DefaultWorkerServer.java:47)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:65)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1$1.create(NoIsolationWorkerFactory.java:61)
at org.gradle.internal.classloader.ClassLoaderUtils.executeInClassloader(ClassLoaderUtils.java:98)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1$1.execute(NoIsolationWorkerFactory.java:61)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:44)
at org.gradle.workers.internal.AbstractWorker$1.call(AbstractWorker.java:41)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
at org.gradle.workers.internal.AbstractWorker.executeWrappedInBuildOperation(AbstractWorker.java:41)
at org.gradle.workers.internal.NoIsolationWorkerFactory$1.execute(NoIsolationWorkerFactory.java:56)
at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:215)
at org.gradle.workers.internal.DefaultWorkerExecutor$3.call(DefaultWorkerExecutor.java:210)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runExecution(DefaultConditionalExecutionQueue.java:215)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.runBatch(DefaultConditionalExecutionQueue.java:164)
at org.gradle.internal.work.DefaultConditionalExecutionQueue$ExecutionRunner.run(DefaultConditionalExecutionQueue.java:131)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete
at com.android.tools.r8.utils.O.a(:65)
at com.android.tools.r8.D8.run(:11)
at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:117)
... 34 more
Caused by: com.android.tools.r8.utils.b: Error: null, Cannot fit requested classes in a single dex file (# methods: 65671 > 65536)
at com.android.tools.r8.utils.y0.a(:21)
at com.android.tools.r8.dex.K.a(:56)
at com.android.tools.r8.dex.K$h.a(:5)
at com.android.tools.r8.dex.b.b(:15)
at com.android.tools.r8.dex.b.a(:38)
at com.android.tools.r8.D8.d(:87)
at com.android.tools.r8.D8.b(:1)
at com.android.tools.r8.utils.O.a(:30)
... 36 more
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ‘:app:mergeDexDebug’.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
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.gradle下配置修改
defaultConfig {
…
multiDexEnabled true
…
}
dependencies {
......
implementation 'com.android.support:multidex:1.0.3'
......
}
Attribute provider#androidx.core.content.FileProvider@authorities
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/file_paths)
android:name="androidx.core.content.FileProvider" android:authorities="com.android.demo.fileProvider" android:exported="false" android:grantUriPermissions="true" > android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
Attribute provider#androidx.core.content.FileProvider@authorities value=(com.android.demo.fileProvider) from AndroidManifest.xml:58:13-64
is also present at [:flutter_webview_plugin] AndroidManifest.xml:11:13-64 value=(com.android.demo.fileprovider).
Suggestion: add 'tools:replace="android:authorities"' to
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/file_paths) from AndroidManifest.xml:53:17-55
is also present at [:flutter_webview_plugin] AndroidManifest.xml:17:17-50 value=(@xml/filepaths).
Suggestion: add 'tools:replace="android:resource"' to
解決方案:
android:name="androidx.core.content.FileProvider" android:authorities="com.android.demo.fileProvider" android:exported="false" tools:replace="android:authorities" android:grantUriPermissions="true" > android:name="android.support.FILE_PROVIDER_PATHS" tools:replace="android:resource" android:resource="@xml/file_paths" />
The overflowing RenderFlex has an orientation of Axis.vertical.
e.g. using an Expanded widget
@override
Widget build(BuildContext context) {
ScreenUtil.init(context, width: 750, height: 1624, allowFontScaling: true);
return Scaffold(
backgroundColor: scaffoldBackColor(),
body: isSv ? getBaseViewNoSv(context) : getBaseView(context),
);
}
I/flutter (26133): The overflowing RenderFlex has an orientation of Axis.vertical.
I/flutter (26133): The edge of the RenderFlex that is overflowing has been marked in the rendering with a yellow and
I/flutter (26133): black striped pattern. This is usually caused by the contents being too big for the RenderFlex.
I/flutter (26133): Consider applying a flex factor (e.g. using an Expanded widget) to force the children of the
I/flutter (26133): RenderFlex to fit within the available space instead of being sized to their natural size.
I/flutter (26133): This is considered an error condition because it indicates that there is content that cannot be
I/flutter (26133): seen. If the content is legitimately bigger than the available space, consider clipping it with a
I/flutter (26133): ClipRect widget before putting it in the flex, or using a scrollable container rather than a Flex,
I/flutter (26133): like a ListView.
I/flutter (26133): The specific RenderFlex in question is: RenderFlex#c0a57 relayoutBoundary=up3 OVERFLOWING:
I/flutter (26133): needs compositing
I/flutter (26133): creator: Column ← _PointerListener ← Listener ← _GestureSemantics ← RawGestureDetector ←
I/flutter (26133): GestureDetector ← _BodyBuilder ← MediaQuery ← LayoutId-[<_ScaffoldSlot.body>] ←
I/flutter (26133): CustomMultiChildLayout ← AnimatedBuilder ← DefaultTextStyle ← ?
I/flutter (26133): parentData: (can use size)
I/flutter (26133): constraints: BoxConstraints(0.0<=w<=411.4, 0.0<=h<=441.5)
I/flutter (26133): size: Size(411.4, 441.5)
I/flutter (26133): direction: vertical
I/flutter (26133): mainAxisAlignment: start
I/flutter (26133): mainAxisSize: max
I/flutter (26133): crossAxisAlignment: center
I/flutter (26133): verticalDirection: down
I/flutter (26133): ◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤◢◤
解決方案 :
resizeToAvoidBottomPadding: false
@override
Widget build(BuildContext context) {
ScreenUtil.init(context, width: 750, height: 1624, allowFontScaling: true);
return Scaffold(
backgroundColor: scaffoldBackColor(),
resizeToAvoidBottomPadding: false,
body: isSv ? getBaseViewNoSv(context) : getBaseView(context),
);
}
AnimationControllers should be disposed by calling dispose() on the?AnimationController itself.
class CurWidget extends StatefulWidget {
@override
State createState() => CurWidgetState();
}
class CurWidgetState extends State
with TickerProviderStateMixin {
AnimationController controller;
Animation animation;
@override
void initState() {
// TODO: implement initState
super.initState();
controller =
AnimationController(duration: const Duration(seconds: 4), vsync: this);
animation = Tween(begin: 0.0, end: 1.0).animate(controller);
animation.addStatusListener((status) {
if (status == AnimationStatus.completed) {
///評估完成
}
});
controller.forward();
}
@override
Widget build(BuildContext context) {
return Column(
children: [
Padding(
padding: ViewUtils.mp(20.0, 20.0, 20.0, 20.0),
child: Image.asset(R.assetsImgIcEvaluateProcessTop),
),
ViewUtils.commTextEll(
'額度評估中……', 0xff000000, 16.0, FontWeight.normal, TextAlign.center),
Container(
padding: ViewUtils.mp(0.0, 20.0, 0.0, 40.0),
child: RotationTransition(
//設(shè)置動(dòng)畫的旋轉(zhuǎn)中心
alignment: Alignment.center,
//動(dòng)畫控制器
turns: animation,
//將要執(zhí)行動(dòng)畫的子view
child: Image.asset(
R.assetsImgIcEvaluateProgressAnimation,
alignment: Alignment.center,
),
),
),
],
);
}
@override
void dispose() {
// TODO: implement dispose
super.dispose();
if (controller != null) {
controller.dispose();
}
}
}
Reloaded 0 of 947 libraries in 1,515ms.
I/chatty ( 9839): uid=10133(com.example.market) 1.ui identical 2 lines
I/flutter ( 9839): AppInfo v TopBannerWidget_build
I/flutter ( 9839): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter ( 9839): The following assertion was thrown while finalizing the widget tree:
I/flutter ( 9839): EvaProWidgetState#0f3c5(tickers: tracking 1 ticker) was disposed with an active Ticker.
I/flutter ( 9839): EvaProWidgetState created a Ticker via its TickerProviderStateMixin, but at the time dispose() was
I/flutter ( 9839): called on the mixin, that Ticker was still active. All Tickers must be disposed before calling
I/flutter ( 9839): super.dispose().
I/flutter ( 9839): Tickers used by AnimationControllers should be disposed by calling dispose() on the
I/flutter ( 9839): AnimationController itself. Otherwise, the ticker will leak.
I/flutter ( 9839): The offending ticker was:
I/flutter ( 9839): _WidgetTicker(created by EvaProWidgetState#0f3c5(lifecycle state: created, tickers: tracking 0
I/flutter ( 9839): tickers))
I/flutter ( 9839): The stack trace when the _WidgetTicker was actually created was:
解決方案
@override
void dispose() {
// TODO: implement dispose
if (controller != null) {
controller.dispose();
}
super.dispose();
}
pull_to_refresh
No named parameter with the name ‘keyboardDismissBehavior’
==========================================================
解決方案
could not find a Material
The following assertion was thrown building TextField(controller:
TextEditingController#2ed1a(TextEditingValue(text: ┤四大范德薩方式ADF反對黨是發(fā)生大幅撒地方├, selection:
TextSelection(baseOffset: 21, extentOffset: 21, affinity: TextAffinity.downstream, isDirectional:
false), composing: TextRange(start: -1, end: -1))), autofocus: true, dirty, dependencies:
[MediaQuery, UnmanagedRestorationScope], state: _TextFieldState#884a1):
No Material widget found.
TextField widgets require a Material widget ancestor.
In material design, most widgets are conceptually “printed” on a sheet of material. In Flutter’s
material library, that material is represented by the Material widget. It is the Material widget
that renders ink splashes, for instance. Because of this, many material library widgets require that
there be a Material widget in the tree above them.
To introduce a Material widget, you can either directly include one, or use a widget that contains
Material itself, such as a Card, Dialog, Drawer, or Scaffold.
The specific widget that could not find a Material ancestor was:
TextField
The ancestors of this widget were:
…
Container
Expanded
Row
InputPage
Semantics
…
The relevant error-causing widget was:
原代碼:
@override
Widget build(BuildContext context) {
return Row(
children: []
);
解決方案:??添加Scaffold()
@override
Widget build(BuildContext context) {
return Scaffold(
body: Row(
children: [
],
),
);
}
This widget has been unmounted, so the State no longer has a context (and should be considered defunct)
showDialog(
context: context,
barrierDismissible: false, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: null,
content: SingleChildScrollView(
child: ListBody(
children:[],
)),
actions:
FlatButton(
child: Text('關(guān)閉'),
onPressed: () {
Navigator.of(context).pop();
},
自我介紹一下,小編13年上海交大畢業(yè),曾經(jīng)在小公司待過,也去過華為、OPPO等大廠,18年進(jìn)入阿里一直到現(xiàn)在。
深知大多數(shù)初中級Android工程師,想要提升技能,往往是自己摸索成長或者是報(bào)班學(xué)習(xí),但對于培訓(xùn)機(jī)構(gòu)動(dòng)則近萬的學(xué)費(fèi),著實(shí)壓力不小。自己不成體系的自學(xué)效果低效又漫長,而且極易碰到天花板技術(shù)停滯不前!
因此收集整理了一份《2024年Android移動(dòng)開發(fā)全套學(xué)習(xí)資料》,初衷也很簡單,就是希望能夠幫助到想自學(xué)提升又不知道該從何學(xué)起的朋友,同時(shí)減輕大家的負(fù)擔(dān)。
既有適合小白學(xué)習(xí)的零基礎(chǔ)資料,也有適合3年以上經(jīng)驗(yàn)的小伙伴深入學(xué)習(xí)提升的進(jìn)階課程,基本涵蓋了95%以上Android開發(fā)知識點(diǎn),真正體系化!
由于文件比較大,這里只是將部分目錄截圖出來,每個(gè)節(jié)點(diǎn)里面都包含大廠面經(jīng)、學(xué)習(xí)筆記、源碼講義、實(shí)戰(zhàn)項(xiàng)目、講解視頻,并且會持續(xù)更新!
如果你覺得這些內(nèi)容對你有幫助,可以掃碼獲取?。。▊渥ⅲ篈ndroid)
寫在最后
最后我想說:對于程序員來說,要學(xué)習(xí)的知識內(nèi)容、技術(shù)有太多太多,要想不被環(huán)境淘汰就只有不斷提升自己,從來都是我們?nèi)ミm應(yīng)環(huán)境,而不是環(huán)境來適應(yīng)我們!
這里附上上述的技術(shù)體系圖相關(guān)的幾十套騰訊、頭條、阿里、美團(tuán)等公司2021年的面試題,把技術(shù)點(diǎn)整理成了視頻和PDF(實(shí)際上比預(yù)期多花了不少精力),包含知識脈絡(luò) + 諸多細(xì)節(jié),由于篇幅有限,這里以圖片的形式給大家展示一部分。
相信它會給大家?guī)砗芏嗍斋@:
當(dāng)程序員容易,當(dāng)一個(gè)優(yōu)秀的程序員是需要不斷學(xué)習(xí)的,從初級程序員到高級程序員,從初級架構(gòu)師到資深架構(gòu)師,或者走向管理,從技術(shù)經(jīng)理到技術(shù)總監(jiān),每個(gè)階段都需要掌握不同的能力。早早確定自己的職業(yè)方向,才能在工作和能力提升中甩開同齡人。
《Android學(xué)習(xí)筆記總結(jié)+移動(dòng)架構(gòu)視頻+大廠面試真題+項(xiàng)目實(shí)戰(zhàn)源碼》,點(diǎn)擊傳送門即可獲取!
1817612430)]
[外鏈圖片轉(zhuǎn)存中…(img-D0Stict6-1711817612431)]
既有適合小白學(xué)習(xí)的零基礎(chǔ)資料,也有適合3年以上經(jīng)驗(yàn)的小伙伴深入學(xué)習(xí)提升的進(jìn)階課程,基本涵蓋了95%以上Android開發(fā)知識點(diǎn),真正體系化!
由于文件比較大,這里只是將部分目錄截圖出來,每個(gè)節(jié)點(diǎn)里面都包含大廠面經(jīng)、學(xué)習(xí)筆記、源碼講義、實(shí)戰(zhàn)項(xiàng)目、講解視頻,并且會持續(xù)更新!
如果你覺得這些內(nèi)容對你有幫助,可以掃碼獲?。。。▊渥ⅲ篈ndroid)
寫在最后
最后我想說:對于程序員來說,要學(xué)習(xí)的知識內(nèi)容、技術(shù)有太多太多,要想不被環(huán)境淘汰就只有不斷提升自己,從來都是我們?nèi)ミm應(yīng)環(huán)境,而不是環(huán)境來適應(yīng)我們!
這里附上上述的技術(shù)體系圖相關(guān)的幾十套騰訊、頭條、阿里、美團(tuán)等公司2021年的面試題,把技術(shù)點(diǎn)整理成了視頻和PDF(實(shí)際上比預(yù)期多花了不少精力),包含知識脈絡(luò) + 諸多細(xì)節(jié),由于篇幅有限,這里以圖片的形式給大家展示一部分。
相信它會給大家?guī)砗芏嗍斋@:
[外鏈圖片轉(zhuǎn)存中…(img-YE4UKwnQ-1711817612431)]
[外鏈圖片轉(zhuǎn)存中…(img-gs48K5dv-1711817612431)]
當(dāng)程序員容易,當(dāng)一個(gè)優(yōu)秀的程序員是需要不斷學(xué)習(xí)的,從初級程序員到高級程序員,從初級架構(gòu)師到資深架構(gòu)師,或者走向管理,從技術(shù)經(jīng)理到技術(shù)總監(jiān),每個(gè)階段都需要掌握不同的能力。早早確定自己的職業(yè)方向,才能在工作和能力提升中甩開同齡人。
《Android學(xué)習(xí)筆記總結(jié)+移動(dòng)架構(gòu)視頻+大廠面試真題+項(xiàng)目實(shí)戰(zhàn)源碼》,點(diǎn)擊傳送門即可獲??!
柚子快報(bào)激活碼778899分享:Flutter 開發(fā)錯(cuò)誤集合一
參考文章
本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點(diǎn)和立場。
轉(zhuǎn)載請注明,如有侵權(quán),聯(lián)系刪除。