Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8502261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:26:07+00:00 2026-06-11T01:26:07+00:00

I’m trying to start an Activity from an application that resides in an android

  • 0

I’m trying to start an Activity from an application that resides in an android library. I keep getting the following exception when I try to start the activity from application.

09-07 12:26:35.300: E/AndroidRuntime(553): FATAL EXCEPTION: main
09-07 12:26:35.300: E/AndroidRuntime(553): java.lang.IllegalStateException: Could not execute method of the activity
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.view.View$1.onClick(View.java:3044)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.view.View.performClick(View.java:3511)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.view.View$PerformClick.run(View.java:14105)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.os.Handler.handleCallback(Handler.java:605)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.os.Handler.dispatchMessage(Handler.java:92)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.os.Looper.loop(Looper.java:137)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.app.ActivityThread.main(ActivityThread.java:4424)
09-07 12:26:35.300: E/AndroidRuntime(553):  at java.lang.reflect.Method.invokeNative(Native Method)
09-07 12:26:35.300: E/AndroidRuntime(553):  at java.lang.reflect.Method.invoke(Method.java:511)
09-07 12:26:35.300: E/AndroidRuntime(553):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-07 12:26:35.300: E/AndroidRuntime(553):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-07 12:26:35.300: E/AndroidRuntime(553):  at dalvik.system.NativeStart.main(Native Method)
09-07 12:26:35.300: E/AndroidRuntime(553): Caused by: java.lang.reflect.InvocationTargetException
09-07 12:26:35.300: E/AndroidRuntime(553):  at java.lang.reflect.Method.invokeNative(Native Method)
09-07 12:26:35.300: E/AndroidRuntime(553):  at java.lang.reflect.Method.invoke(Method.java:511)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.view.View$1.onClick(View.java:3039)
09-07 12:26:35.300: E/AndroidRuntime(553):  ... 11 more
09-07 12:26:35.300: E/AndroidRuntime(553): Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.smarttech.androidlibrary.LibraryActivity.LAUNCH }
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.app.Activity.startActivityForResult(Activity.java:3190)
09-07 12:26:35.300: E/AndroidRuntime(553):  at android.app.Activity.startActivity(Activity.java:3297)
09-07 12:26:35.300: E/AndroidRuntime(553):  at com.smarttech.application.MainActivity.buttonLaunchActivity(MainActivity.java:25)
09-07 12:26:35.300: E/AndroidRuntime(553):  ... 14 more

I’m working in Eclipse, and I have created two projects – application and library.

Library is declared as an Android Library through Properties->Android->Is Library
Application references the library through Properties->Android->Add.

I followed the instructions for Managing Projects from Eclipse with ADT.

LIBRARY:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.smarttech.androidlibrary"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".LibraryActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="com.smarttech.androidlibrary.LibraryActivity.LAUNCH" />
            </intent-filter>
        </activity>
    </application>  
</manifest>

APPLICATION:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.smarttech.application"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="15" />


    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name="com.smarttech.androidlibrary.LibraryActivity">
            <intent-filter>
                <action android:name="com.smarttech.androidlibrary.LibraryActivity.LAUNCH"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

—

package com.smarttech.application;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;
    }

    public void buttonLaunchActivity(View view) {
        Intent i = new Intent("com.smarttech.androidlibrary.LibraryActivity.LAUNCH");
        startActivity(i);
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:26:09+00:00Added an answer on June 11, 2026 at 1:26 am

    This should work

    public void buttonLaunchActivity(View view) {
            Intent i = new Intent(this, LibraryActivity.class);
            startActivity(i);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.