我正在使用Windows 7进行开发.我安装了node.js 0.12.4,npm是2.10.1.
现在我执行
npm intall express --save
Run Code Online (Sandbox Code Playgroud)
但面临以下错误消息:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nnode_modules\\npm\\bin\\npm-cli.js" "install" "express" "--save"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code EAI_AGAIN
npm ERR! errno EAI_AGAIN
npm ERR! syscall getaddrinfo
npm ERR! getaddrinfo EAI_AGAIN
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! d:\meandev\chat\npm-debug.log
Run Code Online (Sandbox Code Playgroud)
有人可以帮忙吗?
function checkConnection() {
var networkState = navigator.connection.type;
var states = {};
states[Connection.UNKNOWN] = 'Unknown connection';
states[Connection.ETHERNET] = 'Ethernet connection';
states[Connection.WIFI] = 'WiFi connection';
states[Connection.CELL_2G] = 'Cell 2G connection';
states[Connection.CELL_3G] = 'Cell 3G connection';
states[Connection.CELL_4G] = 'Cell 4G connection';
states[Connection.NONE] = 'No network connection';
alert(Connection.WIFI);
alert(navigator.connection.type);
alert('Connection type: ' + states[networkState]);
}
Run Code Online (Sandbox Code Playgroud) 我正在使用Android Studio开发我的Android应用程序.在我的应用程序中,我需要一些db sqlite操作.我开始使用Sugar ORM.根据最新版本的糖1.3.jar不需要任何上下文初始化.
所以我开始这样编码
Iterator<Order> orders = Order.findAll(Order.class);
<meta-data android:name="DATABASE" android:value="dbname.db" />
<meta-data android:name="VERSION" android:value="2" />
<meta-data android:name="QUERY_LOG" android:value="true" />
<meta-data android:name="DOMAIN_PACKAGE_NAME" android:value="value" />
Run Code Online (Sandbox Code Playgroud)
在menifast文件中.
但我遇到的问题是
java.lang.RuntimeException:无法启动活动ComponentInfo {package.HomeActivity}:java.lang.NullPointerException:尝试在空对象参考上调用虚方法'com.orm.Database com.orm.SugarApp.getDatabase()'
你觉得我需要做别的事还是错过了什么?请帮忙.
谢谢