渲染问题:Android Studio

时间:2014-08-01 05:58:20

标签: android-studio

我刚刚下载了Android Studio,当我尝试创建Android Wear项目时,它说:

  

渲染期间引发异常:android.support.wearable.view.WatchViewStub.requestApplyInsets()"。

我不知道这意味着什么,或者我如何修复它。我唯一的猜测可能是SDK?这就是我所拥有的:

android {
    compileSdkVersion 20
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.example.helloworld.myapplication"
        minSdkVersion 20
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.google.android.support:wearable:+'
    compile 'com.google.android.gms:play-services-wearable:+'
}

这是错误:

error image

如果有人有任何想法,我将非常感激!

由于

编辑:

<?xml version="1.0" encoding="utf-8"?>
<android.support.wearable.view.WatchViewStub
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/watch_view_stub"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:rectLayout="@layout/rect_activity_my"
    app:roundLayout="@layout/round_activity_my"
    tools:context=".MyActivity"
    tools:deviceIds="wear">
</android.support.wearable.view.WatchViewStub>

0 个答案:

没有答案