zoukankan      html  css  js  c++  java
  • Android Studio Debug

    miui8中开启开发者模式:

     

    小米4usb调试怎么打开?miui6进入开发者模式
    想要打开USB调试首先开启开发者模式。过去在MIUI V5版本时,小米手机开启开发者模式的方法是连续点击Anroid版本号。不过最新上市的小米4都搭载了MIUI6,很多网友都发现点击手机版本号开启开发者模式的方法行不通了。
    其实这是MIUI6的一个修改,在MIUI6里开启开发者模式不再是点击Android版本号,而是点击MIUI版本号,连续点击几下就可以开启开发者模式了。
    然后到退回到设置-->其它高级设置-->开发者选项,进去之后就可以打开小米4的USB调试了

    http://www.gezila.com/news/19307.html

    Android Studio中设置使用真机调试:


    Faq:
    注意:Android Studio 要求JDK1.7以上才可以安装。安装过程非常简单,这里就不详细介绍了。

      我遇到第一个问题就是:安装完成后第一次启动时候会首先显示Fetching Android SDK component information,等一会儿在Setup Wizard - Downloading Components界面下面开始下载Andorid SDK,在这里会等很长时间,最后提示Retry。Retry估计有N次,还行不行。

    问题原因:

      Retry了N次,不成功是由于下载地址被墙的缘故。被墙这事有时候真的让人很无语,还好有解决办法哈。

    解决办法:

      首先关闭安装向导,如果无法关闭可以在任务管理器中手工关掉进程,然后打开Android Studio安装目录的bin目录下面的idea.properties文件,添加一条禁用开始运行向导的配置项:disable.android.first.run=true.然后再启动程序就会打开项目向导界面,这个时候如果点击Start a new Android Studio project是没有反应的,并且在Configure下面的SDK Manager是灰色的,这是因为没有安装Android SDK的缘故。


    http://blog.csdn.net/yangzhenping/article/details/43304009
     

    UIExplorer安装到小米note时报错:
    解决办法:停用“MIUI优化”

    :Examples:UIExplorer:android:app:validateSigningDebug
    :Examples:UIExplorer:android:app:packageDebug UP-TO-DATE
    :Examples:UIExplorer:android:app:assembleDebug UP-TO-DATE
    :Examples:UIExplorer:android:app:installDebug
    Installing APK 'app-debug.apk' on 'MI NOTE LTE - 6.0.1' for app:debug
    Unable to install E:workspace-demo
    eact-nativeExamplesUIExplorerandroidappuildoutputsapkapp-debug.apk
    com.android.ddmlib.InstallException: Failed to establish session
            at com.android.ddmlib.SplitApkInstaller.install(SplitApkInstaller.java:64)
            at com.android.ddmlib.Device.installPackages(Device.java:904)
            at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:137)
            at com.android.build.gradle.internal.tasks.InstallVariantTask.install(InstallVariantTask.java:134)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:228)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:221)
            at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:210)
            at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:621)
            at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:604)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
            at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)
            at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:35)
            at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:66)
            at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
            at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
            at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
            at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
            at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
            at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
            at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
            at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
            at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
            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$4.run(DefaultGradleLauncher.java:153)
            at org.gradle.internal.Factories$1.create(Factories.java:22)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
            at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
            at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
            at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
            at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
            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:48)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
            at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
            at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
            at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
            at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
            at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
            at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
            at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
            at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
            at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
            at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
            at org.gradle.launcher.Main.doAction(Main.java:33)
            at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
            at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:497)
            at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
            at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
            at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    :Examples:UIExplorer:android:app:installDebug FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':Examples:UIExplorer:android:app:installDebug'.
    > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Failed to establish session
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    BUILD FAILED
    Total time: 11.01 secs
  • 相关阅读:
    CSRF攻击与防御
    nmap报错: Failed to open device ethxxx
    谷歌黑客语法(google hacking)让你的搜索更精准有效
    查看CPU相关信息
    使用fiddler抓取jmeter发送的请求
    20191129字符串对齐方法
    20191126拼接字符串
    robotframework 模拟滚动鼠标到底部
    SQL中的左连接与右连接,内连接有什么区别
    robotframework 获取坐标
  • 原文地址:https://www.cnblogs.com/softidea/p/4758893.html
Copyright © 2011-2022 走看看