简体   繁体   English

AVD无法运行应用程序

[英]AVD can't run applications

Im a newbie experiencing issues with the emulator..basically whenever i try to run my program in eclipse with a new AVD created.the app crashes/hangs and says "unfortunately app has stopped"...ive tried all usual tricks of cleaning and restarting as many of the threads here have mentioned, but to no success. 我是一个新手,遇到了模拟器问题。基本上,每当我尝试使用创建的新AVD在eclipse中运行程序时,应用程序就会崩溃/挂起并说“不幸的是,应用程序已停止” ...我尝试了所有常见的清洁技巧重新启动此处提到的许多线程,但均未成功。

below is a link to my logcat http://i59.tinypic.com/3342edd.png 以下是指向我的logcat的链接http://i59.tinypic.com/3342edd.png

this is a link to my Console http://i62.tinypic.com/vy1mj4.png 这是指向我的控制台的链接http://i62.tinypic.com/vy1mj4.png

This is my logcat here also 这也是我的logcat

02-22 22:51:52.460: D/AndroidRuntime(821): Shutting down VM
02-22 22:51:52.460: W/dalvikvm(821): threadid=1: thread exiting with uncaught exception (group=0xb3a6db90)
02-22 22:51:52.470: E/AndroidRuntime(821): FATAL EXCEPTION: main
02-22 22:51:52.470: E/AndroidRuntime(821): Process: com.simplytapp.example.singlecard, PID: 821
02-22 22:51:52.470: E/AndroidRuntime(821): java.lang.Error: Unresolved compilation problems: 
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.cardemu cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.cardemu cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.cardemu cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.cardemu cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.cardemu cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.oauth cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.virtualcard cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.virtualcard cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  The import com.simplytapp.virtualcard cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  Constants cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  Constants cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  Syntax error on token "U7Ls53wGtTCkQ5iHdRCJiHemTA1FP5wyi91Xc", delete this token
02-22 22:51:52.470: E/AndroidRuntime(821):  Constants cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  Syntax error on token "cfmOo4Lem8pZWAYRhKBtKmSNwk9MuyzYtOT6X", delete this token
02-22 22:51:52.470: E/AndroidRuntime(821):  Constants cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  st_oauth_callback_YOUR_APP_NAME cannot be resolved to a variable
02-22 22:51:52.470: E/AndroidRuntime(821):  Constants cannot be resolved
02-22 22:51:52.470: E/AndroidRuntime(821):  x cannot be resolved to a variable
02-22 22:51:52.470: E/AndroidRuntime(821):  oauthflow cannot be resolved to a variable
02-22 22:51:52.470: E/AndroidRuntime(821):  CardDetails cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method onCreate(Bundle) of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method setContentView(int) is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  The method findViewById(int) is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  CardDetails cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getIntent() is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getIntent() is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  The method loadCards() is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getCardError(IOException, String) of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  VirtualCard cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  ApprovalData cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method cardsLoaded(ArrayList<CardDetails>, boolean) of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  CardDetails cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  List<CardDetails> cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  CardDetails cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The constructor AlertDialog.Builder(SingleCardActivity) is undefined
02-22 22:51:52.470: E/AndroidRuntime(821):  The method startActivity(Intent) is undefined for the type new DialogInterface.OnClickListener(){}
02-22 22:51:52.470: E/AndroidRuntime(821):  Card cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  Message cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getHandler() is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  The method cardsRemoved() of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getBaseContext() is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  Pin cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method setPin(String) in the type SingleCardActivity is not applicable for the arguments (Pin)
02-22 22:51:52.470: E/AndroidRuntime(821):  Pin cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The constructor AlertDialog.Builder(SingleCardActivity) is undefined
02-22 22:51:52.470: E/AndroidRuntime(821):  The method from(Context) in the type LayoutInflater is not applicable for the arguments (SingleCardActivity)
02-22 22:51:52.470: E/AndroidRuntime(821):  The method setUsePin(boolean) is undefined for the type new DialogInterface.OnClickListener(){}
02-22 22:51:52.470: E/AndroidRuntime(821):  The method setPin(String) in the type SingleCardActivity is not applicable for the arguments (Pin)
02-22 22:51:52.470: E/AndroidRuntime(821):  Pin cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  PinInterface cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getPinInterfaceSetting() of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  PinInterface cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  ManagePin cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  ManagePin cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method onCreateOptionsMenu(Menu) of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  The method getMenuInflater() is undefined for the type SingleCardActivity
02-22 22:51:52.470: E/AndroidRuntime(821):  The method onOptionsItemSelected(MenuItem) of type SingleCardActivity must override or implement a supertype method
02-22 22:51:52.470: E/AndroidRuntime(821):  CardEmu cannot be resolved to a type
02-22 22:51:52.470: E/AndroidRuntime(821):  The method onStart() of type SingleCardActivity must o
02-22 22:56:52.995: I/Process(821): Sending signal. PID: 821 SIG: 9

i think you are new in android. 我认为您是Android新手。 try to read error log. 尝试读取错误日志。 oncreate must be like this. oncreate必须是这样的。

public class SingleActivityCard extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        TextView text = new TextView(this);
        text.setText("Hello World, Android - mkyong.com");
        setContentView(text);
    }
}

Check oncreate method of SingleCardActivity and make sure first line of these method must be super.onCreate(savedInstanceState); 检查SingleCardActivity的oncreate方法,并确保这些方法的第一行必须是super.onCreate(savedInstanceState);

and another one also specify @override above your oncreate method 另外一个还在oncreate方法上方指定@override

2 )in console you also facing problem error accepting Connection so you should resetadb from DDMS and restart your eclipse if you again facing same problem then just re create new AVD 2)在控制台中,您在接受连接时也遇到问题错误,因此,如果您再次遇到相同的问题,则应从DDMS中重置并重新启动Eclipse,然后重新创建新的AVD

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM