Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9030489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:30:14+00:00 2026-06-16T07:30:14+00:00

I am new to app programming, and programming in general. I am still in

  • 0

I am new to app programming, and programming in general. I am still in school for computer science (i’m a sophmore). So please take it easy on me. I hate getting bashed on forums.

My problem is that my app, which will use google maps as the main window crashes immediately. I have posted all my code below, and I am looking for any help to what I might be missing to get this app up and running (or so it does not crash immediately).

A couple things might be wrong:

1) I am now using the SHA1 debug key for this testing stage. Is this right?

2) Do I need to communicate with a type ‘GoogleMap’ in java to set starting location or anything?

3) I am testing this on my phone (Galaxy SIII) which has worked in the past on simple layouts, but might testing this google maps app need authentication that the phone cannot give?

A couple links I found helpful, up until now:
https://developers.google.com/maps/documentation/android/start#installing_the_google_maps_android_v2_api

Google Maps Android API v2 – Sample Code crashes

Notes on setup: I have added android-support-v4.jar and google-play-services.jar to my reference libraries.
Properties -> Java Build Path, Libraries

Now, Below, this is all the code I have so far!

Java file (Main.java):

package com.MYDOMAINNAME.www;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;

public class MainActivity extends FragmentActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
}
}

xml file (main layout):

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>

program manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.MYDOMAINNAME.www"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />
<permission
     android:name="com.MYDOMAINNAME.www.permission.MAPS_RECEIVE"
     android:protectionLevel="signature"/>
<uses-permission  android:name="com.MYDOMAINNAME.www.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <uses-library android:name= "com.google.android.maps" />
    <activity
        android:name="com.MYDOMAINNAME.www.Main"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <meta-data
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="MY SHA1 DEBUG KEY"/>
</application>
</manifest>

So I would ask, is there anything I need to add or subtract to get this going?

Thanks a bunch!

Log Cat:

12-22 14:45:28.482: E/Trace(10174): error opening trace file: No such file or directory (2)
12-22 14:45:28.482: D/ActivityThread(10174): setTargetHeapUtilization:0.25
12-22 14:45:28.482: D/ActivityThread(10174): setTargetHeapIdealFree:8388608
12-22 14:45:28.482: D/ActivityThread(10174): setTargetHeapConcurrentStart:2097152
12-22 14:45:28.502: D/AndroidRuntime(10174): Shutting down VM
12-22 14:45:28.502: W/dalvikvm(10174): threadid=1: thread exiting with uncaught exception (group=0x4155e438)
12-22 14:45:28.512: E/AndroidRuntime(10174): FATAL EXCEPTION: main
12-22 14:45:28.512: E/AndroidRuntime(10174): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.MYDOMAINAME.www/com.MYDOMAINAME.www.MainActivity}: java.lang.ClassNotFoundException: com.MYDOMAINAME.www.MainActivity
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2012)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2113)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.ActivityThread.access$700(ActivityThread.java:139)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1224)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.os.Handler.dispatchMessage(Handler.java:99)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.os.Looper.loop(Looper.java:137)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.ActivityThread.main(ActivityThread.java:4918)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at java.lang.reflect.Method.invokeNative(Native Method)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at java.lang.reflect.Method.invoke(Method.java:511)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at dalvik.system.NativeStart.main(Native Method)
12-22 14:45:28.512: E/AndroidRuntime(10174): Caused by: java.lang.ClassNotFoundException: com.MYDOMAINAME.www.MainActivity
12-22 14:45:28.512: E/AndroidRuntime(10174):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
12-22 14:45:28.512: E/AndroidRuntime(10174):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2003)
12-22 14:45:28.512: E/AndroidRuntime(10174):    ... 11 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:30:15+00:00Added an answer on June 16, 2026 at 7:30 am

    What did you name your java file for Main? It should be Main.java not MainActivity.java.
    If you look at the log , this line 12-22 14:04:16.043: E/AndroidRuntime(9154): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.gotonight.www/com.gotonight.www.MainActivity}: java.lang.ClassNotFoundException: com.gotonight.www.MainActivity
    its trying to find
    com.gotonight.www.MainActivity but your Main class is com.gotonight.www.Main

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to programming in general and i am having trouble getting the
I'm new to android and programming in general so go easy! I have created
I'm fairly new to programming in general. I'm working on a simple app that
I'm fairly new to VB.net and WPF (and programming in general), so please bear
New to iOS app programming. There's probably an easy fix, but I apparently don't
I'm new to the android development, and programming in general. I'm developing app to
I am new to Blackberry programming and starting my first app soon. I believe
i am new to android programming and i am trying to develop an app
I am new to android programming and i am trying to develop this app
i am new to programming and hence android programming. I'm making an android app

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.