我刚刚将项目更新为使用react-native版本0.60.2。但是,当我尝试在Android设备上运行应用程序时,启动屏幕后它将崩溃。我收到以下错误日志:
E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.tjspeed, PID: 3909
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:949)
at java.lang.Thread.run(Thread.java:760)
Run Code Online (Sandbox Code Playgroud)
这里的建议很少:https : //github.com/facebook/react-native/issues/25601,但不幸的是,这些建议都不对我有用。请提出解决方法。
我正在使用Linux的蓝牙低功耗调制解调器.我正在使用命令行选项,即hcitool
.我能够使用命令查找设备:$ hcitool scan
它对我来说很好,我也可以使用以下方式广播我的设备:
sudo hciconfig hci0 leadv
Run Code Online (Sandbox Code Playgroud)
它也工作正常.但我想将调制解调器设备的服务和特性添加到其他设备中.我试过了,sdptool add
但它不适合我.有没有人知道如何使用ubuntu中的命令行工具将服务和特性添加到外设?
编辑:我的调制解调器正在广播,但无法探索其他BLE设备的服务和特性.现在我可以使用设置设备的名称hcio name command
编辑:现在我可以通过同时运行sudo hcidump
命令来呈现服务和特性.但我无法追踪我从哪里获得这些服务和特征.一个明确的观察是那些服务是从机器渲染的.
我的iphone应用程序应该根据用户的经度和经度来解析地址.reverseGeocodeLocation工作正常,但结果是英文的.
有没有办法将结果本地化为其他语言?
无法在苹果或其他任何地方找到有关它的任何信息.
我使用的代码是:
CLGeocoder *geocoder = [[[CLGeocoder alloc] init] autorelease];
CLLocation *location = [[[CLLocation alloc]
initWithLatitude:coord.latitude longitude:coord.longitude] autorelease];
[geocoder reverseGeocodeLocation:location completionHandler:^(NSArray *placemarks, NSError *error) {
NSLog(@"reverseGeocodeLocation:completionHandler: Completion Handler called!");
if (error){
NSLog(@"Geocode failed with error: %@", error);
[self displayError:error];
return;
}
if(placemarks && placemarks.count > 0)
{
//do something
CLPlacemark *topResult = [placemarks objectAtIndex:0];
NSString *addressTxt = [NSString stringWithFormat:@"%@ %@,%@ %@",
[topResult subThoroughfare],[topResult thoroughfare],
[topResult locality], [topResult administrativeArea]];
}
}
Run Code Online (Sandbox Code Playgroud) 我正在iOS设备上加载图片.我希望我的图像水平居中,垂直居中,所有屏幕和方向.我已经尝试过使用table和td,它是水平对齐中心但没有垂直对齐中间.这是我试过的html:
<table width=100% height=100%>
<tr>
<td style="text-align: center; vertical-align: middle;">
<img src="" />
</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
CSS:
html, body
{
height: 100%;
}
Run Code Online (Sandbox Code Playgroud) 我想在android中创建airplay,我的android设备将作为airplay服务器(接收器)工作,iPhone设备将作为接收器.我在我的应用程序中使用了jmdns,它是java中用于播放的开源库.它对音频工作正常.但是当我来到视频和图像时,即使发现了设备,我仍然有很多困难.这是我创建和注册服务的代码:
ServiceInfo info = ServiceInfo.create(identifier + "@" + name + "._raop._tcp.local", identifier + "@" + name, port, "tp=UDP sm=false sv=false ek=1 et=0,1 cn=0,1 ch=2 ss=16 sr=44100 pw=false vn=3 txtvers=1");
dns = JmmDNS.Factory.getInstance();
((JmmDNSImpl)dns).inetAddressAdded(new NetworkTopologyEventImpl(JmDNS.create(InetAddress.getByName("localhost")), InetAddress.getByName("localhost")));
try {
Thread.sleep(1000); // If this isn't done the Announcement sometimes doesn't go out on the local interface
} catch (InterruptedException e) {
e.printStackTrace(System.err);
}
dns.registerService(info);
Run Code Online (Sandbox Code Playgroud)
当我将第一行中的._raop更改为._airplay时,就会发现iPad中的图像和音频设备.当我选择播放视频的设备时,它会显示消息" 此视频正在播放android(服务器名称) ".但在服务器端,我没有得到任何数据包来处理.我学习Jmdns很多.但我没有得到如何使用jmdns在airplay中实现视频和图像.有任何想法吗 ?
我正在使用phonegap开发iOS应用程序.我想将设备上存在的图像,歌曲,视频等本地文件上传到服务器.为此,我用于<input type="file">
浏览文件层次结构.它在浏览器上工作正常,但当我在iPad上运行时,选择文件按钮被禁用.我已经搜索了很多这个问题,但无法找到合适的解决方案.上面的iOS标签支持吗?如果没有,那么在iOS中浏览和上传文件的解决方案是什么?
我正在使用核心蓝牙框架.我正在尝试使用此框架创建外围设备.我的外围设备使用以下方
manager=[[CBPeripheralManager alloc]initWithDelegate:self queue:nil];
[manager startAdvertising:dictionary];
Run Code Online (Sandbox Code Playgroud)
这里我传给广告的字典是:
NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys:
@"name", CBAdvertisementDataLocalNameKey,@"some other data",CBAdvertisementDataManufacturerDataKey,nil];
Run Code Online (Sandbox Code Playgroud)
当我运行应用程序时,我收到警告:CoreBluetooth中不允许使用广告密钥"Manufacturer Data"
而且我没有得到我CBAdvertisementDataManufacturerDataKey
在中心侧使用密钥发送的"其他数据" .我得到了中心的名字.那么如何将一些其他数据与广告数据一起发送?
在Objective-c中,当我们按照约定将一个类的对象用于另一个类时,我们应该在.h文件中转发声明类,即@class classname;
.并且应该在.m文件中导入头文件,即#import "header.h"
.但是如果我们在.h中导入头文件,那么我们不必再在.m文件中导入它.那么这个大会背后的原因是什么?哪种方式有效?
我正在使用自动布局.面对有趣的问题.幸运的是,它暂时克服了它,但需要知道解决它的最佳方法.
问题: 如上图所示,我有几个按钮.两者都需要放置在距离UIView中心等距离的位置(粗体垂直线是视图的中心).此外,我必须以这样的方式应用约束,即按钮之间的距离将自动调整.例如,距离应为设备宽度的25%.如果我的设备宽度为320,则按钮之间的距离为80像素,依此类推.
解决方案(我试过):
对于上述问题,我尝试了解决方案.如图所示,我在UIView中添加了虚拟视图,虚拟视图的宽度等于两个按钮之间的间距.然后我将约束应用于虚拟视图.如 :1. Horizontal centre of the UIView 2.Width equals to the UIView width with 0.25 as a multiplier
问题: 以上解决方案对我来说非常合适.但是如果将来如果我的视图会有太多复杂的元素,那么添加虚拟视图可能不是一个好主意.那么,有没有其他干净的方法来做到这一点?
ios ×4
iphone ×4
android ×3
objective-c ×3
airplay ×1
autolayout ×1
bluez ×1
build-time ×1
clgeocoder ×1
cordova ×1
css ×1
html ×1
java ×1
javascript ×1
jmdns ×1
linux ×1
react-native ×1
ubuntu ×1
xcode ×1