我想用android中的文本和按钮创建头文件(在左侧和左侧的Cetner和Buttons中的文本),我已经尝试但根本没用,请指导我...我怎么能为我做这个应用
android android-widget android-emulator android-intent android-layout
我正在为平板电脑开发一款应用程序,直到最近才在Nexus 7(7.27'',800x1280:tvdpi)的模拟器中进行了测试.一切都很好,直到我决定在另一个模拟器中测试应用程序,其中一个创建类似于三星galaxy note 2(5.6'',720x1280:xhdpi)并且它看起来不太好.
例如,看看我正在使用的这个自定义警报对话框.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/dialog_layout_root"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="@color/light_gray">
<Button
android:id="@+id/facebook_login_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="40dp"/>
<TextView
android:id="@+id/or_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="20dp"
android:textSize="20sp"
android:textColor="@color/black"
android:layout_below="@id/facebook_login_button"/>
<TextView
android:id="@+id/sign_in_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
android:textSize="20sp"
android:textColor="@color/gray"
android:layout_below="@id/or_text"/>
<EditText
android:id="@+id/login_email"
android:layout_width="320dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_below="@id/sign_in_text"
android:hint="@string/email_login"
android:inputType="textEmailAddress"/>
<EditText
android:id="@+id/login_password"
android:layout_width="320dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_below="@id/login_email"
android:hint="@string/pass_login"
android:inputType="textPassword"/>
<TextView
android:id="@+id/case_sensitive_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textIsSelectable="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="20dp"
android:textSize="18sp"
android:textColor="@color/gray"
android:layout_below="@id/login_password"/>
<CheckBox
android:id="@+id/remember_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:layout_below="@id/case_sensitive_text"/>
<Button
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/remember_login"
android:layout_marginLeft="300dp"/>
<TextView …
Run Code Online (Sandbox Code Playgroud) 有时我的应用程序在模拟器中崩溃,说堆内存太低.这堆意味着什么?我的应用程序使用本地数据库和ksoap服务.堆问题不是每次都发生.它背后的原因是什么?
我正在尝试过去两天,但找不到任何解决方案。尝试在错误日志中运行带有错误消息的android应用程序时,我的模拟器屏幕挂起,如下所示:
No command output when running: 'am start -n com.ss.hello/com.ss.hello.MainActivity -a
android.intent.action.MAIN -c
Run Code Online (Sandbox Code Playgroud)
异常堆栈跟踪:
com.android.ddmlib.ShellCommandUnresponsiveException
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:408)
at com.android.ddmlib.Device.executeShellCommand(Device.java:435)
at com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(ActivityLaunchAction.java:67)
at com.android.ide.eclipse.adt.internal.launch.ActivityLaunchAction.doLaunchAction(ActivityLaunchAction.java:109)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.doLaunchAction(AndroidLaunchController.java:1277)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.doLaunchAction(AndroidLaunchController.java:1289)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launchApp(AndroidLaunchController.java:1261)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.simpleLaunch(AndroidLaunchController.java:906)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.continueLaunch(AndroidLaunchController.java:748)
at com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launch(AndroidLaunchController.java:409)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.doLaunch(LaunchConfigDelegate.java:322)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:238)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Run Code Online (Sandbox Code Playgroud)
会话数据:
eclipse.buildId=v22.0.1-685705
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product com.android.ide.eclipse.adt.package.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product com.android.ide.eclipse.adt.package.product
Run Code Online (Sandbox Code Playgroud)
控制台输出为:
[2013-06-16 13:51:02 - Hello] ------------------------------ …
Run Code Online (Sandbox Code Playgroud) 我正试图在真正的Android手机上运行我的Android应用程序.我以前做过这个,但现在我想要连接一个不同的Android手机.这款手机是HTC Wildfire A3333 - Android 2.2.1版(旧版我知道)......如果有任何帮助的话.
我已连接设备并显示在Windows设备管理器中..
我已经在经理中连接了手机的驱动程序,位于以前为我工作的相同位置(sdkhome\extras\google\usb_driver\i386
),它总是说驱动程序是最新的.
我根本无法让它出现在Android设备列表中!
即使在杀死adb服务器并再次启动它之后,它会在命令提示符中找到连接的设备,但仍然没有在Android设备选择器中显示.我重新启动了我的电脑并多次重新连接手机.
有人可以帮帮我吗?
我已经更新到Genymotion 2.0并在安装适当的GApps软件包时下载/部署了新的4.3图像(Galaxy Nexus和10.1平板电脑),在启动开发应用程序时出现了一个毁灭性错误,其中包含以下堆栈跟踪,使设备重新启动.
I/Process ( 3117): Sending signal. PID: 3117 SIG: 9
E/AndroidRuntime( 3117): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread
E/AndroidRuntime( 3117): java.lang.IllegalArgumentException: provider doesn't exisit: null
E/AndroidRuntime( 3117): at com.android.server.LocationManagerService.requestLocationUpdatesLocked(LocationManagerService.java:1323)
E/AndroidRuntime( 3117): at com.android.server.LocationManagerService.requestLocationUpdates(LocationManagerService.java:1302)
E/AndroidRuntime( 3117): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:836)
E/AndroidRuntime( 3117): at android.location.LocationManager.requestLocationUpdates(LocationManager.java:461)
E/AndroidRuntime( 3117): at com.android.location.fused.FusionEngine.enableProvider(FusionEngine.java:138)
E/AndroidRuntime( 3117): at com.android.location.fused.FusionEngine.updateRequirements(FusionEngine.java:191)
E/AndroidRuntime( 3117): at com.android.location.fused.FusionEngine.setRequest(FusionEngine.java:114)
E/AndroidRuntime( 3117): at com.android.location.fused.FusedLocationProvider$2.handleMessage(FusedLocationProvider.java:98)
E/AndroidRuntime( 3117): at androi
Run Code Online (Sandbox Code Playgroud) Eclipse Phonegap的Iam Beginer,当我尝试创建一个小应用程序时,模拟器总是显示一条错误消息"
Failed to install Homeapp.apk on device 'emulator-5554': timeout
Launch canceled
Run Code Online (Sandbox Code Playgroud)
!",为什么它一直发生,为这个错误建议一个解决方案.
我有一个Android应用程序,我能够模拟进出的网络,但我想知道是否有一种方法来模拟没有电话号码的Android设备.
我有一个程序可以通过无线运行,所以手机不需要服务.我很好奇是否有办法用eclipse中的android模拟器模拟这个.
在Android Studio中工作时,我遇到了Android模拟器的问题.
我按Ctrl+ F12(或Crtl+ F11)Android模拟器窗口更改方向,但是android没有.
我查看了Android设置 - >显示,并且"自动旋转屏幕"为ON.
我刚买了一部Android手机:LG G3,用它作为模拟器,因此测试我的应用程序.但是,Android Studio无法识别它:我启用了USB调试(我激活了devellopeur模式)并允许未知来源,但它不起作用.我的电脑可以识别我的手机,但Android手机却没有!
谢谢您的帮助 !:
android-emulator ×10
android ×9
cordova ×1
detect ×1
device ×1
eclipse ×1
genymotion ×1
hang ×1
lg ×1
startup ×1