1. Are you ready for the Galaxy S20? Here is everything we know so far!

New to Android Development

Discussion in 'Android Development' started by Aisha91, Apr 20, 2012.

  1. Aisha91

    Aisha91 Lurker
    Thread Starter

    Hi,
    I am new to Android Development and need help with basics. I am working on a GIS application which uses geotagging. I have samples available from ArcGIS.

    On running the samples on the emulator in eclipse, it gives a message "The application ****** has stopped unexpectedly. Please try again."

    I tried a few samples, all of them show the same message.
    Also, these are sample projects. If I start a sample project, then want to add the functionality of another sample to this same project, how do I do that? I cannot choose the sample by creating a new class.

    Thanks in advance!
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Shengxin

    Shengxin Well-Known Member

    When you saw message the "The application ****** has stopped unexpectedly. Please try again.", it means some fatal errors have happened.

    The emulator comes with a handy debugging feature. You can check Debugging | Android Developers to get more details. Once you find out what causes the fatal errors, then you can fix your code accordingly.

    I am not sure what you mean " cannot choose the sample by creating a new class". In general, you can rename the second sample to a different name or put it in a different package.

    Hope this helps.
     
    Aisha91 likes this.
  3. jonbonazza

    jonbonazza Android Expert

    If you can't figure out the error after following Shengxin's advice, feel free to post the output from the log cat here and we will try our bests to help you through it.
     
    Aisha91 likes this.
  4. mg99

    mg99 Lurker

    Anyway thanks for the info. Btw, can eclipse be used for making banner apps for mobile advertising too such for mobgold or admob or adfonic?
     
  5. Aisha91

    Aisha91 Lurker
    Thread Starter

    here's the log cat of the project

    04-23 12:29:58.959: W/ActivityThread(276): Application com.esri.arcgis.android.samples.addbingmap is waiting for the debugger on port 8100...
    04-23 12:29:58.989: I/System.out(276): Sending WAIT chunk
    04-23 12:29:59.229: I/dalvikvm(276): Debugger is active
    04-23 12:29:59.399: I/System.out(276): Debugger has connected
    04-23 12:29:59.409: I/System.out(276): waiting for debugger to settle...
    04-23 12:29:59.669: I/System.out(276): waiting for debugger to settle...
    04-23 12:29:59.869: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:00.069: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:00.279: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:00.479: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:00.689: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:00.889: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:01.099: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:01.299: I/System.out(276): waiting for debugger to settle...
    04-23 12:30:01.519: I/System.out(276): debugger has settled (1325)
    04-23 12:30:02.119: E/dalvikvm(276): Could not find class 'com.esri.android.map.MapView', referenced from method com.esri.arcgis.android.samples.addbingmap.AddBingMap.onCreate
    04-23 12:30:02.129: W/dalvikvm(276): VFY: unable to resolve check-cast 6 (Lcom/esri/android/map/MapView;) in Lcom/esri/arcgis/android/samples/addbingmap/AddBingMap;
    04-23 12:30:02.129: D/dalvikvm(276): VFY: replacing opcode 0x1f at 0x000e
    04-23 12:30:02.139: D/dalvikvm(276): VFY: dead code 0x0010-001f in Lcom/esri/arcgis/android/samples/addbingmap/AddBingMap;.onCreate (Landroid/os/Bundle;)V
    04-23 12:30:02.249: I/dalvikvm(276): Could not find method com.esri.android.map.MapView.pause, referenced from method com.esri.arcgis.android.samples.addbingmap.AddBingMap.onPause
    04-23 12:30:02.249: W/dalvikvm(276): VFY: unable to resolve virtual method 6: Lcom/esri/android/map/MapView;.pause ()V
    04-23 12:30:02.249: D/dalvikvm(276): VFY: replacing opcode 0x6e at 0x0005
    04-23 12:30:02.249: D/dalvikvm(276): VFY: dead code 0x0008-0008 in Lcom/esri/arcgis/android/samples/addbingmap/AddBingMap;.onPause ()V
    04-23 12:30:02.329: I/dalvikvm(276): Could not find method com.esri.android.map.MapView.unpause, referenced from method com.esri.arcgis.android.samples.addbingmap.AddBingMap.onResume
    04-23 12:30:02.329: W/dalvikvm(276): VFY: unable to resolve virtual method 8: Lcom/esri/android/map/MapView;.unpause ()V
    04-23 12:30:02.339: D/dalvikvm(276): VFY: replacing opcode 0x6e at 0x0005
    04-23 12:30:02.339: D/dalvikvm(276): VFY: dead code 0x0008-0008 in Lcom/esri/arcgis/android/samples/addbingmap/AddBingMap;.onResume ()V
     
  6. Aisha91

    Aisha91 Lurker
    Thread Starter

    actually i have some sample projects...with a function in each...i want to make a project with all those functionalities...and want to combine those projects

    any idea how i should do that?
     
  7. Shengxin

    Shengxin Well-Known Member

    The error seems to be pretty clear. The log says "Could not find class 'com.esri.android.map.MapView', referenced from method com.esri.arcgis.android.samples.addbingmap.AddBing Map.onCreate". This means com.esri.android.map.MapView could not be found in the src folder or classpath. Do you have it in source file format or binary format available to your project?

    For the question of "make a project with all those functionalities", yes for sure you can combine them. However, how to combine them depends on what is structure of these examples. If each one has their own main activity and utility classes, you need to specify all activities in the manifest file then specify a way to invoke one activity from another.

    Hope this helps.
     
    Aisha91 likes this.
  8. Aisha91

    Aisha91 Lurker
    Thread Starter

    thank you so much for your reply..but i am totally lost in this android programming. Could you please tell me how I can solve this problem? I don't know about the format..I have these samples,and although they're supposed to work fine according to the tutorial,all of them show the same problem. ArcGISAndroidSDK_1_1 is the source of these samples and it contains .jar files.

    Yes,these examples have the main activity and utility classes of their own,and can work individually as well.

    manifest file is the .xml file right?

    I got this solution to combine projects from the web:

    android - Combining packages from different projects into a single project in eclipse - Stack Overflow

    Are they fine to work with? I tried, but as I am not getting results for a single project due to the class problem, I do not know if they do combine fine.

    thanks again and sorry for asking such basic questions, but I am new and have taken part in a competition. The submission date is just some days far, and I have no clue what i am doing.

    I really appreciate your help:)
     
  9. Shengxin

    Shengxin Well-Known Member

    Aisha91 likes this.
  10. Aisha91

    Aisha91 Lurker
    Thread Starter

    Does there have to be a layout named'MapView'? If so,I do not have in my project.Could you please tell me how can I get it into the project?

    I also have all source folders in the project.Even mapview, don't know why it's showing this kind of error. I need help with this project and I need to complete it within a few days,but I;m stuck due to this error and can't proceed.I'm facing this same problem in all my projects,even though every one of them I tried is a sample provided by ArcGIS. I'd appreciate help asap.

    Thanks
     
Loading...

Share This Page

Loading...