草庐IT

android - Clean Blank Android 应用程序无法构建 - 'failed to find Build Tools revision 23.0.0 rc1'

Android新手,尝试构建一个干净的“空白应用程序”android项目。我收到以下错误,这令人困惑,因为我使用SDK管理器安装了版本24,但不确定为什么要寻找版本23。尽管它没有给我任何类型的行号,但有什么建议吗?谢谢。Configurationondemandisanincubatingfeature.:app:preBuildUP-TO-DATE:app:preDebugBuildUP-TO-DATE:app:checkDebugManifest:app:preReleaseBuildUP-TO-DATE:app:prepareComAndroidSupportAppcompat

android - 构建 yasm/source/patched-yasm/util.h :78:23: error: libintl. h 时出错:没有这样的文件或目录

构建将近半小时后,出现以下错误。到目前为止,谷歌搜索没有任何帮助......Infileincludedfromexternal/chromium_org/third_party/yasm/source/patched-yasm/libyasm/phash.c:2:external/chromium_org/third_party/yasm/source/patched-yasm/util.h:78:23:error:libintl.h:Nosuchfileordirectorymake:***[out/host/darwin-x86/obj/STATIC_LIBRARIES/thir

android - 在 gradle 中使用目标 sdk 版本 23 时 ZBAR 条码扫描库不起作用

我在我的项目中使用zbar扫描仪库。更新到sdk23后,Marshmallow扫描仪无法正常工作。以下是gradle文件。如果我将targetSdkVersion设置为23以外的任何值,则扫描程序可以正常工作gradle文件如下:applyplugin:'com.android.application'android{compileSdkVersion15buildToolsVersion"23.0.1"defaultConfig{applicationId"net.sourceforge.zbar.android.CameraTest"minSdkVersion9targetSdkV

android - 更新到支持工具 23 后再次出现 java.lang.NoClassDefFoundError : android. support.v7.internal.view.menu.i

我实现了https://code.google.com/p/android/issues/detail?id=78377上列出的众多解决方案之一对于4.2.2手机的这个问题,但现在我已经更新到支持工具23,这个问题又回来了。如果您查看该问题报告,您会发现自更新以来有很多人遇到同样的问题。NoClassDefFoundError:android.support.v7.internal.view.menu.MenuBuilder上的解决方案也不起作用,因为它们来自https://code.google.com/p/android/issues/detail?id=78377这是我遇到的异常

java - Surface View with Camera 在 Android API 23 (android 6+) 上无法运行

我想在SurfaceView上使用相机制作背景,并且我在低于23的androidAPI上取得了成功。虽然我之前在API23上的应用程序中请求相机许可,但我的Nexus5和Android6上仍然出现以下错误:java.lang.NullPointerException:尝试在空对象引用上调用虚拟方法“voidandroid.hardware.Camera.setPreviewDisplay(android.view.SurfaceHolder)”在com.package.name.CameraPreview.surfaceCreated(CameraPreview.java:31)我的代

android - 如何使用android :usesCleartextTraffic below Marshmallow (API-23)

我正在尝试保护WebView免受明文流量的影响。如文档中所述。我必须将android:usesCleartextTraffic设置为false才能实现此目的。但这适用于API级别23及更高级别。我的最低sdk是22。如何确保应用程序不会崩溃或在运行低于API级别23的设备上产生任何问题?或者我如何以编程方式在Manifest.xml的application标记中设置该属性值? 最佳答案 如anarticle中的建议@Android开发者博客:Youdon’thavetosetminSdkVersionortargetSdkVersi

android - 包 org.apache.http 不存在 sdk 23

这个问题在这里已经有了答案:ApacheHTTPconnectionwithAndroid6.0(Marshmallow)(2个答案)关闭7年前。我升级到最新的sdk版本23。现在我的一些代码不再工作了。这是我之前获得json的类(class):publicclassSpots_tab1_json{staticStringresponse=null;publicfinalstaticintGET=1;publicfinalstaticintPOST=2;publicSpots_tab1_json(){}publicStringmakeServiceCall(Stringurl,intm

v23 之前的设备上的 Android TextView DrawableTint

有什么方法可以为TextView中使用的Drawable着色?DrawableTint仅适用于API级别23及更高级别。目前我正在使用垂直线性布局来实现我的要求。看起来,Androidstudio建议我使用CompoundDrawble和TextView来实现这一点。我能够实现它,但我找不到一种方法来Tint可绘制对象。 最佳答案 AndroidXappcompat库从版本1.1.0-alpha03开始​​支持在TextView中着色[ref].将依赖添加到appcompat库dependencies{implementation"

android - Gradle 找不到参数 [23.0.2] 的方法 buildToolsVersion(),但构建工具版本确实存在

当我尝试使用gradle构建我的Android应用程序时,我遇到了一个奇怪的错误。当我尝试运行gradlebuild时出现此错误:CouldnotfindmethodbuildToolsVersion()forarguments[23.0.2]onrootproject'latest'.但是,我检查了我的androidSDK文件夹,看看这个版本是否真的丢失了。换句话说,发出ls$ANDROID_HOME/build-tools/的结果是这样的:19.1.020.0.021.1.222.0.123.0.123.0.223.0.3如您所见,23.0.2存在。似乎是什么问题?这是我的根bui

android - 错误 :(23, 13) 无法解析 : com. google.android.gms :play-services:11. 2.0 "Install Repository and sync project"不起作用

我正在尝试在我的Android应用程序中获取位置并更新到服务器。这是我的Gradle代码,这里我包含了compile'com.google.android.gms:play-services:11.2.0'。这一行是fromthedocumentation:dependencies{compile'com.google.android.gms:play-services:11.2.0'compile'com.android.support:appcompat-v7:25.3.1'compile'com.android.support:design:25.3.1'compile'com.