我是新手自學Android開發Eclipse無法創建。 apk文件導出爲未簽名的應用程序?
我已成立,並安裝了Eclipse/Android SDK和ADT插件包
一切工作正常,包括我的第一次測試的「Hello World」程序,它是已經預當你選擇新的應用程序時安裝 - > Android應用程序:
當將應用程序導出爲未簽名的應用程序時,Eclipse將這個'Hello world'應用程序成功轉換爲.apk文件。
隨着Android教程的幫助指導我 - 我想一個簡單的文本框添加到我的應用程序,我已經通過增加和改變下列文件做到了這一點:
首先:我改變了activity_main .xml文件到以下幾點:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="16dp"
android:ems="10"
android:hint="@string/edit_message" />
</LinearLayout>
secoundly:我添加了一個字符串「名稱」和硬編碼的文字「輸入信息」的strings.xml檔案 - 所以現在文本框對象ID名稱可以是解決。
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Gizmodo2</string>
<string name="action_settings">Settings</string>
<string name="edit_message">Enter a message</string>
</resources>
我的新簡單的應用程序編譯o.k與添加的文本框和所有已解決。
但現在的問題是,當我現在嘗試將應用程序導出爲未簽名的android應用程序時,Eclipse不生成.apk文件,它只是生成擴展名爲.file的文件! - 爲什麼?以及如何從這個應用程序生成我需要的.apk文件?
模擬器無法啓動!似乎現在工作 - .apk文件突然正在生成...但.apk文件不加載模擬器,手機或在線模擬器(Manymo) –
請解釋你是什麼意思的「不開始」。 –
另外,我將EditText android:id更改爲edit_message,因爲它是editText1 - 這是錯誤的! - 仍然沒有運行? –