我有一个Android演示文稿,想要获得我的应用程序的一些截图.事实上,我想要在手机上运行应用程序的屏幕截图.
我可以使用相机并拍摄机器人手机+应用程序的照片,但在我看来,AVD 曾经在Nexus手机的图片中运行.只是想知道它是否是某个Eclipse配置选项?
谢谢!
我正在尝试为Android创建一个程序,该程序将以文本形式读取,然后打印出来,jsut以便习惯使用Android的I/O. 但是,每当我在AVD上运行它时,它会在LogCat中返回一个错误,说我的代码中存在NullPointerException,因此它"无法实例化ComponentInfo活动".
我找不到我指的是什么零.
这是我的代码:
import android.app.*;
import android.os.*;
import android.view.View;
import android.view.View.*;
import android.widget.*;
public class ButtonTestActivity extends Activity {
TextView tv = (TextView) findViewById(R.id.textView1);
EditText et = (EditText) findViewById(R.id.edittext);
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button b = (Button) findViewById(R.id.Enter);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
tv.setText(et.getText().toString());
}
});
}
Run Code Online (Sandbox Code Playgroud)
}
这是我的XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content" …Run Code Online (Sandbox Code Playgroud) 我一直在关注Android教程并创建了MyFirstApp(请参阅http://developer.android.com/training/basics/firstapp/index.html),我可以在模拟器上启动应用程序,但输入消息后点击" 发送 "我在下面的代码中的这一行得到一个由NullPointerException引起的IllegalStateException:
String message = editText.getText().toString();
Run Code Online (Sandbox Code Playgroud)
在调试时,很明显此时editText为null,但我无法理解为什么,或者我在本教程中遗漏的任何内容.
我的MainActivity类:
package com.example.myfirstapp;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
/**
* <p>Main Activity class for the App</p>
*
* @author - thebloodguy
*/
public class MainActivity extends Activity {
//~ ----------------------------------------------------------------------------------------------------------------
//~ Static fields/initializers
//~ ----------------------------------------------------------------------------------------------------------------
/** Key to the extra message data in the sendMessage intent */
public static …Run Code Online (Sandbox Code Playgroud) java android nullpointerexception android-virtual-device illegalstateexception
我是Android开发的新手,我正在尝试创建一个AVD来测试应用程序,然后将其推送到我的手机(htc欲望运行android 2.3.5).
我正在使用ADT软件包,并且使用SDK管理器我已经下载了这些:
但是当试图选择AVD的目标时,唯一可用的选项是API 17,16和8.
怎么了?
更新: 我已经尝试删除和重新下载API,它出现在android-sdk/platforms目录中.
我正试图在Android Studio上使用AVD截取屏幕截图,但每次我都会从Android设备监视器获取错误消息.附加了日志消息.如果需要,我可以发布完整日志.我现在尝试了三种不同的AVD,并且所有这三种都发生了同样的错误.
08-04 03:50:48.079: E/BufferQueue(1300): [ScreenshotClient] dequeueBuffer: SurfaceComposer::createGraphicBuffer failed
Run Code Online (Sandbox Code Playgroud) 我想访问存储在我的电脑中的文本文件中的信息并将其显示在 AVD 内的 ListView 中。我不想将文件推送到 avd 中。我希望我的应用程序从服务器访问此类文件(在本例中是我的电脑)并显示其中的信息。假设该文件存储在 C:\users 中。我如何访问它?
我AVD用API 23那个做了一个,nexus 4它看起来像这样
Buttons & Manu在单独的面板中不是这样。
所以,我想知道是否Android Studio提供模拟器屏幕作为原始物理设备?而不是上面的第二张图片?或者我的emulator. 为什么我的emulator没有额外的面板buttons?
请指导我。
android android-virtual-device android-emulator android-screen android-studio
我是Xamarin的新手,在尝试使用Android Emulator运行Xamarin App时遇到困难.
这是我的AVD:
我可以运行这个AVD很好但很慢,如果我检查使用主机GPU,它要快得多,但需要很长时间才能启动模拟器.但是当我在Xamrin上调试时,它总是在模拟器中显示此错误:
unfortunately launcher3 has stopped
Run Code Online (Sandbox Code Playgroud)
或只是加载,永远不会像这样完成:
请帮我.