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

  • SEARCH
  • Home
  • 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 8129285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:15:31+00:00 2026-06-06T08:15:31+00:00

I have a phonegap activity which I want to start via a button press:

  • 0

I have a phonegap activity which I want to start via a button press:

shareButton.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                Intent activity = new Intent(context, GalleryActivity.class);
                context.startActivity(activity);
            }
        });

The problem is: everytime I want to start the activity I get following error:

java.lang.NoClassDefFoundError: net.myns.lib.cutoutcam.GalleryActivity

The activity looks like that:

package net.myns.lib.cutoutcam;
import org.apache.cordova.DroidGap;

import android.os.Bundle;
import android.util.Log;

public class GalleryActivity extends DroidGap {


    private static final String TAG = "GalleryActivity";


    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
        Log.v(TAG, TAG+" initialised");
    }


}

The manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.myns.cutoutcamPro"
    android:versionCode="32"
    android:versionName="3.2" >

    <application
        android:icon="@drawable/icon"
        android:label="@string/app_name" 
        android:hardwareAccelerated="true">
        <activity
            android:name=".CutoutCamProActivity"
            android:configChanges="keyboard|orientation|keyboardHidden"
            android:label="@string/app_name"
            android:windowSoftInputMode="adjustPan" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <intent-filter>
                <action android:name="android.media.action.IMAGE_CAPTURE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <activity
            android:name="net.myns.lib.cutoutcam.PreferenceActivity"
            android:label="@string/set_preferences" >
        </activity>
        <activity
            android:name="net.myns.lib.cutoutcam.LoginActivity"
            android:label="Share image" >
        </activity>
        <activity
            android:name="net.myns.lib.cutoutcam.RegisterActivity"
            android:label="Share image" >
        </activity>
        <activity
            android:name="net.myns.lib.cutoutcam.GalleryActivity"
            android:label="All images" >
        </activity>
    </application>

    <supports-screens 
           android:largeScreens="true" 
           android:normalScreens="true" 
           android:smallScreens="true" 
           android:resizeable="true" 
           android:anyDensity="true" />


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

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />

</manifest>

The GalleryActivity is stored inside a LibraryProject, don’t know whether this makes any difference.

As soon as I replace “extends DroidGap” with “extends Activity” the activity can be started.

Someone knows whats going wrong here?

  • 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-06T08:15:34+00:00Added an answer on June 6, 2026 at 8:15 am

    Found the answer!

    I did not copy the cordova-1.8.1.jar to the libs directory directly but to libs/phonegap-phonegap-ce32a3f/lib/android/cordova-1.8.1.jar

    So keep in mind: ALWAYS copy jars into the root of libs folder!

    Thanks for your help guys…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new in phonegap development. I have one html page which contains one
Scenario I have made a phonegap 1.0.0 app which loads the current location via
I have a phonegap application which will need to take a zip archive of
I have a PhoneGap 1.4.1 / jQueryMobile 1.0.1 / Android project which is showing
I have PhoneGap-Android application and I want to check network connection type (No connection,
We have a Rails app which communicates with a PhoneGap-based iPhone app. We are
Is PhoneGap always support new version of iPhone? or we have to do some
I have started to write a plugin for PhoneGap and now I want to
I have PhoneGap app running in Android. When the app starts, it inserts approximately
I have a phonegap application targeting iPad that needs to embed a video on

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.