Tag Archives: ProgrammerAH

AndroidStudio sync failed solution

Error running All Tests: Gradle projectsync failed. Please fix your project and try again. How to solve?
First, a two-week solution was found online:
Plan 1: Since Gradle is suggested, start with this batch. What is Gradle?Please poke here: click open link
1. The File – & gt; Invalidate caches/Restart
2. The Shutdown Android Studio
3. Rename/remove. Gradle Folder in the user Home Directory
4 Restart Android Studio let it Download all the Gradlestuff it Needs
Gradle Build Success!
6. Rebuild project… success !
 
Scheme 2:
File -> Settings Search for Gradle, make the following changes (specify the location of Gradle to be downloaded manually), For Gradle download, please stamp here: click open link

Solution 3:
The above method didn’t work, so I killed gradle and Gradle in the project directory, created a new project, copied the two folders in the new project, and the Studio returned to normal.

In addition to the above methods, based on personal experience can also be:
This can also happen if a project developed on an original device is about to be moved to another device (the gradle update download is very slow)
At this point, first go to the Settings of Android Studio under the new device and turn off the Proxy

Then go to the directory of Gradle

Use the.gradle directory for the original device instead of the gradle directory for the new device.

Failed to decrypt protected XML node “DTS:Password” with error 0x8009000B “Key not valid for use in …

Solutions:

    using the configuration file, put the information such as password in a configuration file, run the package when read from the configuration file (the configuration file is best stored in a safe place) to replace the ProtectionLevel that package EncryptSensitiveWithPassword and set the password, open CommandLines after deployment, will be prompted for a password, after input, run the package successfully. After deployment, enter DataSource, check the required DataSource, and then enter CommandLines. The previously selected DataSource will be automatically generated in it, and Password will be edited into it.

The first is a formal approach, good security, but more troublesome, because to deploy to a remote server, but do not have the authority to put configuration files into this server, so temporarily unable to adopt this approach.
The latter two are gradually tried out by myself. They are simple and not safe (especially the third one).

Reproduced in: https://www.cnblogs.com/Muller/archive/2012/02/16/2354377.html

Git push “fatal: Authentication failed ”

Git pushed “Fatal: Authentication failed”
Question why
You set up two-step validation earlier

 If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account. Using this token as your password should allow you to push to your remote repository via HTTPS. Use your username as usual.

The solution
Update the branch

git remote -v 
git remote remove origin 
git remote add origin [email protected]:user/repo.git  

## Resources
[1].Git push results in “Authentication Failed”

Reproduced in: https://www.cnblogs.com/OneFri/p/11123584.html

gradle sync failed CreateProcess error=267 directory is invalid

Gradle Sync Failed CreateProcess Error =267 directory invalid
There was no problem with the import of the company’s project at the beginning, but it was turned off. After starting up the next day, an error was reported:

CreateProcess Error =267 directory name invalid

After searching on Bing for a long time, I couldn’t find a corresponding solution, so I asked for help from my predecessors.
The elder say: you see, somebody said the directory name is invalid, so you just change the directory (project) name.
There is an & AMP in the project name; The sign, I’ll just change it to _.

a& B – & gt; a_b

Delete the.imL file in the project with the same name as the project name and reimport it. Problem solving.

A&amp was deleted from the project; B.i ml file.

 

How to Fix Failed to add the host to the list of known hosts

The first mistake you encounter might be

    Macintosh:Permissions 0755 for '/User/xxxx/.ssh/id_rsa' are too open.
    Linux:Permissions 0755 for '/home/xxxx/.ssh/id_rsa' are too open.

This means that your private key permissions are too large, so only you need to operate

    sudo chmod 600 ~/.ssh/id_rsa sudo chmod 600 ~/.ssh/id_rsa.pub

The known_hosts file has a problem with permissions when you encounter the following situation

    Are you sure you want to continue connecting (yes/no)?yes Failed to add the host to the list of known hosts

Execute this command

    sudo chmod 644 ~/.ssh/known_hosts

Finally, to get your.ssh folder permissions right, execute the following command

    sudo chmod 755 ~/.ssh

Then your.ssh folder and the private and public key permissions within it are resolved!

Idea svn connection https error report: E230001: Server SSL certificate verification failed: certificate issued

After reinstalling windows10, E170013 E230001: Server SSL certificate verification failed: certificate issued,
The same problem was found online and the solution is recorded here
 
CMD opens the run window and executes the following command
SVN ls https://xxx
XXX is the specific SVN project address
So you can display (R) Eject, accept (t)emporarily or Accept (p) Ermanently, right?
Just input P
Then follow the prompts and enter the SVN account name UserName and Password
Finally, checkout from subversion with a refresh

 

mvn install Error: Failed to read artifact descriptor org.apache.maven.plugins:maven-install-plugin:jar:2

I have been using my laptop for development. Today, I improved the desktop environment. I pulled the project from Git, and there was an error in Maven project install.
 

