error launching the android app - android

I just started learning android via the udacity 'android development for beginners' course and they asked us to make an a coffee ordering app.I pasted the MainActivity code given and clicked on run.the app got installed on my phone but doesn't launch.
Error Screenshot

MEntion pacakge name before class name like this...
com.example.abhishek.justjava.MainActivity
and also make sure you activity is present in the right destination with same name....
and plz cross check the package name if you have kept abhishek in package name or not....
also include
<uses-sdk android:minSdkVersion="7" />

You don't have MainActivity.java file in your project. Please insert Activity name correctly instead red text in your manifest.

Related

Android Error While Making an Activity

I recently Installed Android Studio 2.1 and started programming. When I tried to create an activity it showed me an error. So guys Help Me to resolve this error and thanks in advance ;)
Try setting the package name to "com.example.hina_pc.task1"
As far as I have seen, the correct package name is supplied by default when adding a new activity to a project, so this shouldn't be something that just happens without you changing anything. Essentially, you just want to make sure that the package name of the activity you are adding to the project is the same as the package name of the project.

Weird Installation

I have made two application, both having two different classes and xml files and all. however, after i have installed the first application (lets call it A) and after that, i want to install the second application (B), there is a pop up message stating "android do you want to install an update to this existing application? your existing data will not be lost. it does not require any special access."
when i press ok, A will be gone from my phone and will be replaced with B. why does this occur? can anyone help me so i can install both my apps without either one disappearing ?
The manifests of both applications have the same package name in it. That's why you get the replace notification. Change the packagename of the 2 apps.
Right click on your project, go to Android Tools, and then click on Rename Application Package.
If it is not working then follow these steps
1. Right-click on your project package name
2. Refactor > Rename.
3. change the package name in the manifest file. Inside the <manifest> tag.
4. Open each of tyour Activity files and add missing import packages (Ctrl-Shift-O)

Unfortunately (app_name) has stopped ANDROID ECLIPSE

here is the problem. I'm new with android so i was just designing a simple form with some textfields and button, nothing complicated, and it runs perfectly!
Nevertheless when i add another class in order to work with SQLite database, it doesn't run, and shows the following message: "UNFORTUNATELY, HAS STOPPED"
Please if u have any idea 'bout to fix this problema i'll be more than thankful.
PS: i'm using the ADT BUNDLE FOR WINDOWS which has Eclipse, sdk, sdk manager. just for the record.
...And just in case u ask me for the log error here it is:
Guys thanks a lot for your help! i know it's kinda boring but thanks anyway.
Here is the manifest should i add the new activity in this part of the code or where?
have you created a new activity?
every activity created must be added to the manifest file of the app otherwise the app will crash when that activity is started.
heres how you add it to the manifest:
<activity android:name="com.android.test.ActivityName"
android:label="#string/activity_label" ></activity>
where com.android.test.ActivityName is the name of the activity as it appears in the package
add that between the <application> </application> tags

What is the facebook app settings for Phonegap's facebook-plugin?

Im trying to build an Android Phonegap application with facebook-plugin.
This is my eclipse's project tree:
and this is the FB app settings form:
did i fill it correct?
It's been some time since I've built for Facebook but I'm pretty sure that the 'Package Name' needs to be your main package that the app is known by - so in your AndroidManifest.xml it will be whatever the value is for package=.... Then the Class Name is the name of the class that you want to launch from Facebook. The little [?] seems to indicate that this can be any class.
You might want to change Package Name to com.tech.map and Class Name to org.apache.cordova.facebook.ConnectPlugin....but I'm really not positive. Maybe either will work. Based on my reading of the ConnectPlugin readme, I'm not even sure that you need to do this; it looks like all you need is an APP_ID which can be found at the top of the "dashboard" page for your app.

Android emulator shows error when 2 apps with the same activity name

I have 2 projects in my Eclipse. Both of them have a activity called "MainActivity". The weird thing is, when I tried to launch the 2nd app, the emulator showed an error and pointed it to the 1st app. I can bypass this problem by changing the activity name to something different. Then everything will be fine.
I suppose this is only a emulator problem. I haven't tested it yet but I cannot image this happening on real devices, which will make Android totally unusable.
But still, I need to use the emulator and I'd like to keep the name MainActivity. Has anyone has the same experience before? Thanks in advance.
Do you also have the same package name?
Applications are distinguished by their package names so you should change those on per-project basis.
Update:
In manifest package attribute is prepended to name attribute of Activity. Combined they must be the same as your full qualified class name.
<manifest package="com.myapp">
<activity android:name=".MyActivity"/>
</manifest>

Categories

Resources