Every time I try to run an Android project from Eclipse with the Android plugin (Run -> Run), the emulator starts up just fine, but the upload fails, and the Console puts out this error message:
[2010-06-17 08:17:55 - HelloAndroid] Failed to upload HelloAndroid.apk on device 'emulator-5554'
[2010-06-17 08:17:55 - HelloAndroid] java.io.IOException: Unable to upload file: Local file doesn't exist.
[2010-06-17 08:17:55 - HelloAndroid] Launch canceled!
It seems as though the apk compilation is failing, but there are no other errors in the Console at all except for a lone warning about the project not specifying an API Level requirement:
[2010-06-17 08:17:55 - HelloAndroid] WARNING: Application does not specify an API level requirement!
[2010-06-17 08:17:55 - HelloAndroid] Device API version is 8 (Android 2.2)
Make sure your manifest file specifies the sdk:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8"/>
In fact, the APK file has not been generated. Try to see if there are compiling errors. If not, try to compile the project by yourself. You can read these interesting articles:
How to build Android application package (.apk) from the command line using the SDK tools + continuously integrated using CruiseControl
Developing Android without Eclipse or Ant
Related
I am trying to run my application on either an emulator or my device. When I click the "run" button at the top of Android Studio, the app is not running but simply listing the message below:
/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/bin/java "-Dgradle.home=/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1" -Dtools.jar=/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/lib/tools.jar -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/Android Studio.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/groovy-all-2.4.4.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/ant-1.9.6.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/ant-launcher-1.9.6.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-base-services-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-base-services-groovy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-cli-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-core-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-docs-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-installation-beacon-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-jvm-services-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-launcher-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-logging-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-messaging-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-model-core-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-model-groovy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-open-api-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-process-services-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-resources-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-tooling-api-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-ui-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/gradle-wrapper-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-announce-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-antlr-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-build-comparison-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-build-init-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-code-quality-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-dependency-management-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-diagnostics-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ear-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ide-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ide-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ide-play-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-ivy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-jacoco-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-javascript-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-jetty-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-groovy-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-java-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-jvm-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-language-scala-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-maven-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-osgi-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-base-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-jvm-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-platform-play-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-plugin-development-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-plugin-use-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-plugins-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-publish-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-reporting-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-resources-http-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-resources-s3-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-resources-sftp-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-scala-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-signing-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-sonar-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-test-kit-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-testing-base-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-testing-jvm-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-testing-native-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/gradle-tooling-api-builders-2.14.1.jar:/Applications/Android Studio.app/Contents/gradle/gradle-2.14.1/lib/plugins/ivy-2.2.0.jar:/Applications/Android Studio.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.gradle.launcher.GradleMain --build-file /Users/troychuinard/Code/FanPolls/app/build.gradle
Incremental java compilation is an incubating feature.
:app:help
Welcome to Gradle 2.14.1.
To run a build, run gradle <task> ...
To see a list of available tasks, run gradle tasks
To see a list of command-line options, run gradle --help
To see more detail about a task, run gradle help --task <task>
BUILD SUCCESSFUL
Total time: 8.841 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html
Process finished with exit code 0
The prompt is never appearing that asks me to select a deployment target. What is the setting in Android Studio to enable?
To enable the Deployment Target Dialog go to Run -> Edit Configuration -> Android App (app) -> Target: Open Select Deployment Target Dialog
Besides that you also have to enable developer mode on your device and have the drivers installed via the SDK manager or the manufacturer.
To check if your device is recognized you can use adb devices and it should be listed.
The adb is located under the platform-tools e.g.
C:\Users\You\AppData\Local\Android\sdk\platform-tools
I found that the android build tools version 25.0.0 resolves this issue, I was previously using 25.0.1 and it was not loading the device chooser:
android {
compileSdkVersion 24
buildToolsVersion '25.0.0'
}
Anyone able to run with the latest build tools?
I'm using Genymotion along with Android Studio using the plug-in and no matter what I do it does not allow me to run the app using the Genymotion emulator.. it gives errors like this:
Waiting for device.
Target device: genymotion-samsung_galaxy_s4___4_4_2___api_19___1080x1920-192.168.56.101:5555
Uploading file
local path: C:\Users\zd\AndroidStudioProjects\funfacts2\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/Taha.funfacts2
Installing Taha.funfacts2
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/Taha.funfacts2"
WARNING: linker: libdvm.so has text relocations. This is wasting memory and is a security risk. Please fix.
pkg: /data/local/tmp/Taha.funfacts2
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
This is running on just a test app that outputs Hello World on the screen, with some basic formatting.
This question already has answers here:
Failed to install myapp.apk on device 'emulator-5554'
(3 answers)
Closed 8 years ago.
i have developed simple android project to display hello world!!!! but i am getting an error when i run the san project in android eclipse
[2014-03-03 11:07:58 - SAN] ------------------------------
[2014-03-03 11:07:58 - SAN] Android Launch!
[2014-03-03 11:07:58 - SAN] adb is running normally.
[2014-03-03 11:07:58 - SAN] Performing com.san.MainActivity activity launch
[2014-03-03 11:07:58 - SAN] Automatic Target Mode: Preferred AVD 'BOB' is available on emulator 'emulator-5554'
[2014-03-03 11:07:58 - SAN] Uploading SAN.apk onto device 'emulator-5554'
till this it is running fine but after this statement
[2014-03-03 11:07:59 - SAN] Failed to install SAN.apk on device 'emulator-5554': No such file or directory
[2014-03-03 11:07:59 - SAN] com.android.ddmlib.SyncException: No such file or directory
[2014-03-03 11:07:59 - SAN] Launch canceled!
can anyone help in rectifying this error as fast as possible
try this..,it happens soetime
Try window->show view->devices->view menu->Reset adb and again run application.
and this also
rightclick on your project--->Run As --->Run Configuration.---->
here you will get window
just folow that..,and try to run..,it will work.
The problem is that Eclipse is not able to finding your apk file. Just try with clean your project from eclips.
Here is same problem faced by one of the developer.
Failed to install *.apk on device '*': Local path doesn't exist
Delete gen and bin folders. Then clean your project and again build and run.
Restart your emulator and run the project.
If still your problem is not solved try this
Follow this stackoverflow answers
Stackoverflow
Here are many great answers which can solve your problem too. Thanks.
Now, I am trying to modify the original code about the contact part in android packages\apps\Contacts.
My compiler environment is eclpise + JDK1.7 + WIN7 (64)+AndroidSDK(2.3.3)
The program compiled is correct,but Simulator run error.
bellow Console:
[2012-09-16 15:14:46 - com.android.contacts.DialtactsActivity] WARNING: Application does not specify an API level requirement!
[2012-09-16 15:14:46 - com.android.contacts.DialtactsActivity] Device API version is 10 (Android 2.3.6)
[2012-09-16 15:14:46 - com.android.contacts.DialtactsActivity] Uploading com.android.contacts.DialtactsActivity.apk onto device 'emulator-5554'
[2012-09-16 15:14:48 - com.android.contacts.DialtactsActivity] Installing com.android.contacts.DialtactsActivity.apk...
[2012-09-16 15:14:56 - com.android.contacts.DialtactsActivity] Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE
[2012-09-16 15:14:56 - com.android.contacts.DialtactsActivity] Please check logcat output for more details.
[2012-09-16 15:14:57 - com.android.contacts.DialtactsActivity] Launch canceled!
Bellow Logcat errors:
Package com.android.contacts has no signatures that match those in shared user android.uid.phone; ignoring!
From the net get solution,I get rid of code
" android:sharedUserId="android.uid.shared"
android:sharedUserLabel="#string/sharedUserLabel" " in AndroidManifest.xml.
that is ok.
but There was a new error.
"Could not find class 'com.android.phone.CallLogAsync', referenced from method com.android.contacts.TwelveKeyDialer.<init>"
"Could not find class 'com.android.phone.CallLogAsync$GetLastOutgoingCallArgs', referenced from method com.android.contacts.TwelveKeyDialer.queryLastOutgoingCall"
run is error. I don't have a solution. can you give me some guidance Suggestions?
I have created an app and it runs successfully in the emulator. When I was trying to run it in any of my devices it shows the following error:
[2011-02-12 09:57:06 - FirstImage] Android Launch!
[2011-02-12 09:57:06 - FirstImage] adb is running normally.
[2011-02-12 09:57:06 - FirstImage] Performing com.gis.image.FirstImage activity launch
[2011-02-12 09:57:23 - FirstImage] Uploading FirstImage.apk onto device 'HT96WKF01291'
[2011-02-12 09:57:32 - FirstImage] Installing FirstImage.apk...
[2011-02-12 09:57:52 - FirstImage] Re-installation failed due to different application signatures.
[2011-02-12 09:57:52 - FirstImage] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-02-12 09:57:52 - FirstImage] Please execute 'adb uninstall com.gis.image' in a shell.
[2011-02-12 09:57:52 - FirstImage] Launch canceled!
What is the issue and how can I overcome it?
You have installed this .apk before, and it was compiled using a different signature (see here for details). To fix this you need to remove the previous installation (you have to do that only when the signature has changed - not normally).
On the device itself, go Menu->Settings->Manage Applications. Select the application which you want to Uninistall, and click on the ‘Uninstall’ button. Now try your install.
When you install the application directly from eclipse it is signed by a different certificate than the one you use when you create the application for market.
What is most likely happening is that you have the app installed with a different signature than the one you are trying to install now.
Some times this happens, when you keep on installing the app through your code then it sometimes gives such kind of error..To over come this Just Open a terminal And paste this
adb uninstall com.gis.image
This is according to your Above error log...
You Just need to Uninstall your app from the Device.. Just like it :)
Hope this Helps....