草庐IT

show_compatibility

全部标签

android - 如何修复无法解析 : support-compat

为什么不帮我?在我的应用程序中,我想使用ButterKnife库并添加此库依赖项。但是当添加这个库并点击Sync按钮时。未同步项目并显示错误。gradle.Build(项目):buildscript{repositories{google()jcenter()mavenCentral()}dependencies{classpath'com.android.tools.build:gradle:3.1.3'classpath'com.jakewharton:butterknife-gradle-plugin:8.8.1'}}allprojects{repositories{google

android - 透明 9patch 图像 : line showing through

我得到了一个透明的9patch图像,其中的9patch线显示了波谷。这是输出:显然我不希望水平线可见。这就是我创建9patch的方式:这是应用程序中使用的最终图像:据我所知,9patch是正确的。我需要更改什么才能使水平线消失? 最佳答案 不需要的线条来自九面重叠的固定(非拉伸(stretch))部分。发生这种情况是因为您以小于固定部分高度总和的像素高度绘制它。正如@kcoppock上面所说然后奇怪地缩回,左手边缘在垂直可拉伸(stretch)的地方应该是纯黑色。 关于android-透

android - 我的 Android 应用程序显示为 "this item is not compatible with your device"

我刚刚在市场上发布了我的应用程序更新。然后,我尝试在运行2.2.2的NexusOne上将其转换市场。我在手机市场上找不到它。我去了网络市场,找到了它,但安装被禁用,提示“此项目与您的设备不兼容”。下面是我的list——我看不到任何会阻止它在我的NexusOne上工作的东西。让我觉得它也没有向其他人展示。任何人都可以安装(或查看是否能够看到)“OccupiedforKids”或“OccupiedforKids(演示)”。您可以很容易地试用演示版,因为它是免费的。两者都表现出问题。** 最佳答案 另一个可能的原因:我在发布一个应用程序时

安卓 : show keyboard in edittext

我在Android应用程序编码中遇到了一个非常简单的问题。我有一个EditText对象列表,每行一个。当用户长按EditText时,我需要显示键盘。当用户长按时,我调用这个方法:privatevoidsetNameAsEditable(ViewrowView,booleansetToEditable){EditTexttextView=(EditText)rowView.findViewById(R.id.edittext_name);textView.setFocusableInTouchMode(setToEditable);textView.setFocusable(setToE

android - 无法解析 com.android.support :support-compat:26. 1.0

这让我发疯了好几天。我无法在Android模拟器上运行我的应用程序:当我运行react-nativerun-android时,出现以下错误:>Task:react-native-maps:compileDebugRenderscriptFAILEDFAILURE:Buildfailedwithanexception.*Whatwentwrong:Couldnotresolveallfilesforconfiguration':react-native-maps:debugCompileClasspath'.>Couldnotresolvecom.android.support:supp

android - 广播接收器和未决 Intent : Show a toast

以下是必须触发BroadCastReceiver的警报代码:IntentintentWithData=newIntent(context,TokenActivity.class);intentWithData.putExtra(Constants.ID,id);intentWithData.putExtra(Constants.POSITION,finalI);PendingIntentpendingIntent=PendingIntent.getBroadcast(context,007,intentWithData,0);AlarmManageralarmManager=(Alar

android - Admob 错误 : Not enough space to show ad. 需要 320x50 dp,但只有 309x0 dp

我正在尝试将智能横幅广告添加到我的fragment布局中,但我不断得到的是“没有足够的空间来展示广告。需要320x50dp,但只有309x0dp”。这是我的fragment布局。这是Activity布局//Containerfortoolbar//Containerforfragment我实在想不通为什么高度是0dp。你能帮帮我吗? 最佳答案 根据Admob文档/指南广告View必须是设备的全宽。由于您为布局提供了padding,因此它失败了,因为它无法填充布局的整个宽度。您只需删除RelativeLayout中的填充即可解决此问题

安卓通知 : compatibility with APIs

我正在尝试在我的应用中显示通知以及其中的进度条。我的应用规范是我的目标API15,最小SDK设置为8。我使用以下代码显示通知:NotificationManagermNotificationManager=(NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);NotificationCompat.BuildermBuilder=newNotificationCompat.Builder(this);mBuilder.setContentTitle("MyApplication").setContentTe

android - 服务中的 START_STICKY_COMPATIBILITY

什么是Android服务方面的START_STICKY_COMPATIBILITY标志。文档提到了它compatibilityversionofSTART_STICKYthatdoesnotguaranteethatonStartCommand(Intent,int,int)willbecalledagainafterbeingkilled.什么是兼容版本?如果它是START_STICKY的一个版本,那么为什么不能保证对onStartCommand()的调用?为什么有人会在它不能保证时使用它>onStartCommand()是否在服务终止后被调用? 最佳答案

android - 当设置应用程序 :elevation ="0dp" then hamburgermenu not showing to toolbar

您好,我想删除工具栏下方的阴影,因为我使用了elevation属性,目前我的代码是输出是:-这里我不想要下面的阴影所以我设置了app:elevation="0dp"到AppBarLayout,然后它删除了阴影但HamburgerMenu消失了。新的输出如下:-谁能告诉我如何在不隐藏/消失HamburgerMenu的情况下移除阴影。 最佳答案 试试这个:...然后在你的Activity中;findViewById(R.id.appBar).bringToFront(); 关于android