Build settings in Android Studio on Windows - windows

I am facing the problem while making the build of the app. Some files are autogenerated and during that some of the import paths are written wrong:
In update_attendance.ast.gql.dart
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:firm_mobile%5Csrc%5Cnetwork%5Cgraphql%5Coperations%5Cevents%5Cupdate_attendance%5C__generated__%5Cupdate_attendance.ast.gql.dart'
as _i2;
import 'package:gql/ast.dart' as _i1;
Error:
[SEVERE] ferry_generator:graphql_builder on lib/src/network/graphql/operations/events/update_attendance/update_attendance.graphql:
Could not format because the source could not be parsed:
line 1, column 213 of .: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
╷
1 │ import 'package:firm_mobile\src\network\graphql\operations\events\update_attendance\__generated__\update_attendance.ast.gql.dart' as _i5;import 'package:firm_mobile\src\network\graphql\operations\events\update_attendance\__
generated__\update_attendance.data.gql.dart' as _i2;import 'package:firm_mobile\src\network\graphql\operations\events\update_attendance\__generated__\update_attendance.var.gql.dart' as _i3;import 'package:firm_mobile/src/networ
k/graphql/schema/__generated__/serializers.gql.dart' as _i6;import 'package:built_value/built_value.dart';import 'package:built_value/serializer.dart';import 'package:ferry_exec/ferry_exec.dart' as _i1;import 'package:gql_exec/gql_exec.d
art' as _i4;
│ ^^
╵
Where in the settings of Android Studio I can check or change how the / has to be interpreted (format settings)?
I am using Windows. On Mac this problem doesn't appear. But I need to solve it on Windows.

Apparently, it is the problem of the package ferry_generator on Windows' machines. It is still an open issue, but there are some possible solutions.
Check this discussion.
Downgrade was not an option for me, so i set in the pubspec.yaml the github link to the ferry_generator.
It is working by now, no one knows how it will be in near future. Hope, that the issue will be solved soon.

Related

Multiple problems installing TeX Live 2021 on Windows 10

