SwiftUI:在navigationBarItems内部实现ZStack会显示navigationBarItems错误

问题描述

我正在尝试在implementation fileTree(dir: 'libs',include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0 implementation 'androidx.test.espresso:espresso-idling-resource:3.2.0' // Android Testing Support Libraries's runner and rules androidTestUtil 'androidx.test:orchestrator:1.3.0' androidTestImplementation 'androidx.test:rules:1.3.0' // Espresso UI Testing androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' // Android Instrumentation Tests wth JUnit 5 testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.0" testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.7.0" testImplementation "org.junit.jupiter:junit-jupiter-params:5.7.0" androidTestImplementation "org.junit.jupiter:junit-jupiter-api:5.7.0" androidTestImplementation "org.junit.jupiter:junit-jupiter-engine:5.7.0" androidTestImplementation "org.junit.jupiter:junit-jupiter-params:5.7.0" androidTestImplementation "de.mannodermaus.junit5:android-test-core:1.2.0" androidTestRuntimeOnly "de.mannodermaus.junit5:android-test-runner:1.2.0" 内实现ZStack来加载自定义警报。这是我的实现:

navigationBarItems

在这一行上,我收到此错误:

enter image description here

你们中的任何人都知道为什么我会收到此警告吗?还是可以解决此错误?

非常感谢您的帮助

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)