首先,我是所有这些东西的全新手,我被推入其中.
根据这两个主题: 当Android执行"android执行时无效的命令行参数"问题调整路径中的空格时,在SDK工具,版本12和 无效命令行参数中启动Android模拟器,但我不知道我知道怎么做.
我有Windows 7,Eclipse IDE用于带有ADT插件的并行应用程序开发人员.
emulator.exe的路径是:C:\ Program Files(x86)\ Android\android-sdk\tools
eclipse command-line-arguments windows-7 android-emulator android-sdk-tools
使用模拟器,连接外部存储器,我想模拟应用程序启动时发生的情况,并且某些文件已存在于ext存储器的相关目录中.
在AVD中启用后,外部存储器是否实际位于我的机器上?或者我应该使用一些临时的,丢弃的代码创建文件?或者我应该只在真实设备上测试?
这种情况的最佳做法是什么?
Android 4.0上的免费内部内存很少,因为系统占用了相当大的空间.这限制了可以安装的应用程序的数量.
那么,我们怎样才能增加内存?
在创建新AVD的对话框中,我没有看到它的选项.我错过了什么?我尝试了一些分区大小选项,但它不会影响内部内存或模拟器在引导期间挂起.
android android-virtual-device android-emulator android-4.0-ice-cream-sandwich
我刚开始学习android.我正在使用Windows XP,eclipse indigo JavaEE及其ADT.然后我正在尝试官方的Hello World.我创建了一个AVD并粘贴代码.但是当我运行程序时,在AVD初始化期间出现了问题.这是日志:
[2011-11-15 15:53:33 - helloworld] --------------
[2011-11-15 15:53:33 - helloworld] Android Launch!
[2011-11-15 15:53:33 - helloworld] adb is running normally.
[2011-11-15 15:53:33 - helloworld] Performing com.helloworld.HelloworldActivity activity launch
[2011-11-15 15:53:33 - helloworld] Automatic Target Mode: launching new emulator with compatible AVD 'myAVD'
[2011-11-15 15:53:33 - helloworld] Launching a new emulator with Virtual Device 'myAVD'
[2011-11-15 15:53:35 - Emulator] NAND: could not write file C:\DOCUME~1\qi\LOCALS~1\Temp\\AndroidEmulator\TMP185.tmp, No space left on device
Run Code Online (Sandbox Code Playgroud)
我有很多空间,我C:\对此非常困惑No space …
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/groups_massegesTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp"
android:layout_marginLeft="10dp"
android:textColor="@color/list_text_color" />
<CheckBox
android:id="@+id/groups_massegescheckBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/checkbox_background"
android:button="@drawable/checkbox"
android:focusable="false"
android:layout_marginBottom="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="5dp"
android:layout_gravity="right"
/>
</LinearLayout>
Run Code Online (Sandbox Code Playgroud)
我正在使用linearlayout,我想在屏幕右侧设置复选框.我不想使用relativelayout.在linearlayout中有没有办法做到这一点.复选框始终位于textView的右侧.
以下代码导致此输出,我无法看到我的文本视图.

我该怎么做才能看到我的文字视图?
它会离开这个闪屏...
提前谢谢.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hello.agam"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".HelloAndroidActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/textview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="@string/hello"/>
</activity>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
我也试过这个:
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
Run Code Online (Sandbox Code Playgroud) 我试图使用此代码以编程方式启动日历同步
Bundle bundle = new Bundle();
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_FORCE, true);
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
bundle.putBoolean(ContentResolver.SYNC_EXTRAS_IGNORE_SETTINGS, true);
ContentResolver.requestSync(accounts[0], "com.android.calendar", bundle);
Run Code Online (Sandbox Code Playgroud)
我想要一种方式,所以我可以知道同步完成,所以我可以从日历中读取数据,我尝试这样做
while (ContentResolver.isSyncActive(accounts[0], "com.android.calendar")) {
System.out.println("looping: " + i);
}
readLocalCalendar();
readLocalEvents();
Run Code Online (Sandbox Code Playgroud)
但系统在同步结束前退出循环,我仍然可以在状态栏看到同步标志,所以任何帮助,所以我可以在同步完成后阅读日历事件?
谢谢
android android-widget android-emulator android-intent android-layout
当我点击星星时,我正在调整小数值,如1.0,1.5,2.0,2.5等等
如何在自定义评级栏中获得整数评级?
可能吗?
ratingbar.setOnRatingBarChangeListener(new OnRatingBarChangeListener()
{
public void onRatingChanged(RatingBar ratingBar, float rating, boolean fromUser)
{
Toast.makeText(Rating.this, "New Rating: " + rating, Toast.LENGTH_SHORT).show();
}});
}
Run Code Online (Sandbox Code Playgroud) 在下面的代码点击按钮我想隐藏相对布局rl1和显示rl2但我的应用程序在按钮点击后崩溃.我做错了什么
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<RelativeLayout
android:id="@+id/rl1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/welcome_1">
<ImageView
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:paddingTop="360dp"
android:layout_marginRight="4dp"
android:src="@drawable/button1" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/rl2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:background="@drawable/menu_2"
></RelativeLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
Java代码
public class mockupsActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// ImageButton img1 = (ImageButton)findViewById(R.id.button1);
ImageView img1 =(ImageView)findViewById(R.id.button1);
img1.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// your code here …Run Code Online (Sandbox Code Playgroud) 这个问题有点类似于无法创建Android虚拟设备,区别在于我试图在Windows而不是ubuntu 上创建AVD,另一个区别是我可以创建android 2.2和2.3 AVD而不会出错,但无法创建ADV 4.x,为什么?
无论如何,我已经为4.x安装了sdk和api.
[2012-09-26 13:01:40 - SDK Manager] Warning: Ignoring add-on 'google_apis-10_r02': Unable to find base platform with API level '10'
[2012-09-26 13:01:40 - SDK Manager] Warning: Ignoring add-on 'google_apis-11_r01': Unable to find base platform with API level '11'
[2012-09-26 13:01:40 - SDK Manager] Warning: Ignoring add-on 'google_apis-12_r01': Unable to find base platform with API level '12'
[2012-09-26 13:01:40 - SDK Manager] Warning: Ignoring add-on 'google_apis-13_r01': Unable …Run Code Online (Sandbox Code Playgroud) android-emulator ×10
android ×9
eclipse ×2
adt ×1
android-4.0-ice-cream-sandwich ×1
windows-7 ×1
xml ×1