Android App-won';t在带有eclipse的模拟器或设备上运行

Android App-won';t在带有eclipse的模拟器或设备上运行,android,eclipse,android-emulator,buzztouch,Android,Eclipse,Android Emulator,Buzztouch,我是一个在Mac上工作的初学者开发人员。对此问题的任何帮助都将不胜感激。我的应用程序源代码是在Buzztouch中创建的。我已经将它导入Eclipse。我已经设置了SDK。我已成功运行Hello,World应用程序。我已多次尝试更改目标名称/API级别。我尝试过卸载和重新安装Eclipse和Android SDK管理器,并删除和重新安装了应用程序文件 我的目标只是测试我的应用程序并将其打包以提交到应用商店 当我尝试在emulator上启动应用程序时,我得到以下结果(出于隐私考虑,应用程序标题已替

我是一个在Mac上工作的初学者开发人员。对此问题的任何帮助都将不胜感激。我的应用程序源代码是在Buzztouch中创建的。我已经将它导入Eclipse。我已经设置了SDK。我已成功运行Hello,World应用程序。我已多次尝试更改目标名称/API级别。我尝试过卸载和重新安装Eclipse和Android SDK管理器,并删除和重新安装了应用程序文件

我的目标只是测试我的应用程序并将其打包以提交到应用商店

当我尝试在emulator上启动应用程序时,我得到以下结果(出于隐私考虑,应用程序标题已替换为APPNAME,标题本身格式正确):

在LOGCAT上

04-19 18:44:25.187: E/AndroidRuntime(563): FATAL EXCEPTION: main
04-19 18:44:25.187: E/AndroidRuntime(563): java.lang.RuntimeException: Unable to resume activity {com.APPNAME/com.APPNAME.BT_screen_splash}: java.lang.NumberFormatException: Invalid int: "2.5"
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2444)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2472)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1986)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.os.Looper.loop(Looper.java:137)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread.main(ActivityThread.java:4424)
04-19 18:44:25.187: E/AndroidRuntime(563):  at java.lang.reflect.Method.invokeNative(Native Method)
04-19 18:44:25.187: E/AndroidRuntime(563):  at java.lang.reflect.Method.invoke(Method.java:511)
04-19 18:44:25.187: E/AndroidRuntime(563):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-19 18:44:25.187: E/AndroidRuntime(563):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-19 18:44:25.187: E/AndroidRuntime(563):  at dalvik.system.NativeStart.main(Native Method)
04-19 18:44:25.187: E/AndroidRuntime(563): Caused by: java.lang.NumberFormatException: Invalid int: "2.5"
04-19 18:44:25.187: E/AndroidRuntime(563):  at java.lang.Integer.invalidInt(Integer.java:138)
04-19 18:44:25.187: E/AndroidRuntime(563):  at java.lang.Integer.parse(Integer.java:375)
04-19 18:44:25.187: E/AndroidRuntime(563):  at java.lang.Integer.parseInt(Integer.java:366)
04-19 18:44:25.187: E/AndroidRuntime(563):  at java.lang.Integer.parseInt(Integer.java:332)
04-19 18:44:25.187: E/AndroidRuntime(563):  at com.APPNAME.BT_screen_splash.onResume(BT_screen_splash.java:104)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1154)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.Activity.performResume(Activity.java:4539)
04-19 18:44:25.187: E/AndroidRuntime(563):  at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2434)
04-19 18:44:25.187: E/AndroidRuntime(563):  ... 12 more
控制台上的

[2012-04-19 18:51:57 - APP NAME] Android Launch!
[2012-04-19 18:51:57 - APP NAME] adb is running normally.
[2012-04-19 18:51:57 - APP NAME] Performing com.APPNAME.BT_activity_root activity launch
[2012-04-19 18:51:57 - APP NAME] Automatic Target Mode: launching new emulator with compatible AVD 'APPNAME'
[2012-04-19 18:51:57 - APP NAME] Launching a new emulator with Virtual Device 'APPNAME'
[2012-04-19 18:52:09 - Emulator] 2012-04-19 18:52:09.489 emulator-arm[3242:80b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
[2012-04-19 18:52:09 - Emulator] emulator: emulator window was out of view and was recentered
[2012-04-19 18:52:09 - Emulator] 
[2012-04-19 18:52:09 - APP NAME] New emulator found: emulator-5554
[2012-04-19 18:52:09 - APP NAME] Waiting for HOME ('android.process.acore') to be launched...
[2012-04-19 18:53:07 - APP NAME] HOME is up on device 'emulator-5554'
[2012-04-19 18:53:07 - APP NAME] Uploading APP NAME.apk onto device 'emulator-5554'
[2012-04-19 18:53:09 - APP NAME] Installing APP NAME.apk...
[2012-04-19 18:54:10 - APP NAME] Success!
[2012-04-19 18:54:10 - APP NAME] Starting activity com.APPNAME.BT_activity_root on device emulator-5554
[2012-04-19 18:54:12 - APP NAME] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.APPNAME/.BT_activity_root }
在模拟器上

