Author Archives: Robins

Postman error: connect econrefused 127.0.0.1:7890

Problem Description: check the consle and find that postman has been crazy to link to the local port 7890, but I didn’t use the port at all. Could not send request has been reported wrong.

Solution: 1. I install postman on one computer, and then link to the same service port. Check the consle and find that the local port 7890 is not connected. Compare the two settings and find that they are the same.

2. But I always think it’s a setting problem. Later, I kept trying to find that I could just remove the check of setting proxy use the system proxy

 

I guess the local proxy settings of the pot.

Eclipse report error Error:opening registry key ‘Software/JavaSoft/JRE’

I want to taste the latest jdk10, Since Java removed the generation of JRE directory in JDK folder when it was installed from java9, and gradle was not compatible with JDK installation mode without JRE folder, it had to switch back to java8, so after repeatedly unloading and reinstalling JDK, an error occurred when starting eclipse Error:opening registry key ‘Software/JavaSoft/JRE’

The error information is as follows:

Please click to input the picture description

Please click to input the picture description

Please click to input the picture description

Please click to input the picture description

Obviously, the system does not find the JRE, and the current java version is still not displayed in the CMD – & gt; Java – version. Of course, the environment variable Java_ Home and path are checked correctly. It is suspected that Java is not found correctly due to cache or registry_ Then, with the mentality of having a try, compare the previous environment variable name with the “Java” in the path_ The key value of “home” is replaced by the uppercase “Java”_ “Home” has been changed to lowercase “Java”_ Then CMD – & gt; Java – version can display the information of jdk8 normally, restart eclipse, perfect solution! Share here, hope to help you!

Error: could not create the Java virtual machine Error:A Fatal exception has occurred

The error report is as follows:

Prompt that the Java virtual machine could not be created successfully.

The main reason for the above error is that eclipse can’t find the JDK installed on the machine when it starts (if it doesn’t install, please go to Baidu installation tutorial to install it). At this time, we need to manually guide eclipse to load the JDK path.

Open the eclipse installation path and find the eclipse.ini File, pay attention to open the file suffix display, as shown in the following figure:

Open with Notepad + + and other text editing tools eclipse.ini File:

Add two lines of code out of the rectangular box in the file, pay attention to the path, fill in the bin directory under the JDK installation path of your own machine, save and restart eclipse. This problem can be solved.

Because the computer is stuck, force to restart the computer and open idea idea to report an error on line 1: no content is allowed in the foreword.

Because the computer is stuck, it is forced to restart the computer and open idea for JUnit unit test

Idea reported an error. Error:Failed to load project configuration: cannot parse xml
file E:\ project.idea \ workspace.xml : error on line 1: content is not allowed in foreword.

Solution:

Search in folder workspace.xml Paste the contents into the workspace.xml It can be
Path:
D::

Angular6 rxjs start error in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ‘;’ expected.

After introducing the rxjs module, the project starts with an error
ERROR in node_modules/rxjs/internal/types.d.ts(81,44): error TS1005: ‘;’ expected.
node_modules/rxjs/internal/types.d.ts(81,74): error TS1005: ‘;’ expected.
node_modules/rxjs/internal/types.d.ts(81,77): error TS1109: Expression expected.

How to solve this error?
You could update your project to TS 2.8You can pin your project to [email protected]
issue:
https://github.com/ReactiveX/rxjs/issues/4540
https://github.com/ReactiveX/rxjs/issues/4512

Android studio version 3.0 import version 2.2.2 error Error:This Gradle plugin requires Studio 3.0 minimum

Foreword: the company uses version 3.0, and its computer is installed with version 2.2.2. The imported project gradle has reported an error, which has been encountered before. The reason for time has forgotten how to solve it, so Google has solved it, and hereby records it in a blog


Error:This Gradle Plugin requires studio 3.0 minimum
error: gradle plug-in requires 3.0 minimum

add this code android.injected.build.model.only.versioned=3

According to the above steps, the problem of gradle plug-in is solved, and an error is reported at runtime

Installation failed with message INSTALL_ FAILED_ TEST_ ONLY.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?

No matter you click cancel or OK, the installation is not successful, as shown in the following figure


The solution: still in gradle.properties File addition android.injected.testOnly=false

add android.injected.testOnly=false

Then the problem is solved, the project can run normally on the mobile phone, and can play happily

Android dependency merge rules

  1. Remote dependency merge rule

If multiple modules depend on the library in the way of [implementation + coordinates], only one version will be compiled, and it is the latest version

module A: 
implementation "com.fengma.tool:gradle-tool:2.1.2"
...
module B:
implementation "com.fengma.tool:grdle-tool:2.3.3" //gradle default the latest version

If you want to change the default compile version selection, you can specify a version by using gradle’s dependency selection mechanism

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'com.fengma.tool') {
            details.useVersion '2.1.2'
            details.because 'Use Lower version'
        }
    }
}

2. Local plus remote dependency mode

When module a introduces a jar package in the way of [local lib], and module B introduces the same library in the way of [implementation + coordinates], it will cause compilation conflicts and lead to compilation failure. Therefore, it is necessary to unify the dependency mode.

module A:
compile files('libs/fengma-tool-2.1.2-.jar')
...
module B:
compile "com.fengma.tool:grdle-tool:2.3.3"
... Compilation conflicts, class duplication

Spring Boot Error starting ApplicationContext. To display the auto-configuration report re-run you

Recently, there was an error when working with the spring boot framework:

Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2018-05-08 10:11:20.975 ERROR 11344 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Cannot determine embedded database driver class for database type NONE

Action:

If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).


Process finished with exit code 1

Several methods of searching on the Internet have no effect, on the contrary, new errors appear
later, when I checked carefully, I found that my controller package and application package are in parallel position

But in fact, the controller package must be scanned in the application package to run the program normally, so as long as you move the controller package into the application package, there will be no error