我一直在尝试自己制作一个简单的默认 android wear 应用程序,然后按照以下说明操作:http ://www.sitepoint.com/hands-android-wear-developer-sdk/ 。
在我为我命名为“手表”的 Wear VD 的 AVD 管理器中点击“开始...”然后点击“启动”按钮时,我收到此错误(与 Square 相同):
Starting emulator for AVD 'watch'
emulator: ERROR: unknown skin name 'AndroidWearRound'
这是我的 build.gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
defaultConfig {
applicationId "com.tbse.wearapp"
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'])
wearApp project(':wear')
compile 'com.google.android.gms:play-services-wearable:+'
// You must install or update the Support Repository through the SDK manager to use this dependency.
compile 'com.android.support:support-v13:20.+'
}
我想我已经从 SDK Manager 安装了所有正确的东西。
我如何导入这个圆形或方形皮肤?
回应 Wayne Piekarski 的回答:
我通过 Android Studio 打开了 AVD 并删除了我的手表模拟器。我打开了 SDK 管理器并删除并重新安装了 API 20 4.4W。然后我从命令行尝试,它仍然找不到皮肤:
toddbsmithmbp:tools tbsmith$ pwd
/Applications/Android Studio Beta.app/sdk/tools
toddbsmithmbp:tools tbsmith$ ./android create avd --force -n WatchSquare --target "android-20" --device "Android Wear Square" --skin AndroidWearSquare --abi android-wear/armeabi-v7a
Created AVD 'WatchSquare' based on Android 4.4W, Android wear ARM (armeabi-v7a) processor,
with the following hardware config:
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.dPad=yes
hw.device.hash2=MD5:f0b5528a2769367d5624a75b0c789fe4
hw.device.manufacturer=Google
hw.device.name=Android Wear Square
hw.gps=yes
hw.keyboard=yes
hw.keyboard.lid=yes
hw.lcd.density=240
hw.mainKeys=yes
hw.sdCard=no
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
toddbsmithmbp:tools tbsmith$ ./emulator -avd WatchSquare -port 5560 &
[1] 43195
toddbsmithmbp:tools tbsmith$ emulator: ERROR: unknown skin name 'androidwearsquare'