Cannot find 'LazyVGrid' in scope - swiftui

After macOS Big Sur 11 beta 9, has been released, LazyVGrid and GridItem structs are no longer available.
I receive, on Xcode Version 12.0.1 (12A7300), the following compiler errors:
"Cannot find 'LazyVGrid' in scope"
"Cannot find 'GridItem' in scope"
Is anyone else experiencing the same issue?
Thank you

It's working with latest Xcode 12.2 Beta 3.

Related

unable to knit pdf on M2 Mac: pandoc error Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc: Bad CPU type in executable

I get this error
sh: /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc: Bad CPU type in executable
Error in strsplit(info, "\n")[[1]] : subscript out of bounds
In addition: Warning message:
In system(paste(shQuote(path), "--version"), intern = TRUE) :
running command ''/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc' --version' had status 126
MAC OS: 13.1
Macbook Air M2
Rstudio: 2022.12.0+353
Can someone please help. Thanks!
As suggested by #guna, I followed the GitHub link to find the solution. What I needed to do was run the following code in the Terminal:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
After this, the knitting started working fine again. No RStudio or R restart needed.
Ok, looks like Ventura upgrade removed Rosetta 2
Fix; install Rosetta 2
More here;
https://github.com/rstudio/rstudio/issues/12512

R 4.0 can't compile C sources in MacOs Catalina, clang-7 error

Since I updated R to v4.0 the C compiler seems broken. This is the culprit error (I think):
clang-7: error: no such file or directory: '/Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib'
I look around on the internet but no solution seems to work.
I'm on MacOS 10.15.3.

SwiftUI app crash on run in macOS environment [duplicate]

I build an app with the 2nd beta of Xcode 11, using SwiftUI, and everything worked completely fine, but now, with the 3rd beta, the app isn't even build. I get errors like "Use of undeclared type 'View'", "Unknown attribute 'State'" etc. What can I do? Is the problem in my code or is it just a bug?
The problem is when I'm trying to build the app to run on my Mac (with UIKit for Mac)
#State var score = 0
The error is "Unknown attribute 'State'"
struct ContentView : View {
/*...*/
}
The error is "Use of undeclared type 'View'"
Got same issue on Xcode 11.2. Found out that the reason was that somewhere in same module I declared protocol State {}. This breaks compiler without any reasonable errors.
This is from the Xcode 11 Beta 3 Release Notes.
Known Issues
Xcode 11 doesn’t support working with SwiftUI in an iPad app brought to macOS. (41416222, 51201699)
I downloaded the Xcode 11 Beta 3 myself just to confirm the errors you mentioned, and I had the same issues when trying to build a SwiftUI project for Mac.
I would suggest going back to using Xcode Beta 2 if possible. Unfortunately, Apple doesn't provide download links to previous betas, so hopefully you have a Time Machine backup or Beta 2 still installed on your computer. Otherwise, you might be out of luck until the next beta is released.
I was getting the same "Unknown attribute 'State'" issue in Beta 5. But I was doing "#state" and not "#State". Case matters. It's hard to notice because both ways are shown as purple.
If you are doing a Kotlin multi-platform project, check if your shared module has a component named "State".
Instead #main, please replace #UIApplicationMain.
I've attached screenshots.
https://prnt.sc/vimvwn
I got the same error while trying to compile a Swift project created with Xcode 13 on Xcode 11. The problem was that the newer version uses the SDK 12.1 while the older one uses the SDK 10.15. To let the project compile on the older Xcode/SDK I just performed these steps:
remove the #main attribute from the swift source code
add Cocoa.framework in the section Frameworks, Libraries, and Embedded Content
add a file named main.m to the project (no bridge header) with this content:
#include <Cocoa/Cocoa.h>
int main(int argc, const char * argv[]) {
return NSApplicationMain(argc, argv);
}

odoo- warning Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt

I installed odoo 9 under ubuntu server 15.10 with wkhtmltopdf 0.12.2.4.
Everytime I print sales order, it raises error:
Odoo Warning - Warning
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and
will be ignored.The switch --header-html, is not support using
unpatched qt, and will be ignored.The switch --footer-html, is not
support using unpatched qt, and will be ignored.QXcbConnection: Could
not connect to display.
I've tried to solved this bug but still failed, help me please
I can't take credit for this answer, but I was able to solve the issue using the solution provided by Tsounabe here: Stack Overflow Patched QT Topic
The only thing I can add is that I changed the version (0.12.3) in each line to the latest (0.12.4) and was able to use the latest version to accomplish the same thing.
Good luck!

warning: (Internal error: pc 0x804a6b0 in read in psymtab, but not in symtab.) g++

I am trying to debug a program using ddd. When I try to enter any function, or within main() itself, I get the following warning:
warning: (Internal error: pc 0x804a6b0 in read in psymtab, but not in symtab.)
This warning flashes whenever I try to move to another instruction using n or enter or leave a function. I have tried to look this up in other forums, but with no conclusive answer. The code I am trying to debug runs into several files and I am not sure if I can post the entire code here.
I am using g++ version:
g++ (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)
Any help on this is most welcome.
ks1322 is correct to suggest that the problem is likely to be due to a bug in gdb which has been corrected. I think the relevant description and patch are described in the following link.
http://sourceware.org/ml/gdb-patches/2003-01/msg00074.html
I can confirm that when I also encountered this problem in a C++ application under gdb 6.8, updating to gdb 7.2 resolved it.
Try to use more recent version of gdb (7.0 or 7.1)