启动错误视图,安装Android应用程序时出错

时间:2013-08-06 12:02:21

标签: android eclipse install launch

我遇到一些使用eclipse并运行我的应用程序的困难。 首先,当我尝试在设置菜单中运行已选择默认活动的代码时,它会打开alltravelsview而不是登录视图。如果我选择要启动的特定视图,则视图中的登录是唯一出现的视图。然后它正确启动。

其次,如果我尝试在我的手机上安装应用程序,它似乎安装正确,但当我点击按钮(启动器)时,我得到消息应用程序没有安装。我使用了eclipse / adt的导出功能,并使用私钥进行签名。

这里是一段代码片段,我排除了一些活动,这些活动只是声明,以缩短它。这段代码来自manifest.xml,我猜错了。在我的活动中,我夸大了相应的观点。

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.kit.teco.easyTravel.view"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="17" />


    <uses-feature android:name="android.hardware.camera" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application

        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/CustomTheme" 
        android:permission="android.permission.INJECT_EVENTS"
        >
        <activity
            android:name="de.kit.teco.easyTravel.view.LoginView"
            android:label="@string/app_name" >
           <!-- Four lines for login -->
           <!-- Start Login  -->
             <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="android.intent.category.DEFAULT"/>
            </intent-filter>
            <!-- End Login -->
        </activity>

        <activity
            android:name="de.kit.teco.easyTravel.view.MainMenuView"
            android:label="@string/title_activity_main_menu_view" >
        </activity>

        <activity
            android:name="de.kit.teco.easyTravel.view.AllTravelsView"
            android:label="@string/title_activity_all_travels_view" >
        </activity>

<--- a few more activities ---->

    </application>

</manifest>

编辑:

proguard-project.txt:

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

project.properties:

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-17

两者看起来都很空,没有对它们做任何事情,所以它只是自动生成的文件。对于我使用的第三方图书馆: DB40 sidemenu 的Restlet 还有三个与restlet一起使用

0 个答案:

没有答案