Error:Execution failed for task ‘:app:compileDebugKotlin’. > Compilation error. See log for more details
Build: gradle this (module: APP)
buildscript {
repositories {
maven {
url ‘https://jitpack.io’
url ‘https://maven.fabric.io/public’
}
}
dependencies {
classpath ‘io.fabric.tools:gradle:1.+’
}
}
apply plugin: ‘com.android.application’
apply plugin: ‘kotlin-android’
apply plugin: ‘io.fabric’
apply plugin: ‘kotlin-android-extensions’
repositories {
maven { url ‘https://maven.fabric.io/public’ }
mavenCentral()
}
android {
compileSdkVersion 25
buildToolsVersion “25.0.2”
useLibrary ‘org.apache.http.legacy’
lintOptions {
checkReleaseBuilds false
abortOnError false
}
defaultConfig {
applicationId “uxx.xx.xxe”
minSdkVersion 18
targetSdkVersion 25
versionCode 17
versionName “0.1.14”
testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner”
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
debug {
ext.enableCrashlytics = false
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
}
sourceSets {
main {
jniLibs.srcDirs = [‘libs’]
assets.srcDirs = [‘src/main/assets’, ‘src/main/assets/’]
res.srcDirs = [‘src/main/res’, ‘src/main/assets/fonts’]
}
}
dexOptions {
jumboMode true
javaMaxHeapSize “4g”
}
packagingOptions {
exclude ‘META-INF/DEPENDENCIES’
exclude ‘META-INF/NOTICE’
exclude ‘META-INF/LICENSE’
exclude ‘META-INF/LICENSE.txt’
exclude ‘META-INF/NOTICE.txt’
exclude ‘META-INF/ECLIPSE_.SF’
exclude ‘META-INF/ECLIPSE_.RSA’
}
}
dependencies {
compile fileTree(include: [‘*.jar’], dir: ‘libs’)
compile “com.android.support:cardview-v7:${rootProject.supportLibraryVersion}”
compile “com.google.android.gms:play-services-ads:${rootProject.googlePlayServicesVersion}”
compile “org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version”
compile ‘org.igniterealtime.smack:smack-android-extensions:4.1.9’
compile ‘org.igniterealtime.smack:smack-tcp:4.1.9’
compile ‘org.igniterealtime.smack:smack-experimental:4.1.9’
testCompile ‘junit:junit:4.12’
}
apply plugin: ‘com.google.gms.google-services’
apply plugin: ‘com.getkeepsafe.dexcount’
Build: gradle the project
// top-level build file where you can add configuration options common to all subprojects/modules.
buildscript {
ext.kotlin_version = ‘1.1.2-2’
repositories {
jcenter()
}
dependencies {
classpath ‘com.android.tools.build:gradle:2.3.1’
classpath ‘com.google.gms:google-services:3.0.0’
//visualize the method count
classpath ‘com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.6.2’
classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version”
}
}
allprojects {
repositories {
jcenter()
maven { url “https://jitpack.io” }
}
}
ext.googlePlayServicesVersion = ‘10.2.0’
ext.supportLibraryVersion = ‘25.3.1’
task clean(type: Delete) {
delete rootProject.buildDir
}
Solution.
>Invalidate cache/restart
>Build – >Clean the project
>Update kotlin plugin, use the latest version of kotlin, google apis.
Edit
./gradlew build –stacktrace > logs.txt 2>logErrors.txt
logErrors.txt
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:app:compileDebugKotlin’.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
at org.gradle.initialization.DefaultGradleLauncher$3.execute(DefaultGradleLauncher.java:196)
at org.gradle.initialization.DefaultGradleLauncher$3.execute(DefaultGradleLauncher.java:193)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:193)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCo
Idea Startup Error: Command line is too long [How to Solve]
In the folder of the project, find. Idea/workspace. XML, and in the file
< component name=”PropertiesComponent”>
Then add a new one:
< property name=”dynamic.classpath” value=”true” />
Vue Cli error: vuecliYou may need an additional loader to handle
take
//View SVG loader
//const svg rule=config.module.rule(’svg’);
//Clear ();
//svgrule.use(’view-svg-loader’).loader(’view-svg-loader’);
Population and development
[Solved] com.alibaba.druid.pool.DruidDataSource – create connecti
A service deployed in the server docker reported the following error when connecting to the database:
I have searched a lot of information on the Internet, but I can’t solve it by trying various ways,
ERROR com.alibaba.druid.pool.DruidDataSource - create connection SQLException, url: jdbc:mysql://10.10.20.16:3306/acs?&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&serverTimezone=Asia/Kolkata, errorCode 0, state 08S01
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
The specific error information is as follows:
ERROR com.alibaba.druid.pool.DruidDataSource – create connection SQLException, url: jdbc:mysql ://10.10.20.16:3306/acs?& amp; useUnicode=true& characterEncoding=UTF-8& zeroDateTimeBehavior=convertToNull& allowMultiQueries=true& serverTimezone=Asia/Kolkata, errorCode 0, state 08S01
com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
Cause of error:
It may be due to the different versions of JDK. This error message is probably caused by the SSL protocol of MySQL
solution: I tried to remove SSLv3 from java.security in jdk-8 on my local machine and restart the service, but I still couldn’t solve it
finally, add this to the MySQL connection string in the service configuration; Usessl = false, that is, disable SSL, problem solved
[Solved] There are test failures. Please refer to D:\Java_study\springboot\springboot-sugon-3\target\surefire-reports for the individual test results.
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-sugon-3: There are test failures.
Maven error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project springboot-sugon-3: There are test failures.
Please refer to D:\Java_study\springboot\springboot-sugon-3\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.**
Solution: Add the following code to pom.xml.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
Causes of error in data transmission from spring boot to JSON
ERROR 17468 — [nio-8081-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed;
The reason is that the @ResponseBody is not added to the method
[Solved] Error getting bean using springboot: no qualifying bean of type ‘xxx’ available
Recently, I encountered a bug in my work.
the project uses springboot, and uses springcontexthloder, getBean (); No qualifying bean of type ‘xxx’ available
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.tension.web.disabledevaluate.service.DisabledEvaluateService' available
Generally, this error indicates that there is no bean available. Check the code carefully to ensure that this class exists and is injected into spring correctly
Controller:
public Map loadForm(String round,String instanceId) {
//error
DisabledEvaluateService disabledEvaluateService = SpringContextHolder.getBean(DisabledEvaluateService.class);
}
Service:
@Service
@Transactional(readOnly = true)
public class DisabledEvaluateService extends CrudService<DisabledEvaluateDao, DisabledEvaluate> {
public DisabledEvaluate getByBjId(Map map){
return dao.getByBjIdOrInstanceId(map);
}
After several hours of exploration, we finally found the information on the Internet because we used the devtools hot deployment plug-in. As a result, when the program starts, we use the classloader rewritten by the devtools hot deployment plug-in instead of the Java default classloader. As a result, some classes may not be loaded correctly, resulting in the inability to obtain beans.
Solution:
this error can be solved without using hot deployment plug-in
How to Solve Tomcat Error: Could not resolve view with name ‘xxx/xxxxxxx‘ in servlet with
Click the control to not receive the returned JSON object, Tomcat reports an error.
reason:
Because the return information is a JSON object, the annotation added to the entry class where the controller method is located is: @ controller
The @controller is not suitable for returning JSON content
Method 1: change the @ controller annotation to @restcontroller without affecting the use of other methods
Method 2: add @ ResponseBody annotation to the method that needs to request to return the JSON object
Some of the other methods in the class of this method in the project return to the specified page, so @restcontroller cannot be used to replace @ controller directly, so method 2 is adopted to solve the problem.
The difference between @controller and @restcontroller is as follows
@Restcontroller is a stereotype annotation that combines @ ResponseBody and @ controller.
it means:
@restcontroller annotation is equivalent to the combined function of @ ResponseBody + @controller.
1) If you only use @restcontroller to annotate the controller, the methods in the controller cannot return the JSP page, the configured view parser internalresourceviewresolver does not work, and the returned content is the content in return.
For example, if you should go to the success.jsp page, success.jsp will be displayed
2) If you need to return to the specified page, you need to use @ controller with the view parser internalresourceviewresolver
3) if you need to return JSON, XML or custom media type content to the page, you need to add @ ResponseBody annotation to the corresponding method
How to Solve opcache error: zend_mm_heap corrupted
There are always problems with production. It seems that the memory is full, which makes it impossible to request
situation:
1. Machine clusters are built with containers
2. The request always appears 502, and it will appear after restarting PHP FPM
3. Open the error log configuration
Of course, you can’t turn off opcache directly. You will find that there is no cache. The memory is very high
Open the error log, and the log will appear in/var/log/PHP FPM/error.log
VI/etc/php-fpm.d/w8002.conf # select different conf files according to which group you want to change
Add a line at the end: catch_ workers_ output = yes
Php5.6 has been reported Zend_ mm_ Heap corrupted with standard PHP 5.6: locating the cause and “Zend”_ mm_ “Heap corrupted” looks like a memory explosion. After a turn, it’s the problem of opcache. Try to disable it, modify the configuration in php.ini and restart PHP FPM
View PHP error log
[root@ip php-fpm]# grep zend error.log | tail -n 3
[01-Jun-2021 00:21:01] WARNING: [pool www8002] child 20812 said into stderr: "zend_mm_heap corrupted"
[01-Jun-2021 00:27:49] WARNING: [pool www8002] child 32582 said into stderr: "zend_mm_heap corrupted"
[01-Jun-2021 00:28:06] WARNING: [pool www8002] child 339 said into stderr: "zend_mm_heap corrupted"

cat php.ini | grep "opcache"
1. /etc/php.d/opcache.ini 改 "opcache.enable=0"
2. systemctl restart php-fpm
Key point: of course, you can’t turn off opcache directly. You will find that the cache memory is too high, so you can’t turn off opcache directly. Let’s start tuning opcache
; switch on
opcache.enable=1
; available memory, as appropriate, in megabytes
opcache.memory_consumption=256
Maximum number of files to cache, try to increase this value if the hit rate is less than 100%
opcache.max_accelerated_files=5000
opcache.max_accelerated_files=5000 ; Opcache will check the modification time of files within a certain period of time, here set the check time period, the default is 2, in seconds
opcache.revalidate_freq=240
The memory size of the interned string, also adjustable
opcache.interned_strings_buffer=8
whether to fast shutdown, the speed of reclaiming memory will be increased when PHP Request Shutdown is turned on
opcache.fast_shutdown=1
Do not save file/function comments
opcache.save_comments=0
Reference Links:
1.https://stackoverflow.com/questions/2247977/what-does-zend-mm-heap-corrupted-mean
2.https://stackoverflow.com/questions/50769286/zend-mm-heap-corrupted-with-standard-php-5-6-locating-the-cause
[Solved] Import org.apache.hadoop.hbase.hbaseconfiguration package cannot be imported
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>2.1.0-cdh6.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.7.1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>2.7.1</version>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
</dependency>
After importing hbaseconfiguration, we found that we need to configure the remote warehouse. Add the
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
After the problem is solved
Anaconda prompt running environment.yml [How to Solve]
Download the project from GitHub, then open Anaconda Prompt, cd all the way to the directory where environment.yml is located, and
conda env create -f environment.yml
Next reported error.
WARNING: A space was detected in your requested environment path
‘D:\Program Files\miniconda3\envs\nerf’
Spaces in paths can sometimes be problematic.
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound: – imagemagick
environment.yml script:
# To run: conda env create -f environment.yml
name: nerf
channels:
- conda-forge
dependencies:
- python=3.7
- pip
- cudatoolkit=10.0
- tensorflow-gpu==1.15
- numpy
- matplotlib
- imageio
- imageio-ffmpeg
- configargparse
- imagemagick
Modify the environment.yml script:
PIP: the following must be indented (Python)
# To run: conda env create -f environment.yml
name: nerf
channels:
- conda-forge
dependencies:
- python=3.7
- pip
- cudatoolkit=10.0
- numpy
- matplotlib
- imageio
- imageio-ffmpeg
- configargparse
- pip:
- imagemagick
- tensorflow-gpu==1.15
Report error again
If there are the following errors, most of them are syntax errors, check environment.yml carefully
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
> ruamel_yaml.parser.ParserError: while parsing a block collection
in "<unicode string>", line 6, column 5:
- python=3.7
^ (line: 6)
expected <block end>, but found '?'
in "<unicode string>", line 14, column 5:
-pip:
^ (line: 14)
Solve the problem

Maven error: Could not find artifact jdk.tools [How to Solve]
How to Solve Maven error: Could not find artifact jdk.tools
Solution:
export JAVA_HOME=/your/java/home/
Then execute the maven command