草庐IT

application_id

全部标签

android - 在 Android 中命名 XML 元素的 id 的最佳做法是什么?

我不确定以前是否有人被这个问题困扰过,但这对我来说是一个很大的痛苦。你如何给android中的xml元素一个id?现在,我将ID设置为[Activity/fragment名称][元素类型][特定名称]。例如,如果我有一个EditText来保存在LoginActivity中使用的电子邮件,我将提供ID“LoginEditTextEmail”。我面临的问题是,使用这种方法,id通常会变得很长。如何设置id?最佳做法是什么? 最佳答案 描述性名称是理想的(与任何编程语言中任何变量的名称相同)。我认为你已经有了一个很好的系统我会提供这些潜在

c# - Visual Studio 2015 - Xamarin - Android - 当我尝试在 .cs 文件中执行任何操作时获取 "resource.id does not contain a definition for xxx"

AddingAdditionalActivity.csandLayoutaxmlUsingVisualStudio2015.我对Xamarin和Android开发还很陌生,但已经使用VB和现在的C#开发了几年。我在Android4.2上有一个简单的应用程序,随着我的进行,它变得越来越复杂。很简单,我想向项目添加额外的GpsAction.cs和相应的Gps.axml布局。似乎不可能找到正确的组合语法来实现这一目标。我有一个带有main.axml的mainActivity。在VS2015中,添加新内容非常简单,但我不断收到“resource.id不包含定义”,非常感谢您对此的帮助names

APP_ABI 的 Android NDK : what should I set in Application. mk?

我想知道应该将哪些架构放入我的Android游戏的Application.mk文件中。我想支持所有可以在GooglePlay和其他类型的Android商店上下载游戏的平台。我会说我应该设置:APP_ABI:=armeabix86(asmanyx86devicesarecomingsoonasfarasIknow)但不知是否应该设置:APP_ABI:=armeabiarmeabi-v7ax86或APP_ABI:=all请澄清。 最佳答案 您还可以指定mips,当您使用all时将包括在内。armeabi代码可以在armeabi-v7a设

android - 约束布局布局崩溃 : All Children of constraint layout should have ids to use constraint set

更新到com.android.support.constraint:constraint-layout:1.1.0之后约束布局崩溃说:Allchildrenofconstraintlayoutshouldhaveidstouseconstraintset我已经为所有View设置了id,即使它崩溃了。java.lang.RuntimeException:AllchildrenofConstraintLayoutmusthaveidstouseConstraintSetatandroid.support.constraint.ConstraintSet.clone(ConstraintSe

Plugin [id: ‘com.android.application‘, xxx] was not found in any of the following sources

在使用IDEA创建我的第一个Android项目时出现错误Plugin[id:'com.android.application',version:'7.3.0',apply:false]wasnotfoundinanyofthefollowingsources:*Try:>Runwith--infoor--debugoptiontogetmorelogoutput.>Runwith--scantogetfullinsights.*Exceptionis:org.gradle.api.plugins.UnknownPluginException:Plugin[id:'com.android.app

onresume - 安卓: "Application level"暂停和恢复

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭4年前。Improvethisquestion我一直在尝试获得类似于Activity的onPause和onResume的应用程序级暂停和恢复。我知道没有具有此功能的API。我试着关注这个帖子:http://curioustechizen.blogspot.com/2012/12/android-ap

安卓房间 : How to read from two tables at the same time - duplicate id column

我是AndroidRoom的新手。我想从一个表中读取,也想从一个相关的表中读取。这种关系很常见。一张表定义实例。另一个表定义类型。想象一个Animal表和一个AnimalType表。几乎每次需要读取Animal表时,也需要读取AnimalType表。例如,我们要显示动物名称(来自Animal表)和猴子图标(来自AnimalType表)。根据AndroidRoom文档中的示例,这是对其建模的数据类:publicclassAnimalWithType{@EmbeddedprivateAnimalanimal;@EmbeddedprivateAnimalTypetype;...DAO可以通过

android : Error com. parse.ParseException : at least one ID field (installationId, deviceToken) 必须在此操作中指定

我在我们的应用程序中使用推送通知解析,但在设备注册时出现一些问题,错误如下所示。还有一个问题,当我们向设备发送推送通知时,设备会收到多个通知。尽管我们也已将解析库升级到Parse1.4.1。请帮助我,在此先感谢。错误首次安装应用程序时显示:04-1414:00:40.004:E/LOG(26045):Socketevent:onConnect04-1414:00:41.874:E/ParseCommandCache(26045):Failedtoruncommand.04-1414:00:41.874:E/ParseCommandCache(26045):com.parse.Parse

android - 在不一致的位置观察到包 id 'build-tools;20.0.0'

./gradlew--parallel:app:assembleDebugTest当我在androidstudio终端中运行上面的命令时,出现了这个错误。错误并行执行是一项孵化功能。在不一致的位置“sdk/build-tools/android-4.4W”中观察到包ID“build-tools;20.0.0”(应为“sdk/build-tools/20.0.0”)Gradle文件应用插件:'com.android.application'android{compileSdkVersion22buildToolsVersion'23.0.2'packagingOptions{exclud

android - 如何通过ID在Android中打开名片

是否可以通过联系人ID打开android名片?它适用于电话号码。这是一个例子,如果我使用Intenti=newIntent();i.setAction(ContactsContract.Intents.SHOW_OR_CREATE_CONTACT);i.setData(Uri.fromParts("tel","123456",null));//但我想通过ID打开此联系人卡片,例如,如果联系人的电话号码发生变化。 最佳答案 使用ACTION_VIEW并使用联系人ID构建联系人URI,或者使用联系人查找URI(如果您已有)(首选)。In