Tag Archives: Q&A

Error: could not fork new process for connection: Resource temporarily unavailable

The target user has too many processes or threads.
alone without each process limit Linux threads, just on the system process of the total limit
(thread is essentially on Linux has Shared address space of the process),
to check the number of threads:
the cat/proc/sys/kernel/threads – Max
to increase the number of threads:
echo 100000 > /proc/sys/kernel/threads-max
There is also a limit to the number of processes (and threads) that a single user can create, ulimit/getrlimit details about these limits.

Aapt2 error: check logs for details

Exception:

Caused by: com.android.builder . internal.aapt .v2.Aapt2Exception: AAPT2 error: check logs for details
    at com.android.builder . png.AaptProcess $N otifierProcessOutput.handleOutput ( AaptProcess.java:443 )
    at com.android.builder . png.AaptProcess $N otifierProcessOutput.err ( AaptProcess.java:395 )
    at com.android.builder . png.AaptProcess $ ProcessOutputFacade.err ( AaptProcess.java:312 )
    at com.android.utils .GrabProcessOutput$1.run( GrabProcessOutput.java:104 )

All r documents are wrong and red;

Aapt2 explains:

AAPT is the full name of Android asset packaging tool. It is an indispensable tool to build app and even Android system. Its function is to compress and package all resource files into Android APK. We can find it in the Android SDK directory. For example, I can find it in my directory D: SDK, build tools, 28.0.2, and other versions of build tools;

Aapt2 is a new version of AAPT. Starting from Android studio 3.0, it is used as the default resource packaging tool.

terms of settlement:

1. Click toggleview to view the execution output of gradle more clearly;

After clicking, it is shown as follows:

2. The red output information in the figure above has the following information:

AGPBI: {"kind":"error","text":"error: resource drawable/shape_round (aka com.liyuhuyu.liyu:drawable/shape_round) not found.","sources":[{"file":"E:\\Project\\LiYuTwo\\app\\src\\main\\res\\layout\\item_water.xml","position":{"startLine":10}}],"original":"","tool":"AAPT"}

AGPBI: {"kind":"error","text":"error: resource drawable/popupwindow_close (aka com.liyuhuyu.liyu:drawable/popupwindow_close) not found.","sources":[{"file":"E:\\Project\\LiYuTwo\\app\\src\\main\\res\\layout\\popupwindow_pay_select.xml","position":{"startLine":62}}],"original":"","tool":"AAPT"}

3. From the above prompt output information, we can know the following:

1) The file where the error occurred is item_ water.xml ;

2) The reason for the mistake is android:background Property value “@ drawable / shape”_ “Round” not found

4. Open item_ water.xml File, find the error location, as shown in the above output information error; delete or correct it;

Conclusion:

1) In fact, the reason for my error is that the referenced resource file cannot be found;

2) Aapt2 is a tool for packing resource files. If aapt2 reports an error, it is usually a problem with the resource file.

Other solutions:

Many solutions on the Internet say that the project is successful gradle.properties Add a line to“ android.enableAapt2=false “To shut down aapt2


Other knowledge:

Use AAPT to view the app package name and other information

1, use CD in the command line of CMD to switch to the directory where AAPT is located

2. Enter the command “AAPT dump bagging C: / / users / administrator / desktop / find fault 201905171701. APK” to run, OK;

The path of the app is C: users, administrator, desktop, 201905171701.apk

psycopg2.OperationalError: SSL SYSCALL error: EOF detected

Q:
psycopg2.OperationalError: SSL SYSCALL error: EOF detected
A:

exception psycopg2.OperationalError
Exception raised for errors that are related to the database’s
operation and not necessarily under the control of the programmer,
an unexpected disconnect occurs, the data source name is not
found, a transaction could not be processed, a memory allocation error
occurred during processing, etc.

an exception thrown for an error (not necessarily under programmer control) related to a database operation. An unexpected disconnect occurred, the data source name was not found, transactions could not be processed, memory allocation errors occurred during processing,
There are several possible causes of error reporting

1. Slow query
2. Process out of memory
3. Other queries are running, causing the table to be locked indefinitely
4. Insufficient disk space
5. Firewall

When the code successfully connected, but later an OperationalError occurred. Try to handle these broken connections in your code: the command to be executed is put into a try-catch block, and if the connection is broken, try to reconnect
Reference: https://stackoverflow.com/a/51764831/10051290

【Q&A】Failed to start LSB: Bring up/down networking

Failed to start LSB: Bring up/down networking

because the *. VMSS file was deleted, after restarting the virtual machine, I found that I could not make a remote connection through SSH. Then I tried to restart the network card service, and the result was abnormal, as shown below:


baidu circle, is to modify the MAC address, but after the change does not have any use, finally Google solved.
facts prove that baidu is a gray goods! Solution: disable NetworkManager

  1. systemctl stop NetworkManager
  2. systemctl disable NetworkManager
    then restart the network service and network can be connected normally!