"Android library projects cannot be launched"?

Android

Android Problem Overview


Now I am totally confused by this error message: Android library projects cannot be launched.

I carefully checked the build path and library, everything seems "OK", and there is no error on Problems view, however, when I tried to run my application as an Android project, it failed and showed that message.

Any explanation for why it's happening is appreciated!

Android Solutions


Solution 1 - Android

From Android's Developer Documentation on Managing Projects from Eclipse with ADT:

Setting up a Library Project

>Next, set the project's Properties to indicate that it is a library project: >

  1. In the Package Explorer, right-click the library project and select Properties.
  2. In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
  3. Select the "is Library" checkbox and click Apply.
  4. Click OK to close the Properties window.

So, open your project properties, un-select the "Is Library" checkbox, and click Apply to make your project a normal Android project (not a library project).

Solution 2 - Android

Through the this steps you can .

  1. In Eclipse , Right Click on Project from Package Explorer.
  2. Select Properties,.
  3. Select Android from Properties pop up window,
  4. See "Is Library" check box,
  5. If it is checked then Unchecked "Is Library" check box.
  6. Click Apply and than OK.

Solution 3 - Android

With Me I had the library ticked under Eclipse>Project Properties>Android what I just did was uncheck the ticked library.

Solution 4 - Android

It says “Android library projects cannot be launched” because Android library projects cannot be launched. That simple. You cannot run a library. If you want to test a library, create an Android project that uses the library, and execute it.

Solution 5 - Android

In Eclipse Project -> Clean Modify project.properties like this :

target=android-10
android.library.reference.1=F:/svn/WiEngine_library

Solution 6 - Android

Through the following steps you can do it .

In Eclipse window , Right Click on your Project from Package Explorer.

  1. Select Properties,
  2. Select Android from Properties,
  3. Check "Is Library" check box,
  4. If it is checked then Unchecked "Is Library" check box.
  5. Click Apply and than OK.

Solution 7 - Android

right-click in your project and select Properties. In the Properties window -> "Android" -> uncheck the option "is Library" and apply -> Click "ok" to close the properties window.

This is the best answer to solve the problem

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDev.SintoView Question on Stackoverflow
Solution 1 - AndroidArchieView Answer on Stackoverflow
Solution 2 - AndroidRishi GautamView Answer on Stackoverflow
Solution 3 - Androidbro sjambokView Answer on Stackoverflow
Solution 4 - AndroidCristianView Answer on Stackoverflow
Solution 5 - Android修真世界View Answer on Stackoverflow
Solution 6 - AndroidNikhil KumarView Answer on Stackoverflow
Solution 7 - Androidib haView Answer on Stackoverflow