Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/218.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android应用程序中的错误(无法解析main或main不是字段/wglGetExtensionsStringARB在android Emulator中运行map应用程序时出错)_Android_Eclipse_Android Emulator_Android Manifest_Android Sdk Tools - Fatal编程技术网

android应用程序中的错误(无法解析main或main不是字段/wglGetExtensionsStringARB在android Emulator中运行map应用程序时出错)

android应用程序中的错误(无法解析main或main不是字段/wglGetExtensionsStringARB在android Emulator中运行map应用程序时出错),android,eclipse,android-emulator,android-manifest,android-sdk-tools,Android,Eclipse,Android Emulator,Android Manifest,Android Sdk Tools,1.Iam导入现有项目或创建新项目时显示错误: R不能解析为变量, 导入R后,它似乎无法访问xml布局文件 尝试解决此问题 http://stackoverflow.com/questions/5143369/main-cannot-be-resolved-or-is-not-a-field 2.同时在另一台机器上 在运行我的应用程序时,将创建.apk文件,但无法在模拟器上反映输出 [2012-10-04 15:24:29 - HelloAndroid] Andro

1.Iam导入现有项目或创建新项目时显示错误: R不能解析为变量, 导入R后,它似乎无法访问xml布局文件 尝试解决此问题

        http://stackoverflow.com/questions/5143369/main-cannot-be-resolved-or-is-not-a-field
2.同时在另一台机器上 在运行我的应用程序时,将创建.apk文件,但无法在模拟器上反映输出

      [2012-10-04 15:24:29 - HelloAndroid] Android Launch!
[2012-10-04 15:24:29 - HelloAndroid] adb is running normally.
[2012-10-04 15:24:29 - HelloAndroid] No Launcher activity found!
[2012-10-04 15:24:29 - HelloAndroid] The launch will only sync the application package on the device!
[2012-10-04 15:24:29 - HelloAndroid] Performing sync
[2012-10-04 15:24:29 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'android2.1'
[2012-10-04 15:24:29 - HelloAndroid] Launching a new emulator with Virtual Device 'android2.1'
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] Failed to create Context 0x3005
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] could not get wglGetExtensionsStringARB
[2012-10-04 15:24:37 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2012-10-04 15:24:37 - Emulator] emulator: warning: opening audio input failed
[2012-10-04 15:24:37 - Emulator]
主屏幕->

package com.example.new_xyz_fertilizer;

import android.app.Activity;
import android.os.Bundle;


public class Home extends Activity {

    public void onCreate(Bundle HomeBundle){
        super.onCreate(HomeBundle);
        setContentView(R.layout.home);

    }


}
并在xml布局文件->home.xml中

?xml version="1.0" encoding="utf-8"?>

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal"
    android:background="@drawable/BG01"
    >


    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:gravity="bottom"
        >
        <ImageView
            android:id="@+id/home"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/home_s"/>
        <ImageView
            android:id="@+id/nc"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/nc_s"
            />
        <ImageView
            android:id="@+id/locncon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/locncon_s"
           />
        <ImageView
            android:id="@+id/ft"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/ft_s"
            />

          <ImageView
            android:id="@+id/csf"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="@drawable/csf_s"
            />
    </LinearLayout>



</LinearLayout>       


Thanks in advance

从其他项目导入R.java可能会产生问题

尝试以下操作:右键单击项目->Android工具->修复项目属性

然后检查问题是否已解决


还有一件事,据我所知,GPS将主要在物理设备上工作,而不是在模拟器/模拟器上。

从其他项目导入R.java可能会产生问题

尝试以下操作:右键单击项目->Android工具->修复项目属性

然后检查问题是否已解决


还有一件事,据我所知,GPS将主要在物理设备上工作,而不是在模拟器/模拟器上。

看起来您尝试启动的模拟器可能有问题。您是否尝试过直接从AVD管理器启动仿真器?是的,而不是运行应用程序。。首先,我从AVD启动了emulator,然后通过选择启动的emulator运行应用程序。仍然收到相同的错误。看起来您尝试启动的emulator可能有问题。您是否尝试过直接从AVD管理器启动仿真器?是的,而不是运行应用程序。。首先,我从AVD启动了emulator,然后通过选择启动的emulator运行应用程序。仍然收到相同的错误。尝试右键单击project->Android Tools->Fix project Properties.,但仍然面临相同的问题。此外,我在我的应用程序中没有使用GPS尝试:project->Build Automatically而不是project->Clean,而不是Project->Android工具->修复项目属性。另外,别忘了选择Project->Build Automatically。它仍然显示一个错误。是否有可能发生这种情况,因为eclipse或android的某些库可能丢失??我不这么认为,但您可以尝试从Help->Check for Update from eclipse更新包,然后导入您的项目。还有一件事是,如果您要导入的项目是在最新的eclipse版本中创建的,而您是在较旧的eclipse版本中导入的,那么可能会产生问题。那么您要导入的项目呢?它是在哪个版本创建的?尝试右键单击项目->Android工具->修复项目属性,但仍然面临相同的问题。此外,我没有在我的应用程序中使用GPS尝试:项目->比项目->清理自动生成,比项目->Android工具->修复项目属性。另外,别忘了选择Project->Build Automatically。它仍然显示一个错误。是否有可能发生这种情况,因为eclipse或android的某些库可能丢失??我不这么认为,但您可以尝试从Help->Check for Update from eclipse更新包,然后导入您的项目。还有一件事是,如果您要导入的项目是在最新的eclipse版本中创建的,而您是在较旧的eclipse版本中导入的,那么可能会产生问题。那么您要导入的项目呢?它是在哪个版本中创建的?