无法编译任何TS + node.js项目,包括样本http://typescript.codeplex.com/sourcecontrol/latest#samples/imageboard/README.txt中列出的项目
始终收到以下错误:
错误TS5037:除非提供了"--module"标志,否则无法编译外部模块.
编译器版本:0.9.1.0
例如,该项目只包含单个文件app.ts:
///<reference path="./node_definitions/node.d.ts" /
import http = require("http")
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(1337, 'localhost');
console.log('Server running at http://localhost:1337/');
Run Code Online (Sandbox Code Playgroud)
我试图设置此示例:https: //code.google.com/p/gcm/source/browse/#git%2Fgcm-client 启动并运行.
根据指南,已成功创建GoogleAPI项目:http://developer.android.com/google/gcm/gs.html
但是,我有以下问题:在某些设备上,无论如何我都会获得SERVICE_NOT_AVAILABLE.
W/System.err:java.io.IOException:SERVICE_NOT_AVAILABLE W/System.err:at com.google.android.gms.gcm.GoogleCloudMessaging.register(Unknown Source)
一些统计:
它是相同的代码,相同的apk文件,各种谷歌帐户.我试图切换回GCMRegistrar方法,他们实际上工作.所以问题是:是否有新的GCM方法?如何让它们在其他设备上运行,而不仅仅是"纯粹的"谷歌Android设备?
更新:事实上,我在这里找到了解决方案
android exception google-cloud-messaging service-not-available