编译问题:

1、Ubantu系统,Android Studio编译,出现错误。

android {    compileSdkVersion 22    buildToolsVersion "23.0.2"    defaultConfig {        minSdkVersion 8        targetSdkVersion 21    }    buildTypes {        release {            minifyEnabled false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'        }    }}

提示错误信息:

com.android.ide.common.process.ProcessException: Failed to execute aapt 

解决方法:安装32位C++编译库

$ sudo apt-get install lib32stdc++6 lib32z1

 

2、Android Studio gradle3.3.2以下,google()仓库不识别?

将其替换为:

maven { url 'https://maven.google.com/'}

3、手机指令集查看

$ adb shell getprop ro.product.cpu.abi

通过adb 命令查看手机指令集文件

4、更新项目或者git拉去代码时。提示使用git报错:Failed to connect to 127.0.0.1 port 8888: 拒绝连接。

这是代理设置问题。

首先去掉设置中的代理项

Setting--》System Setting--》HTTP Proxy,设置No Proxy

第二步,关掉代理软件,防止拦截http或者https请求

第三步,检查系统设置

查看代理:

$ env|grep -i proxy

https_proxy=127.0.0.1:8888http_proxy=127.0.0.1:8888socks_proxy=ftp_proxy=

关闭代理设置

export http_proxy=''

export https_proxy=''

 

第二章 ADB相关错误

2.1 ADB命令安装APK的时候出现问题

zhouronghuadeiMac:etc zhouronghua$ adb install -r /Users/zhouronghua/DEV/projects/accmobile/app/build/outputs/apk/zsxtzk/debug/app-zsxtzk-debug.apk error: more than one device/emulatorerror: more than one device/emulatorPerforming Streamed Install

因为有多个设备或者模拟器,安装的时候,有的设备安装出问题导致。

zhouronghuadeiMac:etc zhouronghua$ adb devicesList of devices attachedCLB7N19212002834deviceTA00405N7Tdevice

通过adb devices查询设备。

 

更多相关文章

  1. Android消息提示之Toast
  2. Android硬件设备检测
  3. 【实用工具】adb检测android设备
  4. android 使用linux命令截屏
  5. android读取usb设备数据
  6. android执行Linux命令
  7. 【android-tips】android程序执行adb shell命令(实例源码)
  8. 提示:Not targeting the latest versions of Android; compatibil
  9. Android 情景模式提示音默认修改

随机推荐

  1. android电子书App、自定义图表、仿腾讯漫
  2. 在Android中创建和使用数据库
  3. Android开发之webview和 js 互调
  4. Android(安卓)如何自己定义控件的样式 Sh
  5. android之sqliteDatabase,sqliteOpenHelp
  6. android studio 使用adb命令传递文件到an
  7. Android核心分析 之十-------Android(安
  8. Android(安卓)调试:java 跨工程调试 andro
  9. android orm映射框架 ormlite (类似于hib
  10. Android多进程总结一:生成多进程(android