java开发想要达到15k需要掌握哪些技术?
发布网友
发布时间:2022-04-21 15:29
我来回答
共1个回答
热心网友
时间:2023-11-14 20:51
Gradle:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':TestAndroid:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not execute build using Gradle installation 'C:\gradle-1.6'.
首先进入命令行
进入项目根目录(grale文件所在目录)
输入命令
gradlew compileDebug --stacktrace
查看错误位置:
错误如下
=================================================================
C:\Users\Administrator\AndroidStudioProjects\TestAndroid\TestAndroid\src\main\ja
va\com\example\testandroid\MainActivity.java:125: 警告:编码 GBK 的不可映射字符
//淇濆瓨褰揿墠璁$畻缁撴灉锛屼笅娆℃墦寮?仮澶?
SharedPreferences settings = getSharedPreferences(PROFILE_
NAME,Activity.MODE_PRIVATE);
^
C:\Users\Administrator\AndroidStudioProjects\TestAndroid\TestAndroid\src\main\ja
va\com\example\testandroid\MainActivity.java:125: 警告:编码 GBK 的不可映射字符
//淇濆瓨褰揿墠璁$畻缁撴灉锛屼笅娆℃墦寮?仮澶?
SharedPreferences settings = getSharedPreferences(PROFILE_
NAME,Activity.MODE_PRIVATE);
^
C:\Users\Administrator\AndroidStudioProjects\TestAndroid\TestAndroid\src\main\ja
va\com\example\testandroid\MainActivity.java:126: 找不到符号
符号: 变量 settings
SharedPreferences.Editor editor = settings.edit();
^
1 错误
:TestAndroid:compileDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':TestAndroid:compileDebug'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':TestAnd
roid:compileDebug'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecuteActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.ex
ecute(ExecuteActionsTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExec
uter.execute(PostExecutionAnalysisTaskExecuter.java:35)
at org.gradle.api.internal.changedetection.state.CacheLockReleasingTaskE
xecuter$1.run(CacheLockReleasingTaskExecuter.java:35)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(Def
aultCacheAccess.java:179)