小编The*_*One的帖子

Android Studio 0.5.2 SVN CheckOut无法正常工作

我正在检查谷歌代码中的示例.它要求我使用SVN Checkout签出来源.我正在使用Android Studio,我使用VCS中的Subversion结帐选项 - >从版本控制中检出 - > Subversion.Howerver我遇到了一个错误.他们做错了什么?

检查谷歌源代码.

结帐Google代码

错误= 2

错误找不到指定的文件.

正如你在这里看到的那样,图片你可以看到文件夹,当然还有来源但它怎么找不到它?

正如您在此图片中看到的,您可以看到源文件夹.

svn android android-studio

21
推荐指数
4
解决办法
4万
查看次数

可以在服务中膨胀XML布局吗?(机器人)

我想在服务中扩展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)

xml service android android-layout

17
推荐指数
1
解决办法
1万
查看次数

在Android Studio中调试服务的正确方法?

有没有正确的方法在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)

service android android-studio

12
推荐指数
1
解决办法
1万
查看次数

文本/设计选项卡在Android Studio IDE上缺少新的Android项目

如何在创建新项目期间自动创建的activity_main.xml文件的src/main/res/layout文件夹上启用文本/设计选项卡?如果我右键单击并在所述文件夹上创建xml文件,则存在设计/文本选项卡.有什么建议吗?谢谢.

Android Studio底部没有文本/设计选项卡

在Res/Layout文件夹中创建新的XML,现在存在设计/文本选项卡.

有帮助吗?这是超级奇怪的家伙......

android android-studio

5
推荐指数
3
解决办法
1万
查看次数

在android studio中尝试使用CVS之后,我的Android项目现在已经变成了红色

我正在使用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/

谢谢,托克

git github android-studio

5
推荐指数
2
解决办法
1万
查看次数

如何拖放叠加ImageButton?

我有这个使用服务激活的覆盖按钮.所以它是一个背景按钮.即使其他程序正在运行,您也可以看到该按钮.但是我在按钮上添加功能时遇到问题,当我按住它时,我可以将它拖到我想要的任何地方到屏幕上.我在这里检查了一些拖放选项,但我无法在我的程序中正确应用它.

在我的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 drag-and-drop imagebutton android-studio

2
推荐指数
1
解决办法
2772
查看次数

找不到MapActivity.Android Studio 0.5.1

我在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

2
推荐指数
1
解决办法
1万
查看次数