zoukankan      html  css  js  c++  java
  • Android学习的一些小应用

    1、安装HAXM(KVM)加速android虚拟机运行速度

    这个是安装方法

    中文说明

    2、出现

    Error:Execution failed for task ':app:compileDebugAidl'.
    > aidl is missing

    错误,解决方法

    只需要把编译工具的版本改一下就可以了:

      1)选左侧的工程根目录app,按F12打开Project Structure;

      2)点击底部的app,把右侧Build Tool Version 从23.0.0 改为22.0.1即可~

    技术分享

    3、在ubuntu下查看cpu支持不支持64位系统

    cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

        8

    (结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)

    4、Android模拟器在64位系统上运行最好

    如果你的linux机子是32位的,那么运行android模拟器的时候会报错,如下:

    ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them you will have to do at least one of the following: - Use the ‘-force- 2bit‘ option when invoking ‘emulator‘. - Set ANDROID_EMULATOR_FORCE_32BIT to ‘true‘ in your environment. Either one will allow you to use the 32-bit binaries, but please be aware that these will disappear in a future Android SDK release. Consider moving to a 64-bit Linux system before that appens.

    Android模拟器在64位系统上运行最好,所以最好的解决办法是重新安装64位的linux系统,如果暂时重装系统比较麻烦的话,有以下两种方法来解决:

    1. 在你要运行的个工程右击->Run as -> Run configuration->Android application-> emulator , 滚动条拉到最后,找到commandline输入框,输入"-force-32bit",然后apply即可。

    2. 配置环境变量,加上ANDROID_EMULATOR_FORCE_32BIT=true

    5、“解析包时出现问题”解决方法

    在Android Studio中是在build.gradle中修改          minSdkVersion 的值为 11

    6、在Android Studio中自动添加import方法参照

    7、添加github中的项目方法参照方法

  • 相关阅读:
    C 语言的读取文件
    [Water]序号呼唤
    [Water]Hdu 1022 Train Problem I
    [Water]Hdu 2054 A == B ?
    Java竞赛可能会用到的东西
    [Huffman]Hdu 2527 Safe Or Unsafe
    [Prim]Poj 1258 Agri-Net
    Hdu 1257 最少拦截系统 (LIS、贪心)
    [Max Sum]hdu 1003
    Hdu 2566 统计硬币
  • 原文地址:https://www.cnblogs.com/chenbuer/p/4734076.html
Copyright © 2011-2022 走看看