Using the command adb shell am start -a com.myfit.sugatmanshakya.my_fit.LoginActivity
throws out the following error:
> Activity not started, unable to resolve intent, flg=0x10000000
Part of my AndroidManifest.xml
code:
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="1" android:versionName="1.0" package="com.myfit.sugatmanshakya.my_fit"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.myfit.sugatmanshakya.my_fit.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.myfit.sugatmanshakya.my_fit.permission.C2D_MESSAGE" />
<application android:theme="@style/AppTheme" android:label="@string/app_name" android:icon="@drawable/transparent_logo" android:debuggable="true" android:allowBackup="true" android:supportsRtl="true" android:roundIcon="@mipmap/ic_launcher_round" android:appComponentFactory="android.support.v4.app.CoreComponentFactory">
<activity android:name="com.myfit.sugatmanshakya.my_fit.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.myfit.sugatmanshakya.my_fit.LoginActivity" />
<activity android:name="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Healthy Facts" android:name="com.myfit.sugatmanshakya.my_fit.HealthyFactsActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Help" android:name="com.myfit.sugatmanshakya.my_fit.HelpActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Note Exercise" android:name="com.myfit.sugatmanshakya.my_fit.CatalogActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:name="com.myfit.sugatmanshakya.my_fit.ExerciseEditorActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.CatalogActivity" />
<provider android:name="com.myfit.sugatmanshakya.my_fit.Database.ExerciseProvider" android:exported="false" android:authorities="com.myfit.sugatmanshakya.my_fit" />
<activity android:label="Send Feedback" android:name="com.myfit.sugatmanshakya.my_fit.FeedbackActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Workouts" android:name="com.myfit.sugatmanshakya.my_fit.DetailedWorkOutActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Healthy Facts" android:name="com.myfit.sugatmanshakya.my_fit.FatBurnActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Legs" android:name="com.myfit.sugatmanshakya.my_fit.LegActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Abs" android:name="com.myfit.sugatmanshakya.my_fit.AbsActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Butt" android:name="com.myfit.sugatmanshakya.my_fit.ButtActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Core" android:name="com.myfit.sugatmanshakya.my_fit.CoreActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Arms" android:name="com.myfit.sugatmanshakya.my_fit.ArmsActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
<activity android:label="Strength" android:name="com.myfit.sugatmanshakya.my_fit.StrengthActivity" android:parentActivityName="com.myfit.sugatmanshakya.my_fit.WorkoutsActivity" />
So what should I do?
adb shell am start -a com.myfit.sugatmanshakya.my_fit.LoginActivity
-a
is for an action string. You do not have an action string on this activity:
<activity android:name="com.myfit.sugatmanshakya.my_fit.LoginActivity" />
Instead, use:
adb shell am start -n com.myfit.sugatmanshakya.my_fit/com.myfit.sugatmanshakya.my_fit.LoginActivity
(replace the first com.myfit.sugatmanshakya.my_fit
with your application ID, if that is not already your application ID)
User contributions licensed under CC BY-SA 3.0