android studio怎么打开模拟器的根目录
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android studio怎么打开模拟器的根目录相关的知识,希望对你有一定的参考价值。
参考技术A 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'.
首先进入命令行
进入项目根目录(gradule文件所在目录)
输入命令
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)本回答被提问者和网友采纳 参考技术B 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'.
首先进入命令行
进入项目根目录(gradule文件所在目录)
输入命令
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)
Android studio2.3.3 模拟器打开后,能打开,但新建的app项目没有,怎么办?
参考技术A 运行时会自动启动APP的,如果没有那么检查是否编译没有通过,或者在运行时AndroidStudio没有连接到你启动的虚拟机。追问请问,怎么检查?
我的app在手机里能打开
以上是关于android studio怎么打开模拟器的根目录的主要内容,如果未能解决你的问题,请参考以下文章
Android-Android studio中关于模拟器的/data目录不能显示的解决办法
Android studio2.3.3 模拟器打开后,能打开,但新建的app项目没有,怎么办?