Note that there are some explanatory texts on larger screens.

plurals
  1. POerror: androidmanifest.xml file missing --> What am i missing?
    text
    copied!<p>Hi I am completely new to Android programming and the question I am asking might be something very simple, but I do not have any idea about how to make it work, so kindly bear with me.</p> <p>I installed android-sdk and related tools from the <a href="http://developer.android.com/training/basics/firstapp/creating-project.html">Android developer site</a>. I followed their instructions to create a HelloWorld app, but I am getting some errors which I don't understand.</p> <p>The file MainActivity.java is an auto generated file and I keep getting errors in this file in these places:</p> <pre><code>@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // error in activity_main } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); // error in activity_main return true; } </code></pre> <p>So I went and tried to look through the generated class file for layout.class and found there is no variable called activity_main there.</p> <p>Can anyone kindly suggest what to do here? Any help will be deeply appreciated.</p> <p>The directory structure shows me that I do have the AndroidManifest.xml.</p> <p>When I try to run the app, I get this specific error:</p> <pre><code> AndroidManifest.xml file missing! Unknown Android Packaging Problem </code></pre> <p>These are some of the errors that i am getting when trying to get it running :</p> <pre><code> 10-10 23:31:11.305: E/Trace(946): error opening trace file: No such file or directory (2) 10-10 23:31:11.955: E/AndroidRuntime(946): FATAL EXCEPTION: main 10-10 23:31:11.955: E/AndroidRuntime(946): android.content.res.Resources$NotFoundException: Resource ID #0x2 10-10 23:31:11.955: E/AndroidRuntime(946): at android.content.res.Resources.getValue(Resources.java:1013) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.content.res.Resources.loadXmlResourceParser(Resources.java:2098) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.content.res.Resources.getLayout(Resources.java:852) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.view.MenuInflater.inflate(MenuInflater.java:107) 10-10 23:31:11.955: E/AndroidRuntime(946): at com.example.myfirstapp.MainActivity.onCreateOptionsMenu(MainActivity.java:18) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.app.Activity.onCreatePanelMenu(Activity.java:2476) 10-10 23:31:11.955: E/AndroidRuntime(946): at com.android.internal.policy.impl.PhoneWindow.preparePanel(PhoneWindow.java:393) 10-10 23:31:11.955: E/AndroidRuntime(946): at com.android.internal.policy.impl.PhoneWindow.invalidatePanelMenu(PhoneWindow.java:747) 10-10 23:31:11.955: E/AndroidRuntime(946): at com.android.internal.policy.impl.PhoneWindow$1.run(PhoneWindow.java:2913) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.os.Handler.handleCallback(Handler.java:615) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.os.Handler.dispatchMessage(Handler.java:92) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.os.Looper.loop(Looper.java:137) 10-10 23:31:11.955: E/AndroidRuntime(946): at android.app.ActivityThread.main(ActivityThread.java:4745) 10-10 23:31:11.955: E/AndroidRuntime(946): at java.lang.reflect.Method.invokeNative(Native Method) 10-10 23:31:11.955: E/AndroidRuntime(946): at java.lang.reflect.Method.invoke(Method.java:511) 10-10 23:31:11.955: E/AndroidRuntime(946): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 10-10 23:31:11.955: E/AndroidRuntime(946): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 10-10 23:31:11.955: E/AndroidRuntime(946): at dalvik.system.NativeStart.main(Native Method) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload