我正在检查谷歌代码中的示例.它要求我使用SVN Checkout签出来源.我正在使用Android Studio,我使用VCS中的Subversion结帐选项 - >从版本控制中检出 - > Subversion.Howerver我遇到了一个错误.他们做错了什么?
检查谷歌源代码.
错误= 2
正如你在这里看到的那样,图片你可以看到文件夹,当然还有来源但它怎么找不到它?
我想在服务中扩展xml布局.你怎么做到这一点?我尝试使用inflater和Window Manager,但我认为它不起作用.对此有何策略?谢谢.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:id="@+id/main"
>
<LinearLayout
android:id="@+id/top"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
>
<FrameLayout
android:id="@+id/topLeft"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="topLeft"
android:layout_weight="1.0"
android:background="#ff3d38"></FrameLayout>
<FrameLayout
android:id="@+id/topRight"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:tag="topRight"
android:layout_weight="1.0"
android:background="#fff839"></FrameLayout>
</LinearLayout>
<LinearLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:layout_weight="1"
android:orientation="horizontal"
android:id="@+id/bottom"
>
<FrameLayout
android:id="@+id/bottomLeft"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:background="#1e22ff">
</FrameLayout>
<FrameLayout
android:id="@+id/bottomRight"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.0"
android:background="#32ff1f"></FrameLayout>
Run Code Online (Sandbox Code Playgroud)
这是我要显示的xml的服务代码.
package com.toksis.pvscreen;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.PixelFormat;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import …
Run Code Online (Sandbox Code Playgroud) 有没有正确的方法在Android Studio中调试服务?或Android Studio无法做到这一点?当我尝试调试时,它只会断开套接字.("与目标VM断开连接,地址:'localhost:8600',传输'套接字')
希望你能在这里帮助我..
我在这里通过一些链接做了什么建议,我放了.waitForDebugger但没有任何反应.请帮帮我..非常感谢你.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent mainService = new Intent(this,MainPowerAndVolumeService.class);
startService(mainService);
android.os.Debug.waitForDebugger();
finish();
}
Run Code Online (Sandbox Code Playgroud) 我正在使用Android Studio中的CVS学习,之后,我的文件夹和所有文件现在都是红色.怎样才能让它恢复正常?请检查图片的链接并查看.
http://imageshack.com/a/img199/8914/3sws.png
经过进一步检查,可能这是原因吗?我不确定这个错误消息是否意味着它是成功的.
http://img11.imageshack.us/img11/6766/btac.png
这是我的git(GIT版本说明(GIT-1.8.4-preview20130916)我得到这个从这个网站. http://msysgit.github.io/
谢谢,托克
我有这个使用服务激活的覆盖按钮.所以它是一个背景按钮.即使其他程序正在运行,您也可以看到该按钮.但是我在按钮上添加功能时遇到问题,当我按住它时,我可以将它拖到我想要的任何地方到屏幕上.我在这里检查了一些拖放选项,但我无法在我的程序中正确应用它.
在我的dragDrop()
方法上,由于以下强制转换错误,它不起作用:
error(WindowManagerLayoutParams could not be cast on Freamelayout.LayoutParams)..
这是我的服务代码:
public class MainPowerAndVolumeService extends Service {
private ViewGroup mView;
private LayoutInflater inflater;
private ImageButton mainButton;
private Button testButton;
@Override
public IBinder
onBind(Intent intent) {
return null;
}
public void onCreate( ) {
super.onCreate();
/*This will make your window or layout to be overlay and of course you can click the buttons*/
WindowManager.LayoutParams params = new WindowManager.LayoutParams(
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.WRAP_CONTENT,
WindowManager.LayoutParams.TYPE_PHONE,
WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
| WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
| WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE,
PixelFormat.TRANSLUCENT
);
/*This will …
Run Code Online (Sandbox Code Playgroud) 我在Android中设置谷歌地图v2.我使用这个链接添加依赖项的新技术." 带有Google Play服务的Android Studio "
它在同步,清理项目和重建项目之后表现很好.但是我找不到MapActivity.什么似乎是问题?
的build.gradle
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:4.2.42'
}
Run Code Online (Sandbox Code Playgroud) google-maps google-play-services android-studio android-gradle-plugin