error

标签: error

cannot synthesize weak property because the current deployment target does not support weak references

在用 pod 依赖 dsBridge 项目后报错如下: Error:(72, 13) cannot synthesize weak property because the current deployment target does not support weak references 猜测原因是dsBridge没有指定运行最低版本,导致不支持 weak 属性。 https://github.com/wendux/DSBridge-IOS/blob/master/dsBridge.podspec 解决方案: 在 Podfile 下面添加如下代码: post_install do |installer| installer.pods_project.targets.each do |target|

阅读全文...

android error和解决方法合集

错误1:Binary XML file line #24: Error inflating class android.support.design.widget.NavigationView inflate Caused by: java.lang.reflect.InvocationTargetException 在使用NavigationView过程中一直崩溃,系统报错如上。在网上找了很多答案没有生效,终于在stackOverflow里找到了答案,原因是com.android.support:appcompat和com.android.support:design版本不一样导致的,版本号改成一样的就好了。 原文链接:http://stackoverflow.com/questions/30709419/error-inflating-class-android-support-design-widget-navigationview 错误2:UnsupportedOperationException  client.interceptors().add(interceptor) 解决方法: OkHttpClient okClient = new

阅读全文...

Web Console: Uncaught TypeError: Object [object Object] has no method

出现问题的原因是因为Android4.2及以上版本对于js的支持方式有改变导致 解决办法在这里 http://blog.csdn.net/zgjxwl/article/details/9627685 其实就是加一句注释 webview.getSetting().setJavaScriptEnable(true); class JsObject { @JavascriptInterface public String toString() { return "injectedObject"; } } webView.addJavascriptInterface(new JsObject(), "injectedObject");

阅读全文...

错误Multiple substitutions specified in non-positional format

把Android示例项目SimpleWikitionary的代码导入Eclipse时在string.xml中出现了这个问题: Type error: Multiple substitutions specified in non-positional format; did you mean to add the formatted=”false” attribute? 对应的代码是: "%s/%s (Linux; Android)" 上网查了一番,找到了解决办法,参考http://be-evil.org/android-multiple-substitutions-specified-in-non-positional-format.html。 解决办法是: 1 使用%%或\%,如: "%%s/%%s (Linux; Android)" 2 添加 formatted=”false” 属性 "%s/%s (Linux; Android)" 这个错误和ADT的版本有关,

阅读全文...

Connection to https://dl-ssl.google.com refused

Failed to fetch URL https://dl-ssl.google.com/android/repository/addons_list-1.xml, reason: Connection to https://dl-ssl.google.com refused Parse XML Fetched Add-ons List successfully Fetching URL: https://dl-ssl.google.com/android/repository/repository-10.xml Download interrupted: Read timed out 因为https协议进行了加密处理,大陆因为无法审查,直接封死,而http协议则进行过滤处理,如果不访问乱七八糟的东西,更新个SDK还是没问题的。 在SDK Manager下Tools->

阅读全文...

[转]解决 recv() failed (104: Connection reset by peer) while reading response header from upstream

在linux上查找www.conf find / | grep www.conf 再编辑www.conf里面的requestterminatetimeout = 0 ———————————————————————————- Nginx出现502 Bad Gateway 错误, 查了Nginx的错误日志为: 2014/08/02 16:14:31 [error] 17029#0: *17941 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 210.61.12.2, server: blog.lixiphp.com, request: “POST /api/

阅读全文...

android.content.res.Resources$NotFoundException: String resource ID #0x1

android.content.res.Resources$NotFoundException: String resource ID #0x1 at android.content.res.Resources.getText(Resources.java) at android.content.res.MiuiResources.getText(MiuiResources.java:133) at android.widget.TextView.setText(TextView.java) 1问题很简单解决,setText不能设置整数   解决方案的话:setText(num +””) 或者setText(String.valueOf(num));

阅读全文...

不显示ActionBar并报错NullPointException

在项目中遇到不显示ActionBar并报错NullPointException的情况,尝试了网上的很多方法,比如设置activity theme为Theme.NoTitleBar,设置minSdkVersion最后都失败了,依然报错NullPointException 最后发现是少了values-v11和values-v14文件夹.里面有一个styles.xml. 因为我创建项目时用的是target api10,所有没有这两个文件夹,补上就好了! 如果还是不行可以试试这个:http://www.myexception.cn/mobile/1676671.html

阅读全文...