草庐IT

unique_name

全部标签

android - 在Eclipse中添加库v7 AppCompat时如何解决错误 "No resource found that matches the given name"?

我有一个API级别10的项目目标,我想实现新的ActionBar支持库。按照SupportLibrarySetup中的所有说明进行操作后,将库添加到我的项目时,我遇到了很多这样的错误消息:android-support-v7-appcompat\res\values-v14\styles_base.xml:24:错误:检索项目父项时出错:找不到与给定名称“android:Widget.Holo..”匹配的资源...好的,我知道这个问题有很多答案,但是,在尝试了所有更明显的方法之后,我仍然无法解决错误。我一直在寻找并找到了原因,这不是很明显,至少对于像我这样的新手来说是这样。我的目的是提

android - 检索项目 : No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored' 的父项时出错

今天,我遇到了这篇文章中提到的错误:Errorretrievingparentforitem:Noresourcefoundthatmatchesthegivenname'android:TextAppearance.Material.Widget.Button.Borderless.Colored'有趣的是(也是不同之处)——我们的应用程序已经投入生产5个月,到目前为止我们已经制作了数百个版本和APK。我们一周没有更改任何一行代码(也没有更改任何库版本)并且构建突然停止工作并出现这个提到的错误。Executionfailedfortask':react-native-fbsdk:pr

安卓 Intent : Start activity using class name from another app that has the same sharedUserId

我所有的应用程序都具有相同的sharedUserId。我想使用我当前应用程序的类启动另一个应用程序的类。我想使用intentextras但我不想使用intentURL。我也希望不必更改我的目标Activity的应用程序的AndroidManifest。 最佳答案 这很容易,因为您已经设置了sharedUserId。Intentres=newIntent();StringmPackage="com.your.package";StringmClass=".actYouAreLaunching";res.setComponent(new

android - 无法打开 avd_name.avd/cache.img

当我运行模拟器时,出现以下错误:CannotlaunchAVDinemulator.Output:Haxisenabledqemu-system-x86_64.exe:-driveif=none,index=1,id=cache,file={path_to_SDK}\SDK.android\avd{AVD_name}.avd/cache.img:couldnotopendiskimage{path_to_SDK}\SDK.android\avd{AVD_name}.avd/cache.img:Couldnotopen'{path_to_SDK}\SDK.android\avd{AVD_

android - 错误 org.json.JSONException : No value for PROJECT_NAME This is my json

我收到错误org.json.JSONException:NovalueforPROJECT_NAMEThisismyjson{"PROJECTS":[{"PROJECT_NUMBER":"2062","PROJECT_NAME":"OPW51183"},{"PROJECT_NUMBER":"404","PROJECT_NAME":"404"},{"PROJECT_NUMBER":"2125","PROJECT_NAME":"OPW50016"},{"PROJECT_NUMBER":""},{"PROJECT_NUMBER":"2130","PROJECT_NAME":"OPW51151

android - 使用 retrofit2 和 OkHttp3 时出现此错误。无法解析主机 "<host-name>": No address associated with hostname

我正在使用改造2和OkHttp3从服务器请求数据。我刚刚添加了一个离线缓存代码,但它没有按预期工作。我收到错误“无法解析主机“”:没有与主机名关联的地址。”当它试图从缓存中获取检索数据时(没有互联网连接时)会发生这种情况。下面是一段代码。publicstaticInterceptorprovideCacheInterceptor(){returnnewInterceptor(){@OverridepublicResponseintercept(Chainchain)throwsIOException{Responseresponse=chain.proceed(chain.reques

android - Xamarin : No resource found that matches the given names (AppCompat)

我在Azure上部署了一个虚拟机。我已经安装了VisualStudio2015、Xamarin和其他移动开发工具。我在本地计算机上进行了相同的设置,以通过VisualStudio在我的设备上测试我的应用唯一的区别是AndroidSDK的安装。在我的本地机器上,我没有图像系统。我在我的虚拟机上开发了一个应用程序。我在编译期间没有错误。我使用Android.Support.Design、Android.Support.V4、Android.Support.V7.AppCompat、Android.Support.V7.RecyclerView(NuGet的最新版本)及其MvvmCross实

c++ - 我应该在我的类中的 std::vector 成员变量中使用 std::unique_ptr<T> 吗?

想象一个classC有一个成员变量m_MyList类型std::vector我想在其中存储MyClass类型的对象.C有两个函数可以在m_MyList中添加或删除对象.m_MyListC的消费者也应该可以访问因为他们需要阅读MyClass的合集对象。集合的外部读者将无法更改集合,因此MyClass对象仅由C拥有.现在我的问题是:在C++11风格中,vector中存储的最佳T是多少?可能性似乎是:std::vectorstd::vectorstd::vector>,使用std:move推unique_ptr进入vector 最佳答案

c++ - 如何填充unique_ptr数组?

是否可以使用std:fill来填充unique_ptr数组?目的是让不同的指针指向使用相同参数初始化的不同对象。例如:std::unique_ptrar[3];std::fill(ar.begin(),ar.end(),make_unique_for_each_element_somehow(1)); 最佳答案 不,但这就是std::generate是为了。std::generate不是被赋予一个在整个目标范围内复制的单个值,而是被赋予一个“生成器”函数,该函数根据需要创建每个值。所以,大概是这样的:std::unique_ptra

c++ - 为什么 std::unique_ptr operator* 抛出而 operator-> 不抛出?

在C++标准草案(N3485)中,它声明如下:20.7.1.2.4unique_ptr观察者[unique.ptr.single.observers]typenameadd_lvalue_reference::typeoperator*()const;1Requires:get()!=nullptr.2Returns:*get().pointeroperator->()constnoexcept;3Requires:get()!=nullptr.4Returns:get().5Note:usetypicallyrequiresthatTbeacompletetype.你可以看到oper