草庐IT

android - 棉花糖权限不适用于低于 23 的 TargetVersion

我的项目是一个长期运行的项目。4年前,我将目标版本设置为10。我无法将目标版本更改为23,因为我使用的是httpImageCache并且UI也有问题。我的问题是,当Marshmallow发布时,我尝试将Marshmallow与targetVersion10集成,intreturnedPermission=ContextCompat.checkSelfPermission(MyActivity.this,Manifest.permission.WRITE_EXTERNAL_STORAGE);如果我从应用程序设置页面手动打开或关闭存储权限,此函数总是返回“0”。谁能帮帮我?

android - 如何使用带有 API 23 的 adb 在系统级别禁用 android 设备/模拟器的动画?

根据阅读,值window_animation_scale、transition_animation_scale和animator_duration_scale需要设置为0以下适用于API22但不适用于API23:adbshellsettingsputglobalwindow_animation_scale0.0即使是下面的命令也不适用于API23adbshellcontentupdate--uricontent://settings/system--bindvalue:s:0.0--where'name="window_animation_scale"'我们只想禁用动画以防止不稳定的视

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"