I have a Windows 10 laptop where no TeX distribution was ever installed before (double-checked for config directories, files, and environment variables).
Wanting to install TeX Live 2021, I followed the full installation guide and also read the Windows-specific warnings. I've now tried several times, following different installation procedures - cleaning up everything (deleting base & user directories, environment variables, etc) before each time - but still don't manage to get a working installation. Before I report a bug at tex-live#tug, I wanted to ask for advice here, in case I'm doing something wrong. Here is what I did, step by step, and the problems I encountered in the process.
1. First I tried running the recommended online installer install-tl-windows.exe. It never got past the screen that tries to contact or load from a repository, even after a 30-min wait. Tried a dozen times, choosing different mirrors nearby and far away. No luck.
2. Then I downloaded and unpacked the install-tl.zip and run install-tl-windows.bat therein. This time the main installation window appeared. I left all default paths and environment variables (note that I do have write access to C:); in the selection scheme I unselected all languages except US & UK English, unselected XeTeX, LuaTeX, ConTeXt; also unselected TeXworks (I use Emacs), and clicked Install. After one to three hours (depending on the mirror I chose), the installation was complete.
I tried compiling a minimal latex document (see below), and got an error similar to the one in this old question:
I can't find the format file `pdflatex.fmt'
Following the advice in the answers to that question and similar questions elsewhere online such as this, I tried running texhash and fmtutil-sys --all. The latter gave the error
no appropriate script or programme found fmtutil.
for which there are also many posts online.
2a. Not understanding what the problem could be, I re-tried with all possible combinations of the following three options: (a) choosing different mirrors; (b) leaving the full selection of packages (ie without unselecting some languages, LuaTeX etc); (c) redoing the procedure by choosing "Run as Administrator". No luck.
3. At this point I tried downloading the ISO file with the full installation. Mounted the image and run install-tl-windows.bat (as normal user, as recommended; I repeat that I do have write access to C:). Everything proceeded as in step 2. above. At the end of the installation I tried running pdflatex on the minimal latex document. New error this time:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
entering extended mode
(./minimal-template.tex
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
! LaTeX Error: File `article.cls' not found.
Very strange. A file search revealed that article.cls is in the TeXLive file system; but kpathsea did not see it indeed.
4. At this point I opened the TeX Live Shell from the Start Menu; selected a CTAN mirror; updated the TL Manager which was not up to date; updated all packages; run Regenerate filename database; and run Regenerate formats. With the latter I got this error:
tex live shell:
mtutil [INFO]: total formats: 59
fmtutil [INFO]: exiting with status 53
C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 53:
perl.exe c:\texlive\2021\texmf-dist\scripts\texlive\fmtutil.pl --sys --all
Here is a snip from the full set of errors appearing in the "Other" tab (I'm replacing my user directory with asterisks for privacy; note that I do have write access to these directories):
start load https://www.nic.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet
finish load https://www.nic.funet.fi/pub/TeX/CTAN/systems/texlive/tlnet
start load http://contrib.texlive.info/current
finish load http://contrib.texlive.info/current
running mktexlsr ...
done running mktexlsr.
running mtxrun --generate ...
done running mtxrun --generate.
running updmap-sys ...
done running updmap-sys.
regenerating fmtutil.cnf in C:/texlive/2021/texmf-dist
running fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX ...
tlmgr.pl: fmtutil-sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX failed (status 255), output:
Unknown option: status-file
Try "fmtutil --help" for more information.
C:\texlive\2021\bin\win32\runscript.tlu:915: command failed with exit code 255:
perl.exe c:\texlive\2021\texmf-dist\scripts\texlive\fmtutil.pl --sys --byengine luatex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX
running fmtutil-sys --byengine luajithbtex --no-error-if-no-format --no-error-if-no-engine=luajithbtex,luajittex,mfluajit --status-file=C:\Users\***\AppData\Local\Temp\rPSb0Dpak2\WW_dJvUHgX ...
I tried to continue anyway with Regenerate fontmaps, and then tried again pdflatex on the minimal document. New error:
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) (preloaded format=pdflatex)
restricted \write18 enabled.
---! c:/texlive/2021/texmf-var/web2c/pdftex/pdflatex.fmt made by different executable version
(Fatal format file error; I'm stymied)
5. I tried again steps 3. and 4., but with "Run as Administrator". Same errors.
OK at this point I give up and really don't know what to do. Am I doing something wrong? For the moment I have to concur with this post: installation of TeX Live 2021 is an utter failure.
Here is the minimal latex file I used for testing (copy & paste):
\documentclass{article}
\begin{document}
test
\section{Section}
test
\end{document}
Found, that the download is not working because the system path to "cmd.exe" is not found. Therefore: open a cmd window and add the system path prior to starting the .bat file (set PATH=%PATH%;C:\Windows\system32)

socket.io-client-swift Package resolution Failed in Xcode13 Beta project

Hello to all i'm currently using the client of socket.io (https://github.com/socketio/socket.io-client-swift) with the new package manager of XCODE13 when i try to add the package using the package manager, i paste the URL of the repository(https://github.com/socketio/socket.io-client-swift) into the search bar, the package appears, then i do click into 'Add Package' button, but i get this Error (see the image):
If i use the 'Add Anyway' option in order to add the package the line import SocketIO into my view file doesn't find the package gives me an error, and i have the same result importing the package via 'Add Local' option, i get the same error.
Thank you and sorry for the English
Am i doing something wrong?
I also have problems with socket.io using Carthage in Xcode 13 and Monterey
Building scheme "SocketIO" in Socket.IO-Client-Swift.xcodeproj
Build Failed: …
…
This usually indicates that project itself failed to compile.
Edit: I fixed my issue replacing the 1200 by 1300 in the carthage workaround script

Configure ESLint with TypeScript in Visual Studio 2019

I am trying to configure ESLint in Visual Studio 2019, I enabled ESLint in Options and I have installed ESLint 7.4.0 in node_modules inside my project, which should cause Visual Studio to use that version according to this document. But this causes a single not so helpful error.
When running eslint . in the command line from the same directory as the .eslintrc.yml file it works and errors and warnings about my code are reported.
When viewing a .js, .ts or .tsx file in Visual Studio it reports the following error internal-error: (ESLint) Unexpected token { at the first character of the file. No other errors are reported (where the command line does report errors). Visual Studio does report the usual intellisense TypeScript errors in these files.
The following is my .eslintrc.yml file.
---
parser: "#typescript-eslint/parser" # Specifies the ESLint parser
parserOptions:
ecmaFeatures:
jsx: true # Allows for the parsing of JSX
settings:
react:
version: detect # Tells eslint-plugin-react to automatically detect the version of React to use
extends:
- plugin:react/recommended # Uses the recommended rules from #eslint-plugin-react
- plugin:react-hooks/recommended # Uses the recommended rules from #eslint-plugin-react-hooks
- plugin:#typescript-eslint/recommended # Uses the recommended rules from the #typescript-eslint/eslint-plugin
Is there a way to see what Visual Studio is executing and what causes this error?
I tried running devenv.exe /log, but this logged nothing interesting, only that something was done with eslint. As you can see below.
821 Begin export of category 'TypeScript_EsLint' ({d5d56c12-87c4-46f2-894f-3a75ee781f48}) from package 'Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=16.0.0.0, Culture=neutral' ({2FFE45C4-5C73-493C-B187-F2E955FF875E}). 3095452 KB of virtual memory currently available. Profile manager 2020/08/19 08:11:21.001
822 End export of category 'TypeScript_EsLint' ({d5d56c12-87c4-46f2-894f-3a75ee781f48}) from package 'Microsoft.VisualStudio.LanguageServices.TypeScript.TypeScriptPackage, Microsoft.VisualStudio.LanguageServices.TypeScript, Version=16.0.0.0, Culture=neutral' ({2FFE45C4-5C73-493C-B187-F2E955FF875E}). 3095452 KB of virtual memory currently available. Profile manager 2020/08/19 08:11:21.003
I had almost the exact same problem, and thanks to the article linked from the comment by #Qurben, I solved it by:
Downgrade to ESLint 6.8, since ESLint 7 requires Node.js 12, and older versions of Visual Studio 2019 run Node.js 8. This may not be necessary any longer.
Add parserOptions.tsconfigRootDir = __dirname to .eslintrc.js (as seen in this instruction. Note that this probably doesn't work in .eslintrc.yml or .eslintrc.json.

Error in publishing to RPubs from Rstudio

I installed the latest version of RStudio (RStudio 1.1.423 - Windows Vista / 7/8/10).
I'm trying to publish to RPubs, but in Global Options does not appear the option for Rpubs.
When I request Publish Document, the following error appears: Error occurred while executing method.
Rprofile:
I entered the command: options (rpubs.upload.method = "internal") at line 25 of Rprofile, but it did not resolve.
The solution is provided by a careful rereading of http://rstudio-pubs-static.s3.amazonaws.com/25030_8e9c9ffc3b3c423d9381d81543423502.html
"Put in options(rpubs.upload.method = “internal”) and no other text at all". Meaning that this line of code is the only code present in the .Rprofile file.
Previously I had been adding the line to a copy of the rest of the Rprofile text. The unnecessary code was the culprit.
I had the same error before. Turns out it was due to having an accent mark in a folder name from my directory (í). I just modified that one folder name and it worked fine.

Unexpected '#' in program Xcode 7 and Receigen

I just updated to Xcode 7.0 last night and it seems to have broken Receigen's generated code.
CFStringRef ReceiptValidation_str1 = #obfuscateCF#("");
Unexpected '#' in program
Receigen hasn't been updated since 2014, so this is almost certainly an Xcode 7 issue.
I reached out to the developer of Receigen and haven't heard back yet (it has only been a few hours). Any help would be appreciated.
In your Xcode Target, tab "Build Phases", edit your Receigen shell script. Replace the declaration EXPANDED_BUNDLE_ID that looked like:
EXPANDED_BUNDLE_ID=`eval \"echo $BUNDLE_ID\"
simply by the variable PRODUCT_BUNDLE_IDENTIFIER (introduced in Xcode 7)
EXPANDED_BUNDLE_ID=$PRODUCT_BUNDLE_IDENTIFIER
(you can also delete the old, now needless, declaration of BUNDLE_ID)
Your script should look like this:
# Receigen binary
RECEIGEN="/Applications/Receigen.app/Contents/MacOS/Receigen"
# Extract Info.plist information
INPUT="$INFOPLIST_FILE"
BUNDLE_VERSION=`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "$INPUT"`
# Expand information if needed
EXPANDED_BUNDLE_ID=$PRODUCT_BUNDLE_IDENTIFIER
EXPANDED_BUNDLE_VERSION=`eval "echo $BUNDLE_VERSION"`
# ...etc...
Note: found this thanks to #mcgyver42's answer and this question
See "Get Bundle ID from build settings instead of info.plist". I think it's the same issue, and I posted a work-around.
Xcode Script - Get Bundle ID from build settings instead of info.plist

Resources