使用compileSdkVersion 23,但是尝试支持9到9.
getNetworkInfo(int)在23中已弃用.建议改为使用getAllNetworks和getNetworkInfo(Network).然而,这两者都需要最少的API 21.
我们可以在支持包中使用哪个类可以帮助解决这个问题吗?
我知道之前提出了一个解决方案,但是我对9的最小api要求的挑战造成了问题.
networking android android-6.0-marshmallow android-connectivitymanager
我正在使用winston库:https://github.com/flatiron/winston 尝试使用以下命令将数据存储到mongodb数据库:https://github.com/indexzero/winston-mongodb
插入我使用的数据:
var MongoDB = require('winston-mongodb').MongoDB;
var logger = new (winston.Logger)({
transports: [
new (winston.transports.Console)(),
new (winston.transports.MongoDB)({ host: ip, db: 'caribcultivate', collection: 'log', level: 'info'})
], exceptionHandlers: [ new winston.transports.Console() ]
});
logger.log('info', "Running logs "+ d);
logger.info("Drive: "+ (new Date(d)).toDateString());
Run Code Online (Sandbox Code Playgroud)
但是当我尝试使用以下方法查询数据时:
winston.query(options, function (err, results) {
if (err) {console.log(err);}
console.log(results);
});
Run Code Online (Sandbox Code Playgroud)
我明白了:
{}
Run Code Online (Sandbox Code Playgroud)
它适用于控制台,我正在使用Mongoose库的应用程序的其他部分中的数据库.
我使用Node.js和内置的JSON对象来字符串化JSON对象.在对象是
{
weight : 1.0
}
Run Code Online (Sandbox Code Playgroud)
但是,当我对字符串进行字符串化并写入文件时,输出为weight:1.
node.js ×2
android ×1
android-connectivitymanager ×1
javascript ×1
json ×1
logging ×1
mongodb ×1
networking ×1
winston ×1