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 と一緒に使用される 3 つ以上