弹出窗口显示“不幸,[应用程序名称]已停止。”

代码:BT\u screen\u splash.java

package com.APPNAME;

import org.json.JSONObject;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.widget.LinearLayout;


public class BT_screen_splash extends BT_activity_base{

    //properties...
    String transitionType = "";
    int startTransitionAfterSeconds = 0;
    int transitionDurationSeconds = 0;


    //onCreate
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.activityName = "BT_screen_splash";
        BT_debugger.showIt(activityName + ":onCreate"); 

        //set the content view...
        LinearLayout baseView = (LinearLayout)findViewById(R.id.baseView);

        //setup background colors...
        BT_viewUtilities.updateBackgroundColorsForScreen(this, this.screenData);

        //setup background images..
        if(backgroundImageWorkerThread == null){
            backgroundImageWorkerThread = new BackgroundImageWorkerThread();
            backgroundImageWorkerThread.start();
        }           

        //inflate this views layout file...
        //inflate this screens layout file..
        LayoutInflater vi = (LayoutInflater)thisActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View thisScreensView = vi.inflate(R.layout.screen_splash, null);


        //add the view to the base view...
        baseView.addView(thisScreensView);

        /*
         * *******************************************************************
         * Notes:
         * screen_splash.xml is an empty layout file. You can add whatever you
         * want to it. The image for the splash screen is setup with the
         * BT_viewUtilities.updateBackgroundColorsForScreen() method.
         * That method sets the background image (the splash image) in this 
         * screens parent class. BT_activity_base. See above, almost all 
         * BT screens extend BT_activity_base
         ********************************************************************
        */


    }

    //onResume...
    public void onResume(){
        super.onResume();

        //get values..
        this.transitionType = BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "transitionType", "");
        this.startTransitionAfterSeconds = Integer.parseInt(BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "startTransitionAfterSeconds", "0"));

        //setup transition if we don't have -1 
        if(startTransitionAfterSeconds > -1){
            delayHandler.removeCallbacks(mDelayTask);
            delayHandler.postDelayed(mDelayTask, ((startTransitionAfterSeconds + 1) * 1000));
        }


    }

    //handle touch event..
    @Override  
    public boolean onTouchEvent(MotionEvent event){  
        //BT_debugger.showIt("BT_screen_splash: touch event..");
        //ignore touch events if we have a startTransitionAfterSeconds value..
        if(startTransitionAfterSeconds < 1){
            if(event.getAction() == MotionEvent.ACTION_DOWN){
                animateSplashScreen();
            }
        }
        return false;
    }   

    /////////////////////////////////////////////////////////////////////
    //handles question delay updates after each answer
    Handler delayHandler = new Handler(){
        @Override public void handleMessage(Message msg){
            delayHandler.removeCallbacks(mDelayTask);
        }
    };      

    private Runnable mDelayTask = new Runnable() {
        public void run() {
            animateSplashScreen();
        }
    };  
    //end timer stuff
    /////////////////////////////////////////////////////////////////////


    //handles animation...
    public void animateSplashScreen(){
        BT_debugger.showIt("BT_screen_splash:animateSplashScreen");


        //finish this screen so it cannot be returned to...
        BT_screen_splash.this.finish();

        //the next screen...
        BT_item tmpLoadScreenObject = null;
        BT_item tmpMenuItemObject = null;
        tmpMenuItemObject = new BT_item();
        tmpMenuItemObject.setItemId("tempMenuItem");
        tmpMenuItemObject.setItemNickname("tempMenuItem");
        try{
            tmpMenuItemObject.setItemType("BT_menuItem");
            tmpMenuItemObject.setJsonObject(new JSONObject("{\"transitionType\":\"fade\"}"));
        }catch(Exception e){

        }       


        //next screen to load...either tabbed home or the first screen in the list...
        if(APPNAME_appDelegate.rootApp.getTabs().size() > 0){
            BT_debugger.showIt("Building tabbed interface...");

            //load BT_activity_root_tabs...
            tmpLoadScreenObject = new BT_item();
            tmpLoadScreenObject.setItemId("tmpRootTabs");
            tmpLoadScreenObject.setItemNickname("tmpRootTabs");
            try{
                tmpLoadScreenObject.setItemType("BT_activity_root_tabs");
                tmpLoadScreenObject.setJsonObject(new JSONObject("{}"));
            }catch(Exception e){

            }

        }else{

            //find the app's home screen...
            tmpLoadScreenObject = APPNAME_appDelegate.rootApp.getHomeScreen();

            //flag it as the home screen...
            tmpLoadScreenObject.setIsHomeScreen(true);

        }

        //load...
        if(tmpLoadScreenObject != null){

            //remember current screen...
            APPNAME_appDelegate.rootApp.setCurrentScreenData(tmpLoadScreenObject);

            //load screen object...
            BT_act_controller.loadScreenObject(this, this.screenData, tmpMenuItemObject, tmpLoadScreenObject);

        }


    }

}
package com.APPNAME;
导入org.json.JSONObject;
导入android.app.Activity;
导入android.content.Context;
导入android.os.Bundle;
导入android.os.Handler;
导入android.os.Message;
导入android.view.LayoutInflater;
导入android.view.MotionEvent;
导入android.view.view;
导入android.widget.LinearLayout;
公共类BT_屏幕\u启动扩展BT_活动\u基础{
//属性。。。
字符串transitionType=“”;
int startTransitionAfterSeconds=0;
int transitionDurationSeconds=0;
//一次创建
@凌驾
创建时的公共void(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
this.activityName=“BT\u screen\u splash”;
BT_debugger.showIt(activityName+“:onCreate”);
//设置内容视图。。。
LinearLayout baseView=(LinearLayout)findViewById(R.id.baseView);
//设置背景色。。。
BT_viewUtilities.updateBackgroundColorsForScreen(这个,这个.screenData);
//设置背景图像。。
if(backgroundImageWorkerThread==null){
backgroundImageWorkerThread=新的backgroundImageWorkerThread();
backgroundImageWorkerThread.start();
}           
//膨胀此视图布局文件。。。
//将此屏幕布局文件充气。。
LayoutInflater vi=(LayoutInflater)thisActivity.getSystemService(Context.LAYOUT\u充气机\u服务);
查看此屏幕视图=vi.充气(R.layout.screen\u splash,null);
//将视图添加到基础视图。。。
baseView.addView(此屏幕视图);
/*
* *******************************************************************
*注:
*screen_splash.xml是一个空布局文件。您可以添加任何内容
*想要它。启动屏幕的图像是用
*BT_viewUtilities.updateBackgroundColorsForScreen()方法。
*该方法在该视图中设置背景图像(飞溅图像)
*屏幕父类。BT_活动_基础。请参见上文,几乎所有
*BT屏幕扩展了BT_活动基础
********************************************************************
*/
}
//在简历上。。。
恢复时公开作废(){
super.onResume();
//获取值。。
this.transitionType=BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(),“transitionType”,和“”);
this.startTransitionAfterSeconds=Integer.parseInt(BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(),“startTransitionAfterSeconds”,“0”);
//如果没有-1,则设置转换
如果(开始转换后秒>-1){
delayHandler.removeCallbacks(mDelayTask);
delayHandler.postDelayed(mDelayTask,((startTransitionAfterSeconds+1)*1000));
}
}
//处理触摸事件。。
@凌驾
公共布尔onTouchEvent(MotionEvent事件){
//BT_debugger.showIt(“BT_screen_splash:touch event..”;
//如果我们有startTransitionAfterSeconds值,则忽略触摸事件。。
if(开始转换后秒<1){
if(event.getAction()==MotionEvent.ACTION\u向下){
动画屏幕();
}
}
返回false;
}   
/////////////////////////////////////////////////////////////////////
//在每次回答后处理问题延迟更新
Handler delayHandler=新处理程序(){
@覆盖公共无效handleMessage(消息消息消息){
delayHandler.removeCallbacks(mDelayTask);
}
};      
private Runnable mDelayTask=new Runnable(){
公开募捐{
动画屏幕();
}
};  
//结束计时器的东西
/////////////////////////////////////////////////////////////////////
//处理动画。。。
公共无效动画屏幕(){
BT_debugger.showIt(“BT_screen_splash:animateSplashScreen”);
//完成此屏幕,使其无法返回到。。。
BT_screen_splash.this.finish();
//下一个屏幕。。。
BT_项目tmpLoadScreenObject=null;
BT_item tmpMenuItemObject=null;
tmpMenuItemObject=新BT_项();
setItemId(“tempMenuItem”);
setItem昵称(“tempMenuItem”);
试一试{
setItemType(“BT_menuItem”);
setJsonObject(新的JSONObject(“{\“transitionType\”:“fade\”));
}捕获(例外e){
}       
//要加载的下一个屏幕…选项卡式主页或列表中的第一个屏幕。。。
if(APPNAME\u appDelegate.rootApp.getTabs().size()>0){
BT_debugger.showIt(“构建选项卡式界面…”);
//加载BT\u活动\u根\u选项卡。。。
tmpLoadScreenObject=新BT_项();
tmpLoadScreenObject.setItemId(“tmpRootTabs”);
tmpLoadScreenObject.setItem昵称(“tmpRootTabs”);
试一试{
tmpLoadS
this.startTransitionAfterSeconds = Integer.parseInt(BT_strings.getJsonPropertyValue(this.screenData.getJsonObject(), "startTransitionAfterSeconds", "0"));