我不得不說,我是Android開發領域的新手。我只是在昨天下載它,並希望看看我今晚能否獲得一些簡單的應用程序。應用程序的Android測試代碼?
以前的代碼是當我把按鈕放在屏幕上時的代碼。我對XML和Java有很好的理解,所以我對這個概念並不陌生,但是我不得不說,我試圖讓Android應用程序工作一段時間,它遇到問題後會遇到問題,從來沒有看到過示例運行。這不可能是一個複雜的問題。
我知道在Eclipse IDE中有一些測試設備是我模擬Nexus 7的。我有一個Nexus 7並希望看到即使在我自己的設備上也能測試它,但首先我必須獲取它甚至在一些仿真中運行。這是我無法想象的。
我的問題是我要去哪裏?
確切地說,您如何獲得一個Android應用程序來編譯和運行,以便您可以在仿真器或Nexus 7的屏幕上看到它的內容。實際上,我沒有看到任何Java代碼,而是看到了XML基本代碼。那是Android系統如何在基於XML的代碼上運行?
的Android代碼:
<FrameLayout 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:background="#0099cc"
tools:context=".FullscreenActivity" >
<!--
The primary full-screen view. This can be replaced with whatever view
is needed to present your content, e.g. VideoView, SurfaceView,
TextureView, etc.
-->
<TextView
android:id="@+id/fullscreen_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:keepScreenOn="true"
android:text="@string/dummy_content"
android:textColor="#33b5e5"
android:textSize="50sp"
android:textStyle="bold" />
<!--
This FrameLayout insets its children based on system windows using
android:fitsSystemWindows.
-->
<android.support.v7.widget.GridLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
</android.support.v7.widget.GridLayout>
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@android:drawable/btn_star" />
<Button
android:id="@+id/button1"
android:layout_width="301dp"
android:layout_height="142dp"
android:text="Button" />
</FrameLayout>
那究竟是什麼問題? – PsyGik
究竟是什麼^ - 那傢伙說。另外,顯示你使用的Java代碼。 – csmckelvey