in which file we write code in android
\

Dani AI

Generated

@pajjad037 asked where to write Android code; and already pointed to the project skeleton and IDE options. Short, practical path forward (keeps older answers useful but brings current tooling up to date):

Create a new project with Android Studio (the official IDE). Pick a template like "Empty Activity" and a language (Kotlin is now recommended). Android Studio generates the activity class file for your app (where the runtime logic goes) and companion UI resource files (where layouts live). Use the Project panel in Android Studio (switch to the "Android" view) to locate the generated activity and layout quickly.

How to run and test: use the built‑in AVD Manager to create an emulator image or enable USB debugging on a real device. Run your app from the Run button; Android Studio compiles, installs and launches it on the selected target. If something does not appear, check the Run configuration and consult Logcat for runtime errors.

Quick troubleshooting tips:

  • If the IDE reports missing SDKs or Gradle errors, open SDK Manager and install the required SDK Platform and Build Tools.
  • If the emulator is slow, enable hardware acceleration or test on a physical device.
  • If your new activity does not start, confirm the launch configuration and the activity class exists in the app module the IDE is building.

Official resources to follow next: Android Studio download and docs, the "Build your first app" tutorial, emulator and Kotlin guidance. These will walk through exactly where the IDE places files and how to edit them for a working app:

This keeps 's structural advice useful while giving a current, runnable workflow for beginners.

Recommended Answers

All 3 Replies

Your question doesn't make sense. Project basic structure is usually generated by IDE or by Ant if you know how.

  • Project
    • src (java files)
    • res (folder containing resources drawable, animation, layout, menu, values etc)
    • AndroidManifest.xml

Is there any ide that could be used to make Java files for Android? It would be nice if you could test it out using the ide, if not then if there would be an Android emulator it would also be nice.

Is there any ide that could be used to make Java files for Android? It would be nice if you could test it out using the ide, if not then if there would be an Android emulator it would also be nice.

As mentioned in this post from Starting mobile development on top of the section, there are IDEs (Eclipse and IntelliJ)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.