草庐IT

NATIVE_URI

全部标签

android - React Native - 在包 'appComponentFactory' 中找不到属性 'android' 的资源标识符

我遇到了一个问题,每当我尝试使用react-nativerun-android进行构建时,构建都会失败并出现以下错误。\?\E:\projects\deets-mobile-cp\android\app\build\intermediates\manifests\full\release\AndroidManifest.xml:88:AAPT:Noresourceidentifierfoundforattribute'appComponentFactory'inpackage'android'FAILURE:Buildfailedwithanexception.Whatwentwron

android - 使用 native C++ 对象时如何使 JNI 方法调用不是静态的?

我有以下JNI包装器C++代码:#include"map_container.h"extern"C"{JNIEXPORTvoidJNICALLJava_com_map_Map_openMapNative(JNIEnv*env,jobjectthiz,jstringpath);};staticmap_container*map=NULL;voidJava_com_map_Map_openMapNative(JNIEnv*env,jobjectthiz,jstringpath){constchar*filename_utf8=env->GetStringUTFChars(path,fals

无法使用FileProvider发送正确的URI

我正在使用此路径创建文件Filefile=newFile(getExternalFilesDir(null)+"/package.apk");然后我试图使用此代码发送它Intentintent=newIntent(Intent.ACTION_VIEW);intent.setDataAndType(FileProvider.getUriForFile(UpdateActivity.this,getPackageName()+".provider",file),"application/vnd.android.package-archive");Log.d("uri",FileProvider.g

android - 如何将 URL 转换为 URI?

我正在尝试使用此代码缓存这些图像...但我总是在这里收到语法错误?UriimageUri=newUri(aURL);这是我使用的代码。URLaURL=newURL(myRemoteImages[position]);UriimageUri=newUri(aURL);if(newFile(newFile(myContext.getCacheDir(),"thumbnails"),""+imageUri.hashCode()).exists()){StringcachFile=""+imageUri.hashCode();FileInputStreamfis;try{fis=newFile

android - UriMatcher 不会匹配 uri

我正在尝试为搜索对话框提供自定义建议。我正在使用urimatcher来匹配uri。但它不起作用。我总是得到异常“java.lang.IllegalArgumentException:UnknownUri:content://com.simple.search.SuggestionProvider/search_suggest_query/?limit=50”。请向我解释一下。我该怎么做才能解决这个问题?privatestaticfinalUriMatchersURIMatcher=makeUriMatcher();publicCursorquery(Uriuri,String[]pro

android - Android 中 RawContacts.CONTENT_URI 和 ContactsContract.Contacts.CONTENT_URI 的区别

Android中RawContacts.CONTENT_URI和ContactsContract.Contacts.CONTENT_URI有什么区别?我正在尝试编写一个服务来监听native地址簿中的变化。那么,使用哪一个?谢谢尼兹 最佳答案 联系人(如用户所感知的那样)是RawContact的集合RawContact是与特定帐户或协议(protocol)相关联的一些详细信息ContactsContract.Contacts.CONTENT_URI通常是正确使用的,因为它从整组匹配的RawContacts中带回正确的显示名称,并且可

android - 如何使用 Android-NDK 直接从 native 代码访问资源(如声音、图像等)?

我想知道如何从native代码(即C++文件)直接访问图像、声音文件等资源。实际上,我正在寻找任何可以帮助我使用asset_manager_jni.h方法的示例。寻求建议。提前致谢。问候,阿图尔·普拉卡什·辛格 最佳答案 那么,您可以访问stdio.h。因此,如果它位于已知位置(比如在SD卡上),您可以将其用作路径。网上有很多关于如何使用stdio(fopen、fclose等)的热门教程。问题是您bundle到apk本身的资源(在res/raw或assets中)在安装后留在apk中。更糟糕的是,默认情况下,它们将被压缩,这使得读取变

android - 在打开图像时解析来自 Android 中不同来源的 URI

我的Android应用程序打开图像并对其进行操作。我的Activity请求打开图像,如下所示:Intentintent=newIntent();intent.setType("image/*");intent.setAction(Intent.ACTION_GET_CONTENT);startActivityForResult(Intent.createChooser(intent,"Completeactionusing"),PICK_FROM_FILE);执行此操作时,它会启动一个包含三到四个选项的对话框,例如ES文件资源管理器:文件、图库等。我希望使用BitmapFactory.

android - 全文未显示在 react native 的警报对话框中

我试图在用户点击按钮时显示警告对话框。我正在尝试如下onPressButton(){Alert.alert(strings.tour_end);}strings.tour_end是“太棒了!希望您喜欢我们的产品之旅!享受这个应用程序。我们为您准备了一些激动人心的优惠!”这就是它在alert中的显示方式。这是react-native中的错误吗? 最佳答案 您已根据警报API将完整消息作为警报标题传递。alert(title,message?,buttons?,options?,type?)喜欢下面alert("Great..!",st

android - 如何为 React Native 安装 rnpm 包

我正在尝试为我的react-native包安装这个包。https://www.npmjs.com/package/react-native-dialogs我看到我需要执行这个命令来安装它。rnpminstall--savereact-native-dialogs我的机器上安装了node和npm。我不确定rnpm是什么。我收到一个错误。我试图浏览一些链接,但没有成功。'rnpm'isnotrecognizedasaninternalorexternalcommand,operableprogramorbatchfile. 最佳答案 r