- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在 windowManager 服务中打开视频播放器。如果我使用图像而不是“VideoView”,一切正常。但是,如果我使用 VideoView,则会出现此异常。
01-06 12:17:46.237: E/AndroidRuntime(1129): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.view.ViewRootImpl.setView(ViewRootImpl.java:563)
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:269)
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.app.Dialog.show(Dialog.java:281)
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.widget.VideoView$4.onError(VideoView.java:421)
01-06 12:17:46.237: E/AndroidRuntime(1129): at android.media.MediaPlayer$EventHandler.handleMessage(MediaPlayer.java:2022)
我在谷歌上搜索并修复了所有问题,但仍然无法正常工作。
这是我的代码。
聊天头服务
package henrychuang.tw.chatheadmsg;
import android.annotation.SuppressLint;
import android.app.Service;
import android.content.Intent;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.os.Handler;
import android.os.IBinder;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.VideoView;
public class ChatHeadService extends Service {
private WindowManager windowManager;
private RelativeLayout chatheadView, removeView;
private LinearLayout txtView, txt_linearlayout;
private ImageView removeImg;
private VideoView chatheadImg;
private TextView txt1;
private int x_init_cord, y_init_cord, x_init_margin, y_init_margin, iLife = 0;
private Point szWindow = new Point();
private boolean isLeft = true;
@SuppressLint("NewApi")
@SuppressWarnings("deprecation")
@Override
public void onCreate() {
// TODO Auto-generated method stub
super.onCreate();
Log.d(Utility.LogTag, "ChatHeadService.onCreate()");
windowManager = (WindowManager) getSystemService(WINDOW_SERVICE);
LayoutInflater inflater = (LayoutInflater)getSystemService(LAYOUT_INFLATER_SERVICE);
removeView = (RelativeLayout)inflater.inflate(R.layout.remove, null);
WindowManager.LayoutParams paramRemove = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
PixelFormat.TRANSLUCENT);
paramRemove.gravity = Gravity.TOP | Gravity.LEFT;
removeView.setVisibility(View.GONE);
removeImg = (ImageView)removeView.findViewById(R.id.remove_img);
windowManager.addView(removeView, paramRemove);
chatheadView = (RelativeLayout) inflater.inflate(R.layout.chathead, null);
chatheadImg = (VideoView)chatheadView.findViewById(R.id.chathead_img);
String path="http://10.0.2.2/SILLI.mpg";
Uri uri=Uri.parse(path);
chatheadImg.setVideoURI(uri);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
windowManager.getDefaultDisplay().getSize(szWindow);
} else {
int w = windowManager.getDefaultDisplay().getWidth();
int h = windowManager.getDefaultDisplay().getHeight();
szWindow.set(w, h);
}
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
PixelFormat.TRANSLUCENT);
params.gravity = Gravity.TOP | Gravity.LEFT;
params.x = 0;
params.y = 0;
windowManager.addView(chatheadView, params);
/*
Handler handler_longClick = new Handler();
Runnable runnable_longClick = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Log.d(Utility.LogTag, "Into runnable_longClick");
update();
}
};*/
chatheadView.setOnTouchListener(new View.OnTouchListener() {
long time_start = 0, time_end = 0;
boolean isLongclick = false, inBounded = false;
int remove_img_width = 0, remove_img_height = 0;
Handler handler_longClick = new Handler();
Runnable runnable_longClick = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
Log.d(Utility.LogTag, "Into runnable_longClick");
isLongclick = true;
removeView.setVisibility(View.VISIBLE);
chathead_longclick();
}
};
@Override
public boolean onTouch(View v, MotionEvent event) {
WindowManager.LayoutParams layoutParams = (WindowManager.LayoutParams) chatheadView.getLayoutParams();
int x_cord = (int) event.getRawX();
int y_cord = (int) event.getRawY();
int x_cord_Destination, y_cord_Destination;
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
time_start = System.currentTimeMillis();
handler_longClick.postDelayed(runnable_longClick, 600);
remove_img_width = removeImg.getLayoutParams().width;
remove_img_height = removeImg.getLayoutParams().height;
x_init_cord = x_cord;
y_init_cord = y_cord;
x_init_margin = layoutParams.x;
y_init_margin = layoutParams.y;
if(txtView != null){
txtView.setVisibility(View.GONE);
myHandler.removeCallbacks(myRunnable);
}
break;
case MotionEvent.ACTION_MOVE:
int x_diff_move = x_cord - x_init_cord;
int y_diff_move = y_cord - y_init_cord;
x_cord_Destination = x_init_margin + x_diff_move;
y_cord_Destination = y_init_margin + y_diff_move;
if(isLongclick){
int x_bound_left = (szWindow.x - removeView.getWidth()) / 2 - 250;
int x_bound_right = (szWindow.x + removeView.getWidth()) / 2 + 100;
int y_bound_top = szWindow.y - (removeView.getHeight() + getStatusBarHeight()) - 200;
if((x_cord_Destination >= x_bound_left && x_cord_Destination <= x_bound_right) && y_cord_Destination >= y_bound_top){
inBounded = true;
layoutParams.x = (szWindow.x - chatheadView.getWidth()) / 2;
layoutParams.y = szWindow.y - (removeView.getHeight() + getStatusBarHeight()) + 70;
if(removeImg.getLayoutParams().height == remove_img_height){
removeImg.getLayoutParams().height = (int) (remove_img_height * 1.5);
removeImg.getLayoutParams().width = (int) (remove_img_width * 1.5);
WindowManager.LayoutParams param_remove = (WindowManager.LayoutParams) removeView.getLayoutParams();
int x_cord_remove = (int) ((szWindow.x - (remove_img_height * 1.5)) / 2);
int y_cord_remove = (int) (szWindow.y - ((remove_img_width * 1.5) + getStatusBarHeight() ));
param_remove.x = x_cord_remove;
param_remove.y = y_cord_remove;
windowManager.updateViewLayout(removeView, param_remove);
}
windowManager.updateViewLayout(chatheadView, layoutParams);
break;
}else{
inBounded = false;
removeImg.getLayoutParams().height = remove_img_height;
removeImg.getLayoutParams().width = remove_img_width;
WindowManager.LayoutParams param_remove = (WindowManager.LayoutParams) removeView.getLayoutParams();
int x_cord_remove = (szWindow.x - removeView.getWidth()) / 2;
int y_cord_remove = szWindow.y - (removeView.getHeight() + getStatusBarHeight() );
param_remove.x = x_cord_remove;
param_remove.y = y_cord_remove;
windowManager.updateViewLayout(removeView, param_remove);
}
}
layoutParams.x = x_cord_Destination;
layoutParams.y = y_cord_Destination;
windowManager.updateViewLayout(chatheadView, layoutParams);
break;
case MotionEvent.ACTION_UP:
isLongclick = false;
removeView.setVisibility(View.GONE);
removeImg.getLayoutParams().height = remove_img_height;
removeImg.getLayoutParams().width = remove_img_width;
handler_longClick.removeCallbacks(runnable_longClick);
if(inBounded){
if(MyDialog.active){
MyDialog.myDialog.finish();
}
stopService(new Intent(ChatHeadService.this, ChatHeadService.class));
inBounded = false;
break;
}
int x_diff = x_cord - x_init_cord;
int y_diff = y_cord - y_init_cord;
if(x_diff < 5 && y_diff < 5){
time_end = System.currentTimeMillis();
if((time_end - time_start) < 300){
chathead_click();
}
}
x_cord_Destination = x_init_margin + x_diff;
y_cord_Destination = y_init_margin + y_diff;
int x_start;
x_start = x_cord_Destination;
int BarHeight = getStatusBarHeight();
if (y_cord_Destination < 0) {
y_cord_Destination = 0;
} else if (y_cord_Destination + (chatheadView.getHeight() + BarHeight) > szWindow.y) {
y_cord_Destination = szWindow.y - (chatheadView.getHeight() + BarHeight );
}
layoutParams.y = y_cord_Destination;
inBounded = false;
resetPosition(x_start);
break;
default:
Log.d(Utility.LogTag, "chatheadView.setOnTouchListener -> event.getAction() : default");
break;
}
return true;
}
});
txtView = (LinearLayout)inflater.inflate(R.layout.txt, null);
txt1 = (TextView) txtView.findViewById(R.id.txt1);
txt_linearlayout = (LinearLayout)txtView.findViewById(R.id.txt_linearlayout);
WindowManager.LayoutParams paramsTxt = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH | WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
PixelFormat.TRANSLUCENT);
paramsTxt.gravity = Gravity.TOP | Gravity.LEFT;
txtView.setVisibility(View.GONE);
windowManager.addView(txtView, paramsTxt);
}
private void resetPosition(int x_cord_now) {
int w = chatheadView.getWidth();
if(x_cord_now == 0 || x_cord_now == szWindow.x - w){
} else if(x_cord_now + w / 2<= szWindow.x / 2){
isLeft = true;
// moveToLeft(x_cord_now);
} else if(x_cord_now + w / 2 > szWindow.x / 2){
isLeft = false;
// moveToRight(x_cord_now);
}
}
private void moveToLeft(int x_cord_now){
final int x = x_cord_now;
new CountDownTimer(500, 5) {
WindowManager.LayoutParams mParams = (WindowManager.LayoutParams) chatheadView.getLayoutParams();
public void onTick(long t) {
long step = (500 - t)/5;
mParams.x = (int)(double)bounceValue(step,x);
windowManager.updateViewLayout(chatheadView, mParams);
}
public void onFinish() {
mParams.x = 0;
windowManager.updateViewLayout(chatheadView, mParams);
}
}.start();
}
private void moveToRight(int x_cord_now){
final int x = x_cord_now;
new CountDownTimer(500, 5) {
WindowManager.LayoutParams mParams = (WindowManager.LayoutParams) chatheadView.getLayoutParams();
public void onTick(long t) {
long step = (500 - t)/5;
mParams.x = szWindow.x + (int)(double)bounceValue(step,x) - chatheadView.getWidth();
windowManager.updateViewLayout(chatheadView, mParams);
}
public void onFinish() {
mParams.x = szWindow.x - chatheadView.getWidth();
windowManager.updateViewLayout(chatheadView, mParams);
}
}.start();
}
private double bounceValue(long step, long scale){
double value = scale * java.lang.Math.exp(-0.055 * step) * java.lang.Math.cos(0.08 * step);
return value;
}
private int getStatusBarHeight() {
int statusBarHeight = (int) Math.ceil(25 * ChatHeadService.this.getResources().getDisplayMetrics().density);
return statusBarHeight;
}
private void chathead_click(){
if(MyDialog.active){
MyDialog.myDialog.finish();
}else{
Intent it = new Intent(ChatHeadService.this,MyDialog.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(it);
}
}
private void chathead_longclick(){
Log.d(Utility.LogTag, "Into ChatHeadService.chathead_longclick() ");
WindowManager.LayoutParams param_remove = (WindowManager.LayoutParams) removeView.getLayoutParams();
int x_cord_remove = (szWindow.x - removeView.getWidth()) / 2;
int y_cord_remove = szWindow.y - (removeView.getHeight() + getStatusBarHeight() );
param_remove.x = x_cord_remove;
param_remove.y = y_cord_remove;
windowManager.updateViewLayout(removeView, param_remove);
}
private void showMsg(String sMsg){
if(txtView != null && chatheadView != null ){
Log.d(Utility.LogTag, "ChatHeadService.showMsg -> sMsg=" + sMsg);
txt1.setText(sMsg);
myHandler.removeCallbacks(myRunnable);
WindowManager.LayoutParams param_chathead = (WindowManager.LayoutParams) chatheadView.getLayoutParams();
WindowManager.LayoutParams param_txt = (WindowManager.LayoutParams) txtView.getLayoutParams();
txt_linearlayout.getLayoutParams().height = chatheadView.getHeight();
txt_linearlayout.getLayoutParams().width = szWindow.x / 2;
if(isLeft){
param_txt.x = param_chathead.x + 100;
param_txt.y = param_chathead.y;
txt_linearlayout.setGravity(Gravity.LEFT | Gravity.CENTER_VERTICAL);
}else{
param_txt.x = param_chathead.x - szWindow.x / 2;
param_txt.y = param_chathead.y;
txt_linearlayout.setGravity(Gravity.RIGHT | Gravity.CENTER_VERTICAL);
}
txtView.setVisibility(View.VISIBLE);
windowManager.updateViewLayout(txtView, param_txt);
myHandler.postDelayed(myRunnable, 4000);
}
}
Handler myHandler = new Handler();
Runnable myRunnable = new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
if(txtView != null){
txtView.setVisibility(View.GONE);
}
}
};
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
Bundle bd = intent.getExtras();
if(bd != null){
final String sMsg = bd.getString(Utility.EXTRA_MSG);
Log.e(Utility.LogTag, "ChatHeadService.onStartCommand() -> EXTRA_MSG=" + sMsg);
if(iLife > 0)
showMsg(sMsg);
else{
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
showMsg(sMsg);
}
}, 300);
}
}
iLife++;
return super.onStartCommand(intent, flags, startId);
}
@Override
public void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
if(chatheadView != null){
windowManager.removeView(chatheadView);
}
if(txtView != null){
windowManager.removeView(txtView);
}
if(removeView != null){
windowManager.removeView(removeView);
}
}
@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
Log.d(Utility.LogTag, "ChatHeadService.onBind()");
return null;
}
}
主要
package henrychuang.tw.chatheadmsg;
import henrychuang.tw.chatheadmsg.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Main extends Activity {
public static Button btnStartService, btnShowMsg;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
btnStartService = (Button)findViewById(R.id.btnStartService);
btnShowMsg = (Button)findViewById(R.id.btnMsg);
btnStartService.setOnClickListener(lst_StartService);
btnShowMsg.setOnClickListener(lst_ShowMsg);
}
Button.OnClickListener lst_StartService = new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
startService(new Intent(Main.this, ChatHeadService.class));
}
};
Button.OnClickListener lst_ShowMsg = new Button.OnClickListener(){
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
java.util.Date now = new java.util.Date();
String str = "test by henry " + new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(now);
Intent it = new Intent(Main.this, ChatHeadService.class);
it.putExtra(Utility.EXTRA_MSG, str);
startService(it);
}
};
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
}
}
我的对话框
package henrychuang.tw.chatheadmsg;
import henrychuang.tw.chatheadmsg.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
public class MyDialog extends Activity {
public static boolean active = false;
public static Activity myDialog;
EditText edt;
Button btn;
View top;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.dialog);
edt = (EditText) findViewById(R.id.dialog_edt);
btn = (Button) findViewById(R.id.dialog_btn);
top = (View)findViewById(R.id.dialog_top);
myDialog = MyDialog.this;
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
String str = edt.getText().toString();
if(str.length() > 0){
// ChatHeadService.showMsg(MyDialog.this, str);
Intent it = new Intent(MyDialog.this, ChatHeadService.class);
it.putExtra(Utility.EXTRA_MSG, str);
startService(it);
}
}
});
top.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
finish();
}
});
}
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
active = true;
}
@Override
protected void onPause() {
// TODO Auto-generated method stub
super.onPause();
active = false;
}
@Override
protected void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
active = false;
}
}
效用
package henrychuang.tw.chatheadmsg;
public class Utility {
public static String LogTag = "henrytest";
public static String EXTRA_MSG = "extra_msg";
}
最佳答案
没有阅读您的所有代码:错误消息很可能是说您在某处使用了应用程序而不是 Activity ,用于需要上下文的内容。
(引用:我自己的经验和 stackoverflow.com/questions/28346458/progressbar-in-asynchtask-causes-crash-unable-to-add-window-token-null-is-n)
关于java - android bad token异常无法在WindowManager服务中添加窗口,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27804016/
我们正在创建一个 n 层 Silverlight LOB 应用程序,并且正在考虑使用 .NET RIA 服务。我们不清楚这与我们当前的 WCF 服务 API 的关系在哪里。我们当前的架构是: 银光
上下文:我在celery + rabbitmq堆栈上有一个主工作系统。 系统已docker化(此处未提供worker服务) version: '2' services: rabbit:
我是 Windows Azure 新手,我正在尝试将我的 Web 应用程序部署到 Windows Azure。在我的应用程序中,我使用了一些 Web 服务,现在我想知道如何在 Windows Azur
因此,根据我对服务的了解,自定义对象似乎是写入服务以返回数据的方式。如果我正在编写将用于 1) 填充数据库或 2) 为网站提供信息的服务,是否有返回数据集/数据表而不是包含所有这些的自定义对象列表的用
我在 google 和 stackoverflow 上都找过答案,但似乎找不到。我正在尝试将 azure 实验的输出获取到应用程序。我使用 ibuildapp 和谷歌表单制作了该应用程序。如何使用 g
我不小心删除了 kubernetes svc: service "kubernetes" deleted 使用: kubectl delete svc --all 我该怎么办?我只是想删除服务,以便
我正在努力确定解决网络服务问题的最有效方法。 我的情况:我正在开发一个 Android 应用程序,它通过 Web 服务从 mysql 数据库(在我自己的服务器 PC 上)存储和检索数据。用户按下提交按
我一直在翻阅 Android 文档,我很好奇。什么时候绑定(bind)服务而不是不绑定(bind)服务?它提供了哪些优点/限制? 最佳答案 When would you bind a service
我试图从架构的角度理解 hive,我指的是 Tom White 关于 Hadoop 的书。 我遇到了以下关于配置单元的术语:Hive Services、hiveserver2、metastore 等。
我的问题:安装服务后我无法导航到基地址,因为服务不会继续运行(立即停止)。我需要在服务器或我的机器上做些什么才能使 baseAddress 有效吗? 背景:我正在尝试学习如何使用 Windows 服务
我正在努力就 Web 服务的正确组织做出决定。我应该有多个 ASMX 来代表 Web 服务中的不同功能,还是应该有一个 ASMX? 如果我有多个 ASMX,这不构成多个 Web 服务吗? 如果我只有一
我正在从事一个在 azure 平台上提供休息服务的项目。该服务由 iPhone 客户端使用,这是选择其余方法的重要原因之一。 我们希望通过 AccessControlService(ACS) 并使用
我是 Ionic 新手,正在使用 Ionic 3.9.2 我有几个终端命令来为我的 ionic 应用程序提供服务,但是,我没有发现这两个命令之间有任何区别。 ionic serve 和 ionic s
关闭。这个问题需要多问focused 。目前不接受答案。 想要改进此问题吗?更新问题,使其仅关注一个问题 editing this post . 已关闭 8 年前。 Improve this ques
作为项目的一部分,我期待着问这个问题。我过去有开发和使用 Web 服务的经验,并且非常熟悉这些服务。但是,有人告诉我,作为下一个项目的一部分,我将需要使用“安全”的 Web 服务。您能否提供一些见解,
我浏览了很多关于这个问题的信息,但找不到解决方案。这里的问题是,我想使用 Apache Cordova 和 Visual Studio 连接到 wcf。因此,如果有人找到合适的工作解决方案,请发布链接
我在 Windows 服务中托管了一个 WCF(从 MS 网站示例中选取),我可以使用 SOAP UI 访问和调用方法。但是,当我尝试使用 jquery 从 Web 应用程序调用相同的方法时,我不断收
我们构建了一个 Android 应用程序,它从 Android 向我的 PHP 服务器发送 HTTP 请求。作为响应,Web 服务将 JSON 对象发送到 Android 应用程序以显示结果。 就像其
我想在 android 应用程序中调用 soap web 服务,它需要一个枚举值作为参数,它是一个标志枚举。如何从 Android 应用程序将一些值作为标志枚举传递给此 Web 服务方法? 我使用 K
我尝试在模拟器上安装 Google Play。我已按照 Google Dev Site 中的说明进行操作. 使用 ADV 管理器似乎没问题,设备的目标是 Google API 版本 22,但是当我运行
我是一名优秀的程序员,十分优秀!