google-play-services

Sysprogs forums Forums VisualGDB google-play-services

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #861
    rgold
    Participant

    I am still new at Android development and have been primarily using visualGDB. I am trying to get google play into my app, but have been running into issues.
    I was wondering if VisualGDB has any formal way of including external .jar files, like inlcude paths, or if I should be modifying the .mk directly.

    I ended up copying the jar file (google-play-services.jar ) directly into my libs folder, and that is allowing everything compile, but when I run I’m getting these types of errors:

    W/dalvikvm(16897): VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
    W/dalvikvm(16897): VFY: unable to resolve static field 469 (common_google_play_services_install_title) in Lcom/google/android/gms/R$string;

    when I call this from my activity.
    GooglePlayServicesUtil.isGooglePlayServicesAvailable(this.getApplicationContext());

    Does anyone have any ideas what I’m doing wrong?

    #3268
    rgold
    Participant

    One current lead I have was a post about a different topic, but stated:

    “… must be included as Android library projects rather than as jar files. This allows for the resources used in the library to be added to the resources of the main project.”

    I was looking at my errors on the device which was different from the emulator:
    VFY: unable to find class referenced in signature (Landroid/support/v4/app/Fragment;)
    Could not find method android.app.AlertDialog$Builder., referenced from method com.google.android.gms.common.GooglePlayServicesUtil.a

    So, I think it comes down to how I am including the googl-play-services library as just a JAR file. In VisualGDB is there a formal way to go about adding an external android library?

    #3269
    ket
    Participant

    Hi,

    VisualGDB uses Apache Ant to build the Java part of Android apps. That means you should follow the steps of adding Java libraries to Ant projects. Alternatively you can also import the Android manifest to eclipse and use the ADT plugin to add the library, the project files used by ADT and Ant are the same and any change made in eclipse will be used by Ant during building as well. Normally referenced jar files are simply copied into the libs folder.

    #3267
    rgold
    Participant

    Thanks for the reply.
    Is there a good palce to see the steps for adding Java libraries to Ant projects?
    The reason I was using VisualGDB is so I didn’t have to deal with Eclipse. But it seems that I may have no choice. Andriod NDK development has proven to be one of the most painful experiences of my career. 🙁

    you can also import the Android manifest to eclipse and use the ADT plugin to add the library, the project files used by ADT and Ant are the same and any change made in eclipse will be used by Ant during building as well. Normally referenced jar files are simply copied into the libs folder.

    Does anyone know if I could use Google’s Android Studio to do the same thing? I’d rather use that than Eclipse.

    I think I actually am adding them correctly, I just want to make sure the problems I was having wasn’t because I was doing that wrong.

    #3270
    ket
    Participant

    Hi,

    VisualGDB handles the c/c++ parts of Android development. We do recommend using a Java IDE in parallel e.g. for co-debugging. You could try using Android Studio, but it uses a different project format. If you import the project to it with choosing to maintain a link to the eclipse project format, then it could work. The other option is to edit the project files yourself, but that is not very well documented (e.g. http://developer.android.com/tools/projects/projects-cmdline.html). Importing the project to eclipse is quite a lightweight solution and will not add many additional files.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.