写于:2015-08-29	最近一次更新:2017-19-25

Trouble:

/res/values/styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. /res/values-v11/styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'. /res/values-v14/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.

Oneway:

牵扯到不同版本的 Android 的 API 兼容问题 需要安装 Android Support Library

Trouble:

Downloading Android Support Library, revision 23 Download interrupted: URL not found

Oneway:

当在Android SDK Manager中设置了代理后出现 URL not found 可以尝试选中或者取消 Force https://... sources to be fetched using http://... 后再试一次

Trouble:

'Building workspace' has encountered a problem. Errors occurred during the build. Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ResourceManagerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.PreCompilerBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PreCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Error instantiating builder 'com.android.ide.eclipse.adt.ApkBuilder'. Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). Plug-in com.android.ide.eclipse.adt was unable to load class com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder. An error occurred while automatically activating bundle com.android.ide.eclipse.adt (839). The chosen operation is not currently available.

Oneway:

有两种方法:一,Eclipse 菜单 project->Build Automatically 上的对勾去掉后 重启 Eclipse ,然后再勾上即可 二,Eclipse 菜单 file->Switch Workspace->other 确定,然后等Eclipse重启即可

Trouble:

Uploading MyMap6.0.apk onto device 'emulator-5554' Failed to install MyMap6.0.apk on device 'emulator-5554': timeout Launch canceled! Installation error: INSTALL_FAILED_NO_MATCHING_ABIS Please check logcat output for more details. Launch canceled!

Oneway:

如果你使用的是模拟器, 要注意你使用的模拟器是 x86_64,x86,arm64 还是 arm 的 工程目录 libs 下要有对应的 x86_64,x86,arm64,arm 的库文件 比如 libs 下只有 armeabi 对应的库文件,而你的模拟器镜像是 x86_64 就会报上面的错误,你应该使用 ARM EABI 的镜像创建模拟器

Intent:

把 OptionsMenu 从竖排改成横排

Oneway:

不管你使用的是哪个版本的 android api 只需要改动 AndroidManifest.xml 文件就行了 把 application 的样式属性 android:theme 改成这样 android:theme="@android:style/Theme" 就可以了 如果只是针对特定 activity 的话, 就把特定 activity 的样式属性 android:theme 改成这样 android:theme="@android:style/Theme"就可以了 (不需要再去调整 android:targetSdkVersion 了)

Trouble:

《1》Android API文档在哪? 《2》打开本地 Android API docs 文档时很卡很慢, 半天才打开,怎么回事?

Oneway:

《1》在 SDK Manager 对应的 Android 版本(API)下勾选 Documentation for Android SDK 并安装,安装完成后 在 sdk 工具所在目录下会出现 docs 文件夹, API 参考文档就在 docs 里 《2》联网时 Android API 文档打开很卡很慢 把网络断开不联网时 Android API 文档打开就很快 因为 API 文档的 html 页面要从 google 加载文件 而 google 在国内被屏蔽了,所以迟迟不能加载,导致整个 html 页面打开非常缓慢(即 Android API 文档打开缓慢) 把 html 页面中的 www.google.com ,fonts.googleapis.com 等等 删掉就好了,删除命令如下 find SDK/docs/ -type f -name '*.html' 2>/dev/null |\ xargs -I {} sed -e '/www.google.com/d' \ -e '/fonts.googleapis.com/d' \ -e '/apis.google.com/d' {} -i

Trouble:

Eclipse 中 LogCat 不显示 Log 信息,Eclipse 中的 LogCat 不提示信息 LogCat 的Log信息显示不完整,只显示 V D I W E 这样的单个字母, 导出为文本时,文本中是有Log信息的,试过很多办法都没用

Oneway:

最后,采用的方法是在命令行执行 adb logcat -c && adb logcat -s 'AndroidRuntime:D' 的方式来调试 android 应用程序 (可以使用 adb logcat --help 查看更多用法)

Intent:

在电脑Terminal中通过adb命令把apk文件传到手机上并安装apk文件

Oneway:

方法一:adb push /home/sman/Desktop/MyMap0.8.apk /data/local/tmp/ adb shell pm install -r /data/local/tmp/MyMap0.8.apk adb shell rm /data/local/tmp/MyMap0.8.apk 第一条命令把apk文件传到手机的/data/local/tmp/目录下 第二条命令表示安装apk软件到手机上 第三条命令表示安装完成后,删除apk安装源文件 方法二:adb install /home/sman/Desktop/MyMap0.8.apk

Intent:

实时查看android机当前运行的activity是哪个

Oneway:

adb shell dumpsys activity | grep mFocusedActivity 或者 adb shell logcat | grep ActivityManager