3

When i run a sample program am getting following error

[2013-02-01 15:13:32 - webrowser] Performing sync
[2013-02-01 15:13:32 - webrowser] Automatic Target Mode: Preferred AVD 'androidDevice' is available on emulator 'emulator-5554'
[2013-02-01 15:13:32 - webrowser] Uploading webrowser.apk onto device 'emulator-5554'
[2013-02-01 15:13:32 - webrowser] Installing webrowser.apk...
[2013-02-01 15:13:36 - webrowser] Installation error: INSTALL_FAILED_TEST_ONLY
[2013-02-01 15:13:36 - webrowser] Please check logcat output for more details.
[2013-02-01 15:13:36 - webrowser] Launch canceled!

Does anyone know the cause of this error and how to fix it?

Deep Frozen
  • 2,053
  • 2
  • 25
  • 42
SARAVANAN
  • 31
  • 1
  • 2

2 Answers2

13

For some reason, your project is building a test only APK.

Few possible fixes:

  • Remove the test-only attribute from manifest
  • Supply the '-t' argument on adb shell pm install to allow the installation of test packages
  • in my case I was using an alpha version gradle plugin " com.android.tools.build:gradle2.4.0-alpha". once I changed to a stable version, the problem went away
Mark Lu
  • 1,348
  • 1
  • 15
  • 19
0

try removing android:test-only attribute from manifest or if you didn't declare it than try uninstalling the app than restart your eclipse and emulator.Though you get problems than try removing all external libraries you have added manually by build configuration path.

kaushal trivedi
  • 3,405
  • 3
  • 29
  • 47