Aashish Gulabani
Aashish Gulabani

Reputation: 141

Unresolved class : Unable to find explicit activity class from JAR file

I am adding a module to my project for which i have to add the activity tag in my AndroidManifest file like below:

<activity
    android:name="com.paytm.pgsdk.PaytmPGActiviy"
    android:configChanges="keyboardHidden|orientation|keyboard"
    android:screenOrientation="portrait">
</activity>

But i am getting an error Unresolved class 'PaytmPGAcitvity at android:name line.

I have tried to add the dependency by:

The project get build and the APK is installed but it give the following error where this PaytmPGActivity is used.

com.abc.activities/.xyzActivity, isShadow:false t1246}
02-28 12:39:10.070 25995-25995/com.washkart.activities
W/System.err:android.content.ActivityNotFoundException: 
Unable to find explicit activity class {com.abc.activities/com.paytm.pgsdk.PaytmPGActivity}; 
have you declared this activity in your AndroidManifest.xml?

It is trying to search for activity in my base package i.e. in manifest tag package="com.abc.activities",And the PaytmPGActivity.class in located in the JAR file. How do resolve this issue so that it takes the activity from JAR module instead of the app module.

TIA

Upvotes: 1

Views: 1282

Answers (1)

Asutosh Panda
Asutosh Panda

Reputation: 1473

For this piece of code in your manifest -

<activity
 android:name="com.paytm.pgsdk.PaytmPGActiviy"
 android:configChanges="keyboardHidden|orientation|keyboard"
 android:screenOrientation="portrait">
</activity>

Change it to -

<activity
 android:name="com.paytm.pgsdk.PaytmPGActivity"
 android:configChanges="keyboardHidden|orientation|keyboard"
 android:screenOrientation="portrait">
</activity>

Its a spelling mistake in Paytm documentation. PaytmPGActiviy should be changed to PaytmPGActivity

Upvotes: 1

Related Questions