[INFO] Scanning for projects...
[INFO] Downloading from nexus: http://maven.aliyun.com/nexus/content/groups/public/com/bonc/ti/ti-parent/1.0.6-SNAPSHOT/maven-metadata.xml
[WARNING] Could not transfer metadata com.bonc.ti:ti-parent:1.0.6-SNAPSHOT/maven-metadata.xml from/to nexus (http://maven.aliyun.com/nexus/content/groups/public/): Operation not supported: connect
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building vbap data model 3.0.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading from nexus: http://maven.aliyun.com/nexus/content/groups/public/org/apache/maven/plugins/maven-install-plugin/2.5.2/maven-install-plugin-2.5.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.307 s
[INFO] Finished at: 2017-12-19T19:50:31+08:00
[INFO] Final Memory: 15M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-install-plugin:2.5.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-install-plugin:jar:2.5.2: Could not transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.5.2 from/to nexus (http://maven.aliyun.com/nexus/content/groups/public/): Operation not supported: connect -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

The maven-install-Plugin :2.5.2 shows that it is not possible to transfer the Maven-install-plugin from the repository, because When Maven installs, it is done through the Maven-install-Plugin. The existence of the install plugin must be ensured first. Visit http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException you can see the cause of abnormal PluginResolutionException this has six:
 
 
 
1. Trying to access a plug-in that doesn't exist in the repository, such as miswriting the Group ID, artifact ID, or version number.
2. The accessed plug-in is a third-party plug-in not published to the central library, but your pom file or setting.xml file does not have < pluginRepository> The tag indicates the plug-in to be downloaded from the repository. One thing to note here is that < repository> definition does not work when finding plug-ins and their dependencies, only < pluginRepository> works for the plug-in download.
3. The plug-in repository needs permission authentication, but Maven does not have permission authentication, so it cannot access the repository server, so it should go to < server> definition:

<server>
  <!-- server(服务器)的id,对应着mirrors中的id,指定了该地址的验证信息 -->
  <id>nexus</id>
  <username>xxx</username>
  <password>xxx</password>
</server>

4. Network problems, such as some addresses need VPN to access, then need proxy configuration, etc. Settings. XML file to set the agent:
 

<proxies>
 <proxy>
  <id>optional</id>
  <active>true</active>
  <protocol>http</protocol>
  <host>代理的ip地址</host>
  <port>端口</port>
 </proxy>
</proxies>

Maven failed to save the plug-in locally. According to LocalRepositoryNotAccessibleException for more information.
6. The configured plug-in repository is not visible to the plug-in you need. For example, if I want to access a SNAPSHOT version of the plug-in, I cannot access it in the official repository.
 
 
 

<pluginRepositories>
  <pluginRepository>
    <id>central</id>
    <url>http://central</url>
    <releases>
      <enabled>true</enabled>
    </releases>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </pluginRepository>
</pluginRepositories>

 
Going back to my own problem, I went to the warehouse and saw that again this version of the plug-in exists, so there is no 1 problem. It's not a 2.
Error: Operation not supported: connect. Look not to understand.
It is ok to say that there is a connection problem and That I can download other dependency package instructions. Then I went to the settings. XML file for configuration items, and I was fine.
Here are some solutions to this problem on StackOverflow:

1. Right click project -& GT; maven -> update-project -> Check force to Update Snapshot/Release -> OK
2. Delete all the files under. M2/and download them again.
3. Copy the Settings. XML file to.m2/ folder.
4. Check the Settings file configuration in Eclipse :Windows-& GT; preferences-> maven-> User Settings

Back in Eclipse, I right-click the project Update Project and found that it did not work. Then I copied the Settings.xml file to. M2/folder, ran MVN install and still reported an error.
I hope the above scheme can help you, thank you!
Reference link:
http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
https://stackoverflow.com/questions/18728792/failed-to-read-artifact-descriptor-for-artifact-present-in-my-localhost-nexus-re
https://stackoverflow.com/questions/10729394/artifactdescriptorexception-failed-to-read-artifact-descriptor-maven-error
If you have any related questions, please refer to:
https://stackoverflow.com/questions/12533885/could-not-calculate-build-plan-plugin-org-apache-maven-pluginsmaven-resources
https://stackoverflow.com/questions/6642146/maven-failed-to-read-artifact-descriptor
 
 
 

linux Run: initramfs unpacking failed:write error

Initramfs Unpacking Failed: write error when liunx started

To tell the truth, Baidu a lot, as a novice do not know how to do
Later their original memory allocation only 512MB, later changed to 2048MB, on the line. It’s amazing. I don’t know if there’s a god to explain it.
You installed your own live version, so you don’t have to wait for installation time. There was no problem with the installation of 512MB for the first experimental class. This time the error was reported. It was really amazing

This application failed to start because it could not find or load the Qt platform plugin “windows”.

When running the file, prompt:
This Application failed to start because it could not find or load the Qt Platform plugin “Windows”.
Reinstalling the application may fix this problem.

solution:
1. Comment out the code related to matplotlib and find that the above error disappears, indicating that there is a problem with the package matplotlib, re-install
2 in conda environment. This Application failed to start because it could not find or load the Qtplatform Plugin… The version is too low, Upgrade pytorch
enter the anaconda prompt
activate environment conda activate pytorch
to upgrade PIP install --upgrade pytorch torchvision
to wait for installation conda install pytorch torchvision-c pytorch

Modify samba configuration, restart service failed

Service restart samba dl@lx100: ~ $$
= = = verify org.freedesktop.systemd1.manage-units = = = =
Authentication is required to restart “samba.service”.
Authentication is: root
Password:
=== Authentication complete ===
Restart samba failed. Service:unit samba. the service is masked.

dll @lx100:~$ sudo systemctl restart smbd service