我正在尝试在Ubuntu 13.04上安装Phonegap,我已经安装了包含所有可用软件包的Android SDK,但运行以下命令:
cordova platform add android
Run Code Online (Sandbox Code Playgroud)
失败并出现意外错误:
[Error: An error occured during creation of android sub-project. An unexpected error occurred: "$ANDROID_BIN" create project --target $TARGET --path "$PROJECT_PATH" --package $PACKAGE --activity $ACTIVITY &>/dev/null exited with 1
Deleting project...
Run Code Online (Sandbox Code Playgroud)
我已经为Android设置了PATH变量(工具/平台工具),并安装了java和ant.
为什么会这样?如何获得更详细的错误消息?
我正在使用GLFW,所以用OpenGL设置一个Window.由于我刚刚开始学习OpenGL及其周围的所有内容,这可能听起来像一个愚蠢的问题,但为什么GLFW的示例程序在Window未被主动显示时使用接近100%的CPU(最小化或被另一个窗口隐藏) )?
这是GLFW的例子,我在Mac OS上使用Xcode运行它:
#include <GLFW/glfw3.h>
int main(void)
{
GLFWwindow* window;
if (!glfwInit()) /* Initialize the library */
return -1;
/* Create a windowed mode window and its OpenGL context */
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
if (!window)
{
glfwTerminate();
return -1;
}
/* Make the window's context current */
glfwMakeContextCurrent(window);
/* Loop until the user closes the window */
while (!glfwWindowShouldClose(window))
{
/* Render here */
/* Swap front and back buffers */
glfwSwapBuffers(window);
/* Poll …Run Code Online (Sandbox Code Playgroud)