i want to change my launching activity.for the moment my manifest is this:
<application android:icon="#drawable/iconbj" android:label="#string/app_name"
android:debuggable="true">
<activity android:name=".Main" android:label="#string/app_name" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:label="DemoPlayActivity" android:name="DemoPlayActivity" android:screenOrientation="landscape"></activity>
</application>
now I have created another activity which is a splash screen and i want to launch this instead of Main so I tried this way:
<application android:icon="#drawable/iconbj" android:label="#string/app_name"
android:debuggable="true">
<activity android:name=".Splash" android:label="#string/app_name"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="Main" android:label="Main"
android:screenOrientation="landscape">
</activity>
<activity android:label="DemoPlayActivity" android:name="DemoPlayActivity"
android:screenOrientation="landscape"></activity>
</application>
but i get thisproblem with permission:
[2011-03-31 16:32:44 - BlackJackNuovo]
ActivityManager:
java.lang.SecurityException:
Permission Denial: starting Intent {
act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER]
flg=0x10000000
cmp=com.phinet.android.blackjack/.Main
} from null (pid=-1, uid=-1) requires
null.
please help me :)
Update
NO WAY. I did this way:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.phinet.android.blackjack" android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<application android:icon="#drawable/iconbj" android:label="#string/app_name"
android:debuggable="true">
<activity android:name="com.phinet.android.blackjack.Splash" android:label="Splash"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.phinet.android.blackjack.Main" android:label="Main"
android:screenOrientation="landscape">
</activity>
<activity android:label="com.phinet.android.blackjack.DemoPlayActivity" android:name="DemoPlayActivity"
android:screenOrientation="landscape"></activity>
</application>
</manifest>
but it seems to lunch always the Main activity,this is the concole log:
[2011-04-01 10:57:10 - BlackJackNuovo] Uploading BlackJackNuovo.apk onto device '9000d365e767'
[2011-04-01 10:57:16 - BlackJackNuovo] Installing BlackJackNuovo.apk...
[2011-04-01 10:57:32 - BlackJackNuovo] Success!
[2011-04-01 10:57:32 - BlackJackNuovo] Starting activity com.phinet.android.blackjack.Main on device 9000d365e767
[2011-04-01 10:57:32 - BlackJackNuovo] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.phinet.android.blackjack/.Main }
[2011-04-01 10:57:35 - BlackJackNuovo] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.phinet.android.blackjack/.Main } from null (pid=-1, uid=-1) requires null
WHY?
<activity android:name="Main" android:label="Main"
android:screenOrientation="landscape">
</activity>
<activity android:label="DemoPlayActivity" android:name="DemoPlayActivity"
android:screenOrientation="landscape"></activity>
Should still have the leading .
<activity android:name=".Main" android:label="Main" android:screenOrientation="landscape">
</activity>
<activity android:label=".DemoPlayActivity" android:name="DemoPlayActivity"android:screenOrientation="landscape">
</activity>
This is stating it has a relative path to your Classes. You could make absolute references if you wished, i.e. "com.your.app.Main"
Related
I am using BottomNavigation Menu in my app which has 4 submenus: Address, Dashboard, Home, Notifications.
When I want to startActivity from HomeFragment to Dashboard Fragment it gives me error that I have depicted below.
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.karatasyazilim.su, PID: 21216
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.karatasyazilim.su/androidx.fragment.app.FragmentActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2069)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1717)
at android.app.Activity.startActivityForResult(Activity.java:5252)
at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:675)
at androidx.core.app.ActivityCompat.startActivityForResult(ActivityCompat.java:234)
at androidx.fragment.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:790)
at androidx.fragment.app.FragmentActivity$HostCallbacks.onStartActivityFromFragment(FragmentActivity.java:932)
at androidx.fragment.app.Fragment.startActivity(Fragment.java:1257)
at androidx.fragment.app.Fragment.startActivity(Fragment.java:1245)
at com.karatasyazilim.su.ui.home.HomeFragment$5.onClick(HomeFragment.java:333)
at android.view.View.performClick(View.java:7869)
at android.widget.TextView.performClick(TextView.java:14958)
at com.google.android.material.button.MaterialButton.performClick(MaterialButton.java:992)
at android.view.View.performClickInternal(View.java:7838)
at android.view.View.access$3600(View.java:886)
at android.view.View$PerformClick.run(View.java:29362)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:8016)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1087)
My manifest is :
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.Su">
<activity android:name=".CreateAddress"></activity>
<activity android:name=".PhoneActivation" />
<activity
android:name=".Genel"
android:label="#string/title_activity_genel" />
<activity android:name=".SignUp" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
</application>
And here is my activiy code.
Intent kalimera = new Intent(getActivity(), FragmentActivity.class);
startActivity(kalimera);
What am I doing wrong?
You're trying to start the androidx FragmentActivity class directly. This is a parent class that you should subclass to create your own Activity.
Instead, make sure that you're using the name of the Activity you want to launch instead:
Intent intent = new Intent(getActivity(), NameOfTheActivityThatYouWantToLaunch.class);
startActivity(intent);
Alternately, if you aren't trying to launch an Activity and just got this code from somewhere, simply remove those lines.
If you're trying to launch a Fragment instead, take a look at How to start Fragment from an Activity
I have a working app to which I have added 2 product flavors. This app has a menu on the first screen which allows the user to choose the next activity, which I load with an intent.
Here is AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="com.alpha.aloedu.MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.alpha.aloedu.guideddrawing.GuidedLetterDrawingActivity"
android:label="Guided Letter Drawing"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.buildvocabulary.BuildVocabularyActivity"
android:label="Image Plus Word"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.findthepicture.FindThePictureActivity"
android:label="Find the Picture"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.findtheletter.FindTheLetterActivity"
android:label="Find the Letter"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.fillintheletter.FillInTheLetterActivity"
android:label="Find the Letter"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.EndActivity"
android:label="End Activity"
android:screenOrientation="portrait" />
<activity
android:name="com.alpha.aloedu.AdminActivity"
android:label="Admin Activity"
android:theme="#style/AppTheme.NoActionBar"
android:screenOrientation="portrait"
/>
</application>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:requiresSmallestWidthDp="480"
android:resizeable="false"
android:smallScreens="false"
android:xlargeScreens="true" />
Here is the relevant portion of the gradle file:
productFlavors {
de {
applicationIdSuffix ".de"
versionName "1.1de"
}
fr {
applicationIdSuffix ".fr"
versionName "1.1fr"
}
}
Here is the source tree:
Here is the code where I load the next activity:
Intent intent = new Intent();
intent.setClassName("com.alpha.aloedu", newClassName);
currentActivity.startActivity(intent);
currentActivity.finish();
I have set a breakpoint on the second line and "newClassName" has the correct value. However, when I run the "deDebug" variant, I get an error on the third line:
android.content.ActivityNotFoundException:
Unable to find explicit activity class
{com.alpha.aloedu/com.alpha.aloedu.guideddrawing.GuidedLetterDrawingActivity};
have you declared this activity in your AndroidManifest.xml?
The class GuidedLetterDrawingActivity does exist in the main source tree, and also in AndroidManifest.xml.
Thank you for any help you can provide.
You must declare activities of each flavor in its manifest file
...\src\ de \AndroidManifest.xml
...\src\ fr \AndroidManifest.xml
Declare each new activity in manifest. Even if you change the name you have to modify the manifest file.
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".new_Activity"
android:label="#string/app_name"/>
<activity
android:name=".new_Activity2"
android:label="#string/app_name"/>
</application>
This has to be declared in main java file
Intent intent = new Intent(MainActivity.this, newActivity.class);
startActivity(intent);
Intent intent1 = new Intent(MainActivity.this, newActivity2.class);
startActivity(intent1);
execute the intent block of code as per your requirement in the same or different functions.
The app works on my Genymotion emulator but fails when running on the real device with this exception on startup:
Launching application: <package>/<package>.MainActivity.
DEVICE SHELL COMMAND: am start -D -n "<package>/<package>.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=<package>/.MainActivity }
java.lang.SecurityException: Permission Denial: starting Intent { act=<package>.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=<package>/.MainActivity } from null (pid=21943, uid=2000) not exported from uid 10204
at android.os.Parcel.readException(Parcel.java:1425)
at android.os.Parcel.readException(Parcel.java:1379)
at android.app.ActivityManagerProxy.startActivityAsUser(ActivityManagerNative.java:2204)
at com.android.commands.am.Am.runStart(Am.java:494)
at com.android.commands.am.Am.run(Am.java:109)
at com.android.commands.am.Am.main(Am.java:82)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
at dalvik.system.NativeStart.main(Native Method)
Waiting for process: <package>
Here's my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="<package>"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="<package>.MainActivity"
android:label="#string/app_name" >
</activity>
</application>
</manifest>
And MainActivity.java:
public class MainActivity extends ActionBarActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
What's going on? Why would it be trying to run as a particular user when I'm just using a normal configuration?
Change below in you menifest.xml file
<activity
android:name="<package>.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You should define your activity something like this in manifest
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#android:style/AppTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
This is a weird problem, My intent can't switch between activities in case of Android 4.0+ devices, However, on devices with android 2.2/2.3 it works fine.
This is how I define the intent for my class PhotoActivity.
public static final void startActivityForResult(Activity parent, int requestCode, String userName, String photoUrl, Bitmap preview, boolean isMugshot) {
System.out.println("photoactivity started" +requestCode+"second"+parent);
Intent intent = new Intent(parent, PhotoActivity.class)
.putExtra(USERNAME, userName)
.putExtra(PHOTOURL, photoUrl)
.putExtra(PREVIEW, preview)
.putExtra(IS_MUGSHOT, isMugshot);
parent.startActivityForResult(intent, requestCode);
}
I want to switch to this activity class as above from another class upon a particular user touch response. I define this as follows
case R.id.ImgAvatar:
PhotoActivity.startActivityForResult(this, REQUEST_SHOW_AVATOR, mUserName, avatarUrl, mAvatar, true);
break;
My code is fine since in case of android 2.3/2.2 , I can switch in between the actvities. However, while using devices with android 4.0+, Rather than switching between activities upon touch response, I am reverted back to my main activity(clueless why).
I also noticed the console output was different in both 2.2 and 4.0 version. I am still not able to guess why android 4.0 is causing trouble.
This is the log when the activity starts correctly (android 2.2/2.3),
04-11 10:29:21.665: I/System.out(924): photoactivity started userdhttp://www.l-somewhere.com/media/Users/a6cb0167255045a9a2a16bb3411bc2/Mugshot/324c3a02b252428b8676e42671e392c2.jpg
04-11 10:29:21.675: I/System.out(924): photoactivity started4096secondcom.lsomewhere.android.UserDataActivity#44ae2b80
04-11 10:29:21.845: D/dalvikvm(924): GC_EXTERNAL_ALLOC freed 1481 objects / 289856 bytes in 84ms
04-11 10:29:21.855: I/PhotoActivity(924): onCreate// **rightly called** ,switch of activity
04-11 10:29:21.855: I/pthread(924): ## thread 924 is creating thread #dalvik/vm/Thread.c:1443
04-11 10:29:21.855: I/pthread(924): ## thread 1008 is created success
04-11 10:29:25.325: D/dalvikvm(938): GC_FOR_MALLOC freed 1339 objects / 483712 bytes in 69ms
This is the log in case of android 4.0+
04-11 10:34:47.415: I/System.out(22717): photoactivity started userdhttp://www.l-somewhere.com/media/Users/a6cb0167255045a9a2a16bb3411bc2/Mugshot/324c3a02b252428b8676e42671e392c2.jpg
04-11 10:34:47.420: I/System.out(22717): photoactivity started4096secondcom.lsomewhere.android.UserDataActivity#424d6db0
04-11 10:34:47.520: D/SensorManager(22717): unregisterListener:: Listener= android.view.OrientationEventListener$SensorEventListenerImpl#4201ce20
04-11 10:34:47.525: D/Sensors(22717): Remain listener = Sending .. normal delay 200ms
04-11 10:34:47.525: I/Sensors(22717): sendDelay --- 200000000
04-11 10:34:47.525: D/SensorManager(22717): JNI - sendDelay
04-11 10:34:47.525: I/SensorManager(22717): Set normal delay = true
04-11 10:34:47.745: D/dalvikvm(24379): GC_CONCURRENT freed 184K, 10% free 12467K/13703K, paused 3ms+12ms, total 29ms
04-11 10:34:47.750: W/CursorWrapperInner(24379): Cursor finalized without prior close()
04-11 10:34:47.775: I/MainActivity(24379): RegistrationId, DeviceTocken: //**I don't know why rather than starting the photo activity, the main activity is called,**
Clearly, in case of android 4.0+ , my second activity is not called and i am reverted back to main activity. Another interesting observation is that the intent is actually called, i.e. I reach the function where I define the intent, but It seems like intent cannot start the activity, so the intent does run but It can't start the new activity. I am clueless since my code is not giving any run/compile time errors making it difficult to find out the problem. Appreciate the help.
Here is my Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.lsomewhere.android"
android:versionCode="37"
android:versionName="1.0.37" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<permission
android:name="com.lsomewhere.android.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.lsomewhere.android.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application
android:icon="#drawable/ic_launcher_72x72"
android:label="#string/app_name" >
<uses-library
android:name="com.google.android.maps"
android:required="true" />
<service
android:name=".LsCommService"
android:process=":apisrv" >
<intent-filter>
<action android:name="com.lsomewhere.android.LSAPISERVICE" />
</intent-filter>
</service>
<service android:name=".GCMIntentService" />
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.lsomewhere.android" />
</intent-filter>
</receiver>
<activity
android:name=".SplashActivity"
android:configChanges="keyboardHidden|orientation"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:configChanges="keyboardHidden|orientation"
android:label="#string/login"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="stateUnspecified|adjustPan" >
</activity>
<activity
android:name=".ProfileActivity"
android:configChanges="keyboardHidden|orientation"
android:label="#string/login"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".AvatarActivity"
android:configChanges="keyboardHidden|orientation"
android:label="#string/upload_your_photo"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".MainActivity"
android:configChanges="keyboardHidden|orientation"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".UserDataActivity"
android:configChanges="keyboardHidden|orientation"
android:label="#string/user_data"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="stateHidden" >
</activity>
<activity
android:name=".GalleryActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
>
</activity>
<activity
android:name=".PhotoActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
>
</activity>
<activity
android:name=".PasswordActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="stateVisible" >
</activity>
<activity
android:name=".AboutActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".AdvrDataActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity
android:name=".PageBase"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar" >
</activity>
<activity android:name="com.lsomewhere.android.TutorialActivity" android:theme="#android:style/Theme.Black.NoTitleBar" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation"></activity>
<activity android:name="com.kuad.ADDisplay"/>
</application>
I am getting the following error:
ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.optionpricing/.optionListNew } from null (pid=1160, uid=2000) requires null
I am new to programming in Android and I could not make sense of the other postings related to my problem. I wonder if there is an issue with the optionListNew class? Can someone lend a hand so I can move on to completing my app. Also, the app runs in my virtual device, and I only get this error when I try to test it on my actual phone.
Any ideas are appreciated. Below is the manifest file.
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="1" android:versionName="1.0"
package="com.optionpricing" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"/>
<application android:icon="#drawable/icon"
android:label="#string/app_name"
android:debuggable="true">
<activity android:name=".optionListNew">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".OptionPricing"/>
<activity android:name=".optionListNew"/>
<activity android:name=".futureOptionActivity"/>
<activity android:name=".currencyOptionActivity"/>
<activity android:name=".gapOptionActivity"/>
<activity android:name=".gapOptionList01"/>
<activity android:name=".barrierSingleUpInActivity"/>
<activity android:name=".testActivity"/>
<activity android:name=".barrierlistview"/>
<activity android:name=".barrierSingleDownInActivity"/>
</application>
</manifest>
You added "optionListNew" activity twice in the manifest file.. remove below activity by deleting this line
<activity android:name=".optionListNew"/>
Your Manifest.xml code will become
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="1" android:versionName="1.0"
package="com.optionpricing" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="8"/>
<application android:icon="#drawable/icon"
android:label="#string/app_name"
android:debuggable="true">
<activity android:name=".optionListNew">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".OptionPricing"/>
<activity android:name=".futureOptionActivity"/>
<activity android:name=".currencyOptionActivity"/>
<activity android:name=".gapOptionActivity"/>
<activity android:name=".gapOptionList01"/>
<activity android:name=".barrierSingleUpInActivity"/>
<activity android:name=".testActivity"/>
<activity android:name=".barrierlistview"/>
<activity android:name=".barrierSingleDownInActivity"/>
</application>
</manifest>
optionListNew is present twice in the manifest. Remove the second.