无法部署基本的Android应用程序 [英] Unable to deploy basic android app
问题描述
我刚开始尝试开发一个简单的Hello World Android应用程序。由于我使用的是AMD处理器,自带了Android Studio未工作,所以默认模拟器我已经安装genymotion模拟器。
I just started trying to develop a simple hello world android app. Since I am using an AMD processor the default emulator that comes with Android Studio isn't working so I have setup genymotion emulator.
我做了一个新的项目,只是世界您好写在上面。但是,当我尝试在模拟器中部署它,我收到以下错误
I did a new project with just hello world written in it. But when I try to deploy it in the emulator I am getting the following error
Unexpected error: package manager reports that package in.techbreeze.android.hello has not been installed: Expected string 'Package [in.techbreeze.android.hello]' not found in output: Can't find service: package
详细的错误信息如下:
Detail error message reads:
Unexpected error: package manager reports that package in.techbreeze.android.hello has not been installed: Expected string 'Package [in.techbreeze.android.hello]' not found in output: Can't find service: package
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:113)
at com.android.tools.idea.run.InstalledApks.setInstalled(InstalledApks.java:86)
at org.jetbrains.android.run.AndroidRunningState.uploadAndInstallApk(AndroidRunningState.java:1205)
at org.jetbrains.android.run.AndroidRunningState.doPrepareAndStart(AndroidRunningState.java:920)
at org.jetbrains.android.run.AndroidRunningState.prepareAndStartApp(AndroidRunningState.java:874)
at org.jetbrains.android.run.AndroidRunningState.prepareAndStartAppWhenDeviceIsOnline(AndroidRunningState.java:842)
at org.jetbrains.android.run.AndroidRunningState.doStart(AndroidRunningState.java:676)
at org.jetbrains.android.run.AndroidRunningState.start(AndroidRunningState.java:652)
at org.jetbrains.android.run.AndroidRunningState$1.run(AndroidRunningState.java:298)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
这是什么错误的可能原因是什么?从我到底是一些配置失踪?
What is the probable cause of this error? Is some configuration missing from my end?
推荐答案
您可以:
更新您的IDE最新一期(如Android工作室1.0.1)
Update your IDE to latest one (such as Android studio 1.0.1)
更改 build.gradle
来是这样的:
apply plugin: 'com.android.application'
android {
compileSdkVersion 17
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.example.hellomap"
minSdkVersion 14
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.0'
compile 'com.google.android.gms:play-services:6.5.+'
compile 'com.jakewharton:butterknife:6.0.0'
}
请确保您有最新的 buildToolsVersion
,使得 21.1.1
Make sure you have latest buildToolsVersion
such that 21.1.1
这篇关于无法部署基本的Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!