草庐IT

resource_description_id

全部标签

java - Android ID资源可以转发吗?

id资源可以引用文件后面的元素吗?这里我有两个字段,一个是用户名,另一个是密码。我为密码字段创建了一个新的ID资源(使用@+id/语法),但是用户名字段在android:nextFocusDown字段中找不到它。我从布局xml中省略了其他字段,因为它们不相关。在这种情况下,我需要如何声明ID?使用gradle构建时,我收到如下所示的错误:Error:(41,32)Noresourcefoundthatmatchesthegivenname(at'nextFocusDown'withvalue'@id/login_password').我没有收到android:nextFocusUp="

android - Android 应用邀请 : Message failed to send with missing container client ID

我正在尝试集成新的GooglePlay服务API“AppInvitesforAndroid”。我按照指南执行了所有步骤并生成了gogole-services.json文件。但是当我通过短信或电子邮件向选定的friend发送邀请时,我每次都会遇到同样的错误。Messagefailedtosend在ADB日志上得到这个:E/AppInviteAgent﹕generic::13:generic::INTERNAL:java.lang.IllegalArgumentException:RequestmustassociateavalidcontainerclientapplicationID.

android - 找不到 id ... fragment PlaceholderFragment 的 View

我有一个简单的应用程序(基于theAndroidFirstAppsample);它唯一做的就是显示一个EditText和一个按钮。该按钮创建另一个Activity,并显示EditText消息……简单!...但是在模拟器上运行时,当我点击按钮时应用程序关闭并且出现此错误:"Noviewfoundforid0x7f05003c(com.example.testapp:id/container)forfragmentPlaceholderFragment{4173ead8#0id=0x7f05003c}"MainActivity.javapublicclassMainActivityexte

Android - android.content.res.Resources$NotFoundException : Resource ID #0x0

我正在尝试编写一个可以在手机上浏览文件的Android应用程序。当我在模拟器上运行该应用程序时,出现以下错误:02-1822:14:17.839:E/AndroidRuntime(896):FATALEXCEPTION:main02-1822:14:17.839:E/AndroidRuntime(896):android.content.res.Resources$NotFoundException:ResourceID#0x002-1822:14:17.839:E/AndroidRuntime(896):atandroid.content.res.Resources.getValue

android - 如何用值 "No resource found that matches the given name (at ' 修复 '@integer/google_play_services_version' 值')”

当我在VisualStudio2015中构建我的Android应用程序项目时出现以下错误。Noresourcefoundthatmatchesthegivenname(at'value'withvalue'@integer/google_play_services_version')这些行位于:obj\Debug\android\manifest\AndroidManifest.xml在AndroidManifest文件中有3个完整的内容。我已经从SDKManager下载了googleplay服务。我应该在我的解决方案中引用任何内容吗?我已经对Xamarin.GooglePlaySer

android - 如何修复包 "No resource identifier found for attribute ‘style’ 中的 ‘android’“?

我创建了一个样式并将其应用于按钮,但是当我尝试构建时出现异常:在包“android”中找不到属性“style”的资源标识符这是按钮的代码:有什么问题吗? 最佳答案 问题是style标签不需要android包命名空间,尽管许多IDE会建议这样做是正确的。所以不是:android:style="@style/SecondaryButton"使用:style="@style/SecondaryButton" 关于android-如何修复包"Noresourceidentifierfoundfo

Android 在运行时通过 id 查找资源

如果我收到错误“android.content.res.Resources$NotFoundException:ResourceID#0x7f050007type#0x12isnotvalid”,如果我知道它的ID,我能找到这个资源是什么吗?ListViewlist=(ListView)findViewById(R.id.messages_list_view);list.setAdapter(newArrayAdapter(context,R.layout.messages_list,headers));消息列表.xml 最佳答案

android - 集成 Facebook-android-sdk-3.0 抛出 Resources$NotFoundException

我正在尝试将Facebook集成到我的应用程序中。但是当我点击fbphoto时,它会抛出错误android.content.res.Resources$NotFoundException。我知道它会抛出错误,因为在运行时没有建立适当的资源。发现错误在facebook.authorize(this,newString[]{"email","publish_stream"},newDialogListener(){}处抛出。但根本原因仍然是失踪。fbphoto.setOnClickListener(newView.OnClickListener(){@Overridepublicvoido

android - FCM Android - 空消息 ID

我已经实现了FirebaseMessagingService的子类并且我在FirebaseMessagingService.onMessageReceived(RemoteMessage)中成功接收了下游消息。我的问题是RemoteMessage.getMessageId()总是返回null。据我了解,消息ID是强制性的,应该由FCM服务器自动生成。事实上,调用https://fcm.googleapis.com/fcm/send返回消息ID,我无法在应用程序端访问它。有什么我想念的吗?这是我的FCM消息服务类:publicclassFcmMessagingServiceextends

Android:如何使 findViewById(R.id.xxx) 在继承/扩展自 View 类的类中工作?

我遇到以下问题:我想将自定义View(custom_view.xml和关联的CustomView.java类)添加到我的主要Activity。因此,我执行以下操作:1)在我的主要Activity中(链接到main.xml):CustomViewcustomView=newCustomView(this);mainView.addView(customView);2)在我的CustomView.java类中(我想链接到custom_view.xml):publicclassCustomViewextendsView{publicCustomView(Contextcontext){sup