I have a runtime error on my stock quoting application. I have an app where you input your a stock (as in stock market) code and will list it with two buttons. One button to display a quote and the other to view more info from the web. The web function is fine but the app crashes when I hit the quote button.
LogCat is asking me whether I declared my activity in my AndroidManifest.xml
. I am still new to Android development so this is the best of which I can analyze the problem. I am not sure where to look for these errors.
Just use 'mstf' as a stock code if you need to test a fix.
You can find my app here: https://github.com/xamroc/StockQuote/tree/bug-quote
I would also appreciate any tips on debugging tools or techniques for Android.
In this article, I’ll be exploring everything you need to know about the AndroidManifest.xml file, ranging from the Manifest attributes that are present in every single Android project, through to communicating with other applications via intent filters, and even how to merge multiple Manifests inside the same Android project.
manifest is the root element of the AndroidManifest.xml file. It has package attribute that describes the package name of the activity class. application is the subelement of the manifest.
To declare your activity, open your manifest file and add an <activity> element as a child of the <application> element. For example: <manifest ... > <application ... > <activity android:name=".ExampleActivity" /> ... </application ... > ... </manifest >
You must declare your activity in the manifest file in order for it to be accessible to the system. To declare your activity, open your manifest file and add an <activity> element as a child of the <application> element. For example:
You have two activities in your package, but have only declared one in manifest.
Declare the other Activity class:
Add this to your manifest:
<activity android:name="com.example.stockquote.StockInfoActivity" android:label="@string/app_name" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With