Guava ImmutableList static function checkNotNull not found - java

I'm pretty new with Java and Android Studio, because I mainly work under Xamarin.
I'm implementing a voice recognition project (originally developed in Xamarin but now unusable dued to great latencies introduced somewhere by Google) trying to use the new (still beta) cloud speech recognition.
I've downloaded a sample from here and tried to work with it, but I'm facing a strange (for me) problem. The SpeechSettings object is using an ImmutableList to hold del default API scope, but I've a lot of errors when the ImmutableList add("something").build() try to call the checkNotNull function. I've extracted the creation of the list off from the SpeechSettings object creation and I've placed it on a Button's click event for simplicity. The creation (or better, the insertion of a String element) causes the same error list.
This is the code of the click listener :
bRecon.setOnClickListener(new View.OnClickListener()
{
#Override
public void onClick(View v)
{
try
{
ImmutableList<String> lTest = ImmutableList.String>builder().add("132").build();
}
catch (Exception ilEx)
{
}
SpeechRecon sr = new SpeechRecon();
});
}
and this is the relative LogCat output when the ImmutableList is created :
11-24 13:26:03.007 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkNotNull, referenced from method com.google.common.collect.ImmutableList.copyOf
11-24 13:26:03.007 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26168: Lcom/google/common/base/Preconditions;.checkNotNull (Ljava/lang/Object;)Ljava/lang/Object;
11-24 13:26:03.007 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000
11-24 13:26:03.017 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Joiner.appendTo, referenced from method com.google.common.collect.ImmutableCollection.toString
11-24 13:26:03.017 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve virtual method 26143: Lcom/google/common/base/Joiner;.appendTo (Ljava/lang/StringBuilder;Ljava/lang/Iterable;)Ljava/lang/StringBuilder;
11-24 13:26:03.017 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x6e at 0x0013
11-24 13:26:03.022 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkNotNull, referenced from method com.google.common.collect.ImmutableList$Builder.add
11-24 13:26:03.022 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26168: Lcom/google/common/base/Preconditions;.checkNotNull (Ljava/lang/Object;)Ljava/lang/Object;
11-24 13:26:03.022 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0002
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkArgument, referenced from method com.google.common.collect.Lists.computeArrayListCapacity
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26164: Lcom/google/common/base/Preconditions;.checkArgument (Z)V
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0003
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkNotNull, referenced from method com.google.common.collect.Lists.newArrayList
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26168: Lcom/google/common/base/Preconditions;.checkNotNull (Ljava/lang/Object;)Ljava/lang/Object;
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkNotNull, referenced from method com.google.common.collect.Lists.newArrayList
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26168: Lcom/google/common/base/Preconditions;.checkNotNull (Ljava/lang/Object;)Ljava/lang/Object;
11-24 13:26:03.027 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000
11-24 13:26:03.032 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkNotNull, referenced from method com.google.common.collect.Lists.newArrayList
11-24 13:26:03.032 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26168: Lcom/google/common/base/Preconditions;.checkNotNull (Ljava/lang/Object;)Ljava/lang/Object;
11-24 13:26:03.032 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000
11-24 13:26:03.032 31057-31057/it.sia.cloudspeechrpcjava I/dalvikvm: Could not find method com.google.common.base.Preconditions.checkNotNull, referenced from method com.google.common.collect.Lists.partition
11-24 13:26:03.032 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to resolve static method 26168: Lcom/google/common/base/Preconditions;.checkNotNull (Ljava/lang/Object;)Ljava/lang/Object;
11-24 13:26:03.032 31057-31057/it.sia.cloudspeechrpcjava D/dalvikvm: VFY: replacing opcode 0x71 at 0x0000
11-24 13:26:03.037 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/common/base/Function;)
11-24 13:26:03.037 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/common/base/Function;)
11-24 13:26:03.042 31057-31057/it.sia.cloudspeechrpcjava W/dalvikvm: VFY: unable to find class referenced in signature (Lcom/google/common/base/Function;)
and here is my gradle.build file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "it.sia.cloudspeechrpcjava"
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
pickFirst 'META-INF/io.netty.versions.properties'
exclude 'META-INF/INDEX.LIST'
}
}
dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile 'com.google.code.findbugs:jsr305:3.0.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.0.1'
compile files('libs/guava-gwt-20.0.jar')
compile files('libs/guava-collections-r03.jar')
compile files('libs/gax-0.0.25.jar')
compile files('libs/grpc-all-1.0.1.jar')
compile files('libs/grpc-core-1.0.1.jar')
compile files('libs/grpc-core-proto-0.0.6.jar')
compile files('libs/grpc-google-cloud-speech-v1beta1-0.1.3.jar')
compile files('libs/joda-time-2.9.6.jar')
compile files('libs/protobuf-java-3.1.0.jar')
}
If any of you can point me toward a possible solution it would be great.
Thanks.
Rodolfo.

compile files('libs/guava-collections-r03.jar') "Guava-Collections" has not been updated for 6 years and depends on a few other libraries that you haven't downloaded and included.
guava-primitives is described as "libraries that include utility classes," so it probably contains the missing Preconditions class.
Replace guava-collections with the latest version of guava (20.0) and it will probably work.
I also recommend learning about automatic dependency management because manually downloading libraries and making sure the dependencies of those libraries are present will get very confusing very quickly.

Related

Use Tesseract ocr in Android studio but the program exits unexpectedly

I'm using Tesseract in Android Studio to recognize texts in a picture. When I call the following function like this:
String textResult = doOcr(bitmapTreated,"eng");
Then the program exits.
public String doOcr(Bitmap bitmap, String language) {
TessBaseAPI baseApi = new TessBaseAPI();
baseApi.init(getSDPath(), language);
bitmap = bitmap.copy(Bitmap.Config.ARGB_8888, true);
baseApi.setImage(bitmap);
String text = baseApi.getUTF8Text();
baseApi.clear();
baseApi.end();
return text;
}
Here are the results:
06-24 21:37:23.205 30643-30643/? D/dalvikvm: Late-enabling CheckJNI
06-24 21:37:23.335 30643-30643/com.example.text_recognization D/dalvikvm: GetMethodID: not returning static method Landroid/os/Process;.getTotalMemory ()J
06-24 21:37:23.335 30643-30643/com.example.text_recognization D/dalvikvm: GetMethodID: not returning static method Landroid/os/Process;.getFreeMemory ()J
06-24 21:37:23.365 30643-30643/com.example.text_recognization I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
06-24 21:37:23.365 30643-30643/com.example.text_recognization W/dalvikvm: VFY: unable to resolve virtual method 422: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
06-24 21:37:23.365 30643-30643/com.example.text_recognization D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
06-24 21:37:23.365 30643-30643/com.example.text_recognization I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
06-24 21:37:23.365 30643-30643/com.example.text_recognization W/dalvikvm: VFY: unable to resolve virtual method 444: Landroid/content/res/TypedArray;.getType (I)I
06-24 21:37:23.365 30643-30643/com.example.text_recognization D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
06-24 21:37:23.435 30643-30643/com.example.text_recognization I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.5.2.2.1_RB1.04.04.04.090.052_msm8974_LNX.LA.3.5.2.2.1_RB1__release_AU ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 07/01/15 Wed
Local Branch: mybranch11515920
Remote Branch: quic/LNX.LA.3.5.2.2.1_rb1
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.2.2.1_RB1.04.04.04.090.052 + NOTHING
06-24 21:37:23.465 30643-30643/com.example.text_recognization D/OpenGLRenderer: Enabling debug mode 0
06-24 21:37:23.525 30643-30643/com.example.text_recognization I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#43519b38 time:579991957
I debug it, and it stops in the class TessBaseAPI
static {
System.loadLibrary("lept");
System.loadLibrary("tess");
nativeClassInit();
}
I don't know whether the environment configuration is wrong or my code is wrong.
And the following is the build.grade file:
com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.example.zhouying.text_recognization"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile files('libs/tess-two.tesseract3.01-leptonica1.68-LibJPEG6b.jar')
}
if I change the support library as follows:
compile 'com.android.support:appcompat-v7:22.0.1'
There will be a red line indicates that "The support library shouldn't use a different version than the compileSdkVersion".
Then I change the compileSdkVersion and targetSdkVersion to 22, I can see errors.
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(24) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1
And I can see a red line under "compile 'com.android.support:design:23.1.1'".I continue to change it to "compile 'com.android.support:design:22.0.1'.
It shows
Failed to resolve com.android.support:appcompat-v7:22.0.1
Failed to resolve com.android.support:design:22.0.1
This may be happening due to a bug in some versions of the Android support library.
Try updating your support library:
compile 'com.android.support:appcompat-v7:22.1.0'

App crashes in emulator using libgdx and tween engine

I'm currently working on a project and so far only have the splash and main screen done. I wanted to see how it would run in an Android environment so I ran it as an Android Application. The emulator booted up just fine but when it load the app or "Uploading Project-android.apk onto device 'emulator-5554'
Installing Project-android.apk..." it prompts up that it "Unfortunately, Project has stopped. Here I copied the logcat for reference.
06-26 23:33:53.190: D/dalvikvm(1808): Not late-enabling CheckJNI (already on)
06-26 23:33:53.280: D/dalvikvm(1808): Trying to load lib /data/app- lib/com.levellabs.project.android-2/libgdx.so 0xb1fbed48
06-26 23:33:53.280: D/dalvikvm(1808): Added shared lib /data/app- lib/com.levellabs.project.android-2/libgdx.so 0xb1fbed48
06-26 23:33:53.280: D/dalvikvm(1808): No JNI_OnLoad found in /data/app- lib/com.levellabs.project.android-2/libgdx.so 0xb1fbed48, skipping init
06-26 23:33:53.280: D/(1808): HostConnection::get() New Host Connection established 0xb90f3dc0, tid 1808
06-26 23:33:53.460: I/AndroidInput(1808): sensor listener setup
06-26 23:33:53.550: W/EGL_emulation(1808): eglSurfaceAttrib not implemented
06-26 23:33:53.550: D/OpenGLRenderer(1808): Enabling debug mode 0
06-26 23:33:53.560: D/(1808): HostConnection::get() New Host Connection established 0xb910b590, tid 1823
06-26 23:33:53.600: W/GL2JNIView(1808): creating OpenGL ES 2.0 context
06-26 23:33:53.800: D/dalvikvm(1808): Trying to load lib /data/app- lib/com.levellabs.project.android-2/libgdx.so 0xb1fbed48
06-26 23:33:53.800: D/dalvikvm(1808): Shared lib '/data/app- lib/com.levellabs.project.android-2/libgdx.so' already loaded in same CL 0xb1fbed48
06-26 23:33:53.800: I/GL2(1808): all initialized 2
06-26 23:33:53.800: I/AndroidGraphics(1808): OGL renderer: Android Emulator OpenGL ES Translator (GeForce GTX 770/PCIe/SSE2)
06-26 23:33:53.800: I/AndroidGraphics(1808): OGL vendor: Google (NVIDIA Corporation)
06-26 23:33:53.800: I/AndroidGraphics(1808): OGL version: OpenGL ES 2.0 (4.5.0 NVIDIA 350.12)
06-26 23:33:53.800: I/AndroidGraphics(1808): OGL extensions: GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_depth24 GL_OES_depth32 GL_OES_element_index_uint GL_OES_texture_float GL_OES_texture_float_linear GL_OES_compressed_paletted_texture GL_OES_compressed_ETC1_RGB8_texture GL_OES_depth_texture GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_packed_depth_stencil GL_OES_vertex_half_float GL_OES_texture_npot GL_OES_rgb8_rgba8
06-26 23:33:53.800: E/EGL_emulation(1808): [getAttribValue] Bad attribute idx
06-26 23:33:53.800: E/EGL_emulation(1808): tid 1823: eglGetConfigAttrib(605): error 0x3004 (EGL_BAD_ATTRIBUTE)
06-26 23:33:53.800: E/EGL_emulation(1808): [getAttribValue] Bad attribute idx
06-26 23:33:53.800: E/EGL_emulation(1808): tid 1823: eglGetConfigAttrib(605): error 0x3004 (EGL_BAD_ATTRIBUTE)
06-26 23:33:53.800: I/AndroidGraphics(1808): framebuffer: (5, 6, 5, 0)
06-26 23:33:53.800: I/AndroidGraphics(1808): depthbuffer: (24)
06-26 23:33:53.800: I/AndroidGraphics(1808): stencilbuffer: (0)
06-26 23:33:53.800: I/AndroidGraphics(1808): samples: (0)
06-26 23:33:53.800: I/AndroidGraphics(1808): coverage sampling: (false)
06-26 23:33:53.810: I/AndroidGraphics(1808): Managed meshes/app: { }
06-26 23:33:53.810: I/AndroidGraphics(1808): Managed textures/app: { }
06-26 23:33:53.810: I/AndroidGraphics(1808): Managed cubemap/app: { }
06-26 23:33:53.810: I/AndroidGraphics(1808): Managed shaders/app: { }
06-26 23:33:53.810: I/AndroidGraphics(1808): Managed buffers/app: { }
06-26 23:33:55.540: I/dalvikvm(1808): Could not find method aurelienribon.tweenengine.TweenManager.update, referenced from method com.levellabs.project.GameScreen.render
06-26 23:33:55.540: W/dalvikvm(1808): VFY: unable to resolve virtual method 369: Laurelienribon/tweenengine/TweenManager;.update (F)V
06-26 23:33:55.540: D/dalvikvm(1808): VFY: replacing opcode 0x6e at 0x0008
06-26 23:33:55.540: D/dalvikvm(1808): GC_FOR_ALLOC freed 407K, 14% free 2931K/3392K, paused 2ms, total 2ms
06-26 23:33:55.540: E/dalvikvm(1808): Could not find class 'aurelienribon.tweenengine.TweenManager', referenced from method com.levellabs.project.GameScreen.show
06-26 23:33:55.540: W/dalvikvm(1808): VFY: unable to resolve new-instance 100 (Laurelienribon/tweenengine/TweenManager;) in Lcom/levellabs/project/GameScreen;
06-26 23:33:55.540: D/dalvikvm(1808): VFY: replacing opcode 0x22 at 0x001e
06-26 23:33:55.540: D/dalvikvm(1808): DexOpt: unable to opt direct call 0x0170 at 0x20 in Lcom/levellabs/project/GameScreen;.show
06-26 23:33:55.540: I/dalvikvm(1808): Failed resolving Lcom/levellabs/project/tween/SpriteAccessor; interface 98 'Laurelienribon/tweenengine/TweenAccessor;'
06-26 23:33:55.540: W/dalvikvm(1808): Link of class 'Lcom/levellabs/project/tween/SpriteAccessor;' failed
06-26 23:33:55.540: D/dalvikvm(1808): DexOpt: unable to opt direct call 0x345e at 0x29 in Lcom/levellabs/project/GameScreen;.show
06-26 23:33:55.540: I/dalvikvm(1808): Failed resolving Lcom/levellabs/project/GameScreen$1; interface 99 'Laurelienribon/tweenengine/TweenCallback;'
06-26 23:33:55.540: W/dalvikvm(1808): Link of class 'Lcom/levellabs/project/GameScreen$1;' failed
06-26 23:33:55.540: D/dalvikvm(1808): DexOpt: unable to opt direct call 0x3434 at 0x54 in Lcom/levellabs/project/GameScreen;.show
06-26 23:33:55.660: D/dalvikvm(1808): GC_FOR_ALLOC freed 71K, 9% free 3192K/3472K, paused 2ms, total 2ms
06-26 23:33:56.120: W/dalvikvm(1808): threadid=11: thread exiting with uncaught exception (group=0xb1cecb20)
06-26 23:33:56.120: E/AndroidRuntime(1808): FATAL EXCEPTION: GLThread 75
06-26 23:33:56.120: E/AndroidRuntime(1808): Process: com.levellabs.project.android, PID: 1808
06-26 23:33:56.120: E/AndroidRuntime(1808): java.lang.NoClassDefFoundError: aurelienribon.tweenengine.TweenManager
06-26 23:33:56.120: E/AndroidRuntime(1808): at com.levellabs.project.GameScreen.show(GameScreen.java:68)
06-26 23:33:56.120: E/AndroidRuntime(1808): at com.badlogic.gdx.Game.setScreen(Game.java:61)
06-26 23:33:56.120: E/AndroidRuntime(1808): at com.levellabs.project.Project.create(Project.java:24)
06-26 23:33:56.120: E/AndroidRuntime(1808): at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphi cs.java:241)
06-26 23:33:56.120: E/AndroidRuntime(1808): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1512)
06-26 23:33:56.120: E/AndroidRuntime(1808): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
06-26 23:33:56.130: I/AndroidInput(1808): sensor listener tear down
06-26 23:33:56.130: I/AndroidGraphics(1808): Managed meshes/app: { }
06-26 23:33:56.130: I/AndroidGraphics(1808): Managed textures/app: { }
06-26 23:33:56.130: I/AndroidGraphics(1808): Managed cubemap/app: { }
06-26 23:33:56.130: I/AndroidGraphics(1808): Managed shaders/app: { }
06-26 23:33:56.130: I/AndroidGraphics(1808): Managed buffers/app: { }
I think your jar file version which has some native functions does not matches the libgdx.so file version which does not have that method. Better you compile the c++ libgdx library using Android NDK to match the native functions. I got this from your error
No JNI_OnLoad found in /data/app- lib/com.levellabs.project.android-2/libgdx.so 0xb1fbed48, skipping init
......
......
Could not find method aurelienribon.tweenengine.TweenManager.update, referenced from method com.levellabs.project.GameScreen.render
This means some of the native methods are not properly binded by the JNI
If you are running inside an emulator, you need corresponding .so files live libgdx.....so files
Refer this Android ndk + libgdx
If you want the ready made JAR files and .so files download here http://libgdx.badlogicgames.com/nightlies/dist/
You can see there are 11 JAR files and folders like armeabi/ armeabi-v7a/ x86/
Go through the README files for further setup needs and compilations steps.
There is also a success comment here Libgdx tween not working on Android
You can also download the Demo App https://java-universal-tween-engine.googlecode.com/files/tween-engine-demo-6.3.0.zip and check the libs folder inside it for the JAR files
If you need more help, ping me via https://chat.stackoverflow.com/rooms/50272/androidians chat room, I will help you

Google map view no longer loading after ADT upgrade; apparent authentication issue?

I'm working on an location-aware Android app that uses Google Maps. I upgraded by ADT to 23.0.0.1245622 the other day. I think I was on v22.6.2-1085508 before then.
Now the map view only contains the Google logo and the +/- buttons. And, eerily, my logcat contains the following line:
07-01 12:15:08.548: E/Google Maps Android API(6299): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
I have tried cleaning the project, by the way. No dice. I tried running this on an AVD instead of my Galaxy S3. No dice. I tried reverting to a previous revision of my code using git reset --hard. Still no dice. Perhaps most importantly, I tried creating a new API key in the console, and pasted that into my manifest. (Incidentally, I reverted to my older key after trying this experiment, if that is at all significant.)
I will post a full logcat below:
07-01 12:14:51.920: D/ActivityThread(6299): handleBindApplication:com.gregeveritt.hoodies
07-01 12:14:51.920: D/ActivityThread(6299): setTargetHeapUtilization:0.75
07-01 12:14:51.920: D/ActivityThread(6299): setTargetHeapMinFree:524288
07-01 12:14:52.560: I/Google Maps Android API(6299): Google Play services client version: 4132500
07-01 12:14:52.560: I/dalvikvm(6299): Could not find method guj.a, referenced from method gqi.a
07-01 12:14:52.560: W/dalvikvm(6299): VFY: unable to resolve static method 24932: Lguj;.a (Landroid/content/Context;)Lgri;
07-01 12:14:52.560: D/dalvikvm(6299): VFY: replacing opcode 0x71 at 0x0003
07-01 12:14:52.570: E/dalvikvm(6299): Could not find class 'gpr', referenced from method gps.a
07-01 12:14:52.570: W/dalvikvm(6299): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
07-01 12:14:52.570: D/dalvikvm(6299): VFY: replacing opcode 0x22 at 0x0000
07-01 12:14:52.570: E/dalvikvm(6299): Could not find class 'gpr', referenced from method gps.a
07-01 12:14:52.570: W/dalvikvm(6299): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
07-01 12:14:52.570: D/dalvikvm(6299): VFY: replacing opcode 0x22 at 0x0000
07-01 12:14:52.570: E/dalvikvm(6299): Could not find class 'gpr', referenced from method gps.a
07-01 12:14:52.570: W/dalvikvm(6299): VFY: unable to resolve new-instance 4089 (Lgpr;) in Lgps;
07-01 12:14:52.570: D/dalvikvm(6299): VFY: replacing opcode 0x22 at 0x0000
07-01 12:14:52.570: D/dalvikvm(6299): DexOpt: unable to opt direct call 0x5e9f at 0x0a in Lgps;.a
07-01 12:14:52.570: D/dalvikvm(6299): DexOpt: unable to opt direct call 0x5e9f at 0x0c in Lgps;.a
07-01 12:14:52.570: D/dalvikvm(6299): DexOpt: unable to opt direct call 0x5e9f at 0x0a in Lgps;.a
07-01 12:14:52.601: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:14:52.611: W/dalvikvm(6299): VFY: unable to resolve static field 20868 (t) in Lyp;
07-01 12:14:52.611: D/dalvikvm(6299): VFY: replacing opcode 0x62 at 0x000e
07-01 12:14:52.611: W/dalvikvm(6299): VFY: unable to resolve static field 20868 (t) in Lyp;
07-01 12:14:52.611: D/dalvikvm(6299): VFY: replacing opcode 0x62 at 0x000d
07-01 12:14:52.931: W/ActivityThread(6299): ClassLoader.loadClass: The class loader returned by Thread.getContextClassLoader() may fail for processes that host multiple applications. You should explicitly specify a context class loader. For example: Thread.setContextClassLoader(getClass().getClassLoader());
07-01 12:14:52.971: I/dalvikvm(6299): Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4022 'Lgln;'
07-01 12:14:52.971: W/dalvikvm(6299): Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
07-01 12:14:52.971: E/dalvikvm(6299): Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a
07-01 12:14:52.971: W/dalvikvm(6299): VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lglt;
07-01 12:14:52.971: D/dalvikvm(6299): VFY: replacing opcode 0x1f at 0x0019
07-01 12:14:53.111: I/Adreno200-EGL(6299): <qeglDrvAPI_eglInitialize:265>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.059_msm8960_JB_2.5.5_CL3896081_release_AU (CL3896081)
07-01 12:14:53.111: I/Adreno200-EGL(6299): Build Date: 06/25/13 Tue
07-01 12:14:53.111: I/Adreno200-EGL(6299): Local Branch:
07-01 12:14:53.111: I/Adreno200-EGL(6299): Remote Branch: quic/jb_2.5.5
07-01 12:14:53.111: I/Adreno200-EGL(6299): Local Patches: NONE
07-01 12:14:53.111: I/Adreno200-EGL(6299): Reconstruct Branch: AU_LINUX_ANDROID_JB_2.5.5.04.02.02.092.059 + NOTHING
07-01 12:14:53.161: D/OpenGLRenderer(6299): Enabling debug mode 0
07-01 12:14:53.311: I/Google Maps Android API(6299): Failed to contact Google servers. Another attempt will be made when connectivity is established.
07-01 12:14:54.022: I/Choreographer(6299): Skipped 51 frames! The application may be doing too much work on its main thread.
07-01 12:14:54.723: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:14:55.964: I/Choreographer(6299): Skipped 61 frames! The application may be doing too much work on its main thread.
07-01 12:14:56.304: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302027791
07-01 12:14:56.304: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302027791
07-01 12:15:08.548: E/Google Maps Android API(6299): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
07-01 12:15:58.571: W/IInputConnectionWrapper(6299): getExtractedText on inactive InputConnection
07-01 12:15:58.571: W/IInputConnectionWrapper(6299): getTextBeforeCursor on inactive InputConnection
07-01 12:15:58.581: W/IInputConnectionWrapper(6299): getSelectedText on inactive InputConnection
07-01 12:15:58.581: W/IInputConnectionWrapper(6299): getTextAfterCursor on inactive InputConnection
07-01 12:16:04.027: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:16:04.167: W/IInputConnectionWrapper(6299): getExtractedText on inactive InputConnection
07-01 12:16:04.227: W/IInputConnectionWrapper(6299): getTextBeforeCursor on inactive InputConnection
07-01 12:16:05.468: W/IInputConnectionWrapper(6299): getSelectedText on inactive InputConnection
07-01 12:16:05.498: W/IInputConnectionWrapper(6299): getTextAfterCursor on inactive InputConnection
07-01 12:16:05.518: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302097011
07-01 12:16:51.027: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302142518
07-01 12:17:31.530: I/Google Maps Android API(6299): Google Play services package version: 5082036
07-01 12:17:32.521: I/Choreographer(6299): Skipped 49 frames! The application may be doing too much work on its main thread.
07-01 12:17:33.142: I/Timeline(6299): Timeline: Activity_idle id: android.os.BinderProxy#41bc4ef8 time:302184634
Here is my manifest, with my api key blotted out:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.gregeveritt.hoodies"
android:versionCode="1"
android:versionName="0.3" >
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<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" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.gregeveritt.hoodies.MainActivity"
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_api_key" />
</application>
</manifest>
Oh, and here's my map creation code, as well:
#Override
public void onConnected(Bundle dataBundle) {
Toast.makeText(this, "Connected", Toast.LENGTH_SHORT).show();
try {
showNeighborhood();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
// TODO potentially switch to SupportMapFragment, lower MinSDK from 12 to 11
mMap = ( (MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
CameraUpdate startingCamera = CameraUpdateFactory.newLatLng( new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude()) );
mMap.moveCamera(startingCamera);
// TODO What if mMap was null-checked?
}
Note: Somewhere in this process, I also switched from a 32-bit JDK to a 64-bit one. I doubt that's relevant at all, but I just like to cover my bases.
While looking over user2103379's answer and checking my API key, I found that the package name and the API key were correct. However, the SHA-1 for my new debug key was not added to the list of accepted clients. Oops! Anyway, I put the new SHA-1 in there, cleaned the Eclipse project (after disabling automatic post-clean build) and built the project anew. Worked fine.
The Issue is probably happening because the Map is not loaded and the app is trying to locate you in an unloaded Map. The Map is not loading with your api key or package name. I think your api key has got changed . Please check your api key and package name.

java.lang.NoClassDefFoundError: org.apache.batik.dom.svg.SVGDOMImplementation

I'm having weird trouble with Apache Batik library linked to my Android&LibGDX project.
But let's start from beginning, in IntelliJ Idea I have a project which contains three modules: Main, Android and Desktop.
"batik" library which I highlighted contains:
And there is some code in "Main" module which is used in Android&Desktop modules:
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
Following code is used to get SVG document's width and height, but calling SAXSVGDocumentFactory's constructor throws an exception only on Android. There is no problem on Desktop version which runs without any problems:
03-17 18:23:46.928: ERROR/AndroidRuntime(1517): FATAL EXCEPTION: GLThread 17
java.lang.NoClassDefFoundError: org.apache.batik.dom.svg.SVGDOMImplementation
at org.apache.batik.dom.svg.SAXSVGDocumentFactory.<init>(SAXSVGDocumentFactory.java:111)
at com.revicostudio.gra.GraRenderer.getDocumentWidthAndHeight(GraRenderer.java:103)
at com.revicostudio.gra.GraRenderer.renderSvgToTexture(GraRenderer.java:66)
at com.revicostudio.gra.GraRenderer.render(GraRenderer.java:59)
at com.revicostudio.gra.GraScreen.render(GraScreen.java:31)
at com.badlogic.gdx.Game.render(Game.java:46)
at com.badlogic.gdx.backends.android.AndroidGraphics.onDrawFrame(AndroidGraphics.java:499)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1462)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
There are also a lot of messages in Logcat send by dalvik and related to org.apache.batik.dom.* classes, which as far as I see are included in batik-svg-dom.jar:
03-17 20:26:37.688: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/ExtensibleDOMImplementation; interface 5043 'Lorg/w3c/dom/css/DOMImplementationCSS;'
03-17 20:26:37.688: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/ExtensibleDOMImplementation;' failed
03-17 20:26:37.688: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGDOMImplementation; (2490)
03-17 20:26:37.688: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGDOMImplementation;' failed
03-17 20:26:37.688: INFO/dalvikvm(3632): Could not find method org.apache.batik.dom.svg.SVGDOMImplementation.getDOMImplementation, referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.<init>
03-17 20:26:37.688: WARN/dalvikvm(3632): VFY: unable to resolve static method 21646: Lorg/apache/batik/dom/svg/SVGDOMImplementation;.getDOMImplementation ()Lorg/w3c/dom/DOMImplementation;
03-17 20:26:37.688: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x71 at 0x0000
03-17 20:26:37.688: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/ExtensibleDOMImplementation; interface 5043 'Lorg/w3c/dom/css/DOMImplementationCSS;'
03-17 20:26:37.688: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/ExtensibleDOMImplementation;' failed
03-17 20:26:37.688: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGDOMImplementation; (2490)
03-17 20:26:37.688: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGDOMImplementation;' failed
03-17 20:26:37.688: INFO/dalvikvm(3632): Could not find method org.apache.batik.dom.svg.SVGDOMImplementation.getDOMImplementation, referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.<init>
03-17 20:26:37.688: WARN/dalvikvm(3632): VFY: unable to resolve static method 21646: Lorg/apache/batik/dom/svg/SVGDOMImplementation;.getDOMImplementation ()Lorg/w3c/dom/DOMImplementation;
03-17 20:26:37.688: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x71 at 0x0000
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/AbstractDocument; interface 5227 'Lorg/w3c/dom/traversal/DocumentTraversal;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractDocument;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/AbstractStylableDocument; (2467)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractStylableDocument;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGOMDocument; (2485)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGOMDocument;' failed
03-17 20:26:37.698: ERROR/dalvikvm(3632): Could not find class 'org.apache.batik.dom.svg.SVGOMDocument', referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve check-cast 2746 (Lorg/apache/batik/dom/svg/SVGOMDocument;) in Lorg/apache/batik/dom/svg/SAXSVGDocumentFactory;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x1f at 0x0062
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/AbstractDocument; interface 5227 'Lorg/w3c/dom/traversal/DocumentTraversal;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractDocument;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/AbstractStylableDocument; (2467)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractStylableDocument;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGOMDocument; (2485)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGOMDocument;' failed
03-17 20:26:37.698: ERROR/dalvikvm(3632): Could not find class 'org.apache.batik.dom.svg.SVGOMDocument', referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve check-cast 2746 (Lorg/apache/batik/dom/svg/SVGOMDocument;) in Lorg/apache/batik/dom/svg/SAXSVGDocumentFactory;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x1f at 0x0013
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/AbstractDocument; interface 5227 'Lorg/w3c/dom/traversal/DocumentTraversal;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractDocument;' failed
03-17 20:26:37.698: ERROR/dalvikvm(3632): Could not find class 'org.apache.batik.dom.AbstractDocument', referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve check-cast 2467 (Lorg/apache/batik/dom/AbstractDocument;) in Lorg/apache/batik/dom/svg/SAXSVGDocumentFactory;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x1f at 0x001f
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/AbstractDocument; interface 5227 'Lorg/w3c/dom/traversal/DocumentTraversal;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractDocument;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/AbstractStylableDocument; (2467)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractStylableDocument;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGOMDocument; (2485)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGOMDocument;' failed
03-17 20:26:37.698: ERROR/dalvikvm(3632): Could not find class 'org.apache.batik.dom.svg.SVGOMDocument', referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve check-cast 2746 (Lorg/apache/batik/dom/svg/SVGOMDocument;) in Lorg/apache/batik/dom/svg/SAXSVGDocumentFactory;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x1f at 0x0013
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/AbstractDocument; interface 5227 'Lorg/w3c/dom/traversal/DocumentTraversal;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/AbstractDocument;' failed
03-17 20:26:37.698: ERROR/dalvikvm(3632): Could not find class 'org.apache.batik.dom.AbstractDocument', referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve check-cast 2467 (Lorg/apache/batik/dom/AbstractDocument;) in Lorg/apache/batik/dom/svg/SAXSVGDocumentFactory;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x1f at 0x001f
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/ExtensibleDOMImplementation; interface 5043 'Lorg/w3c/dom/css/DOMImplementationCSS;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/ExtensibleDOMImplementation;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGDOMImplementation; (2490)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGDOMImplementation;' failed
03-17 20:26:37.698: INFO/dalvikvm(3632): Could not find method org.apache.batik.dom.svg.SVGDOMImplementation.getDOMImplementation, referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.getDOMImplementation
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve static method 21646: Lorg/apache/batik/dom/svg/SVGDOMImplementation;.getDOMImplementation ()Lorg/w3c/dom/DOMImplementation;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x71 at 0x0018
03-17 20:26:37.698: INFO/dalvikvm(3632): Failed resolving Lorg/apache/batik/dom/ExtensibleDOMImplementation; interface 5043 'Lorg/w3c/dom/css/DOMImplementationCSS;'
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/ExtensibleDOMImplementation;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg/SVGDOMImplementation; (2490)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg/SVGDOMImplementation;' failed
03-17 20:26:37.698: WARN/dalvikvm(3632): Unable to resolve superclass of Lorg/apache/batik/dom/svg12/SVG12DOMImplementation; (2676)
03-17 20:26:37.698: WARN/dalvikvm(3632): Link of class 'Lorg/apache/batik/dom/svg12/SVG12DOMImplementation;' failed
03-17 20:26:37.698: INFO/dalvikvm(3632): Could not find method org.apache.batik.dom.svg12.SVG12DOMImplementation.getDOMImplementation, referenced from method org.apache.batik.dom.svg.SAXSVGDocumentFactory.getDOMImplementation
03-17 20:26:37.698: WARN/dalvikvm(3632): VFY: unable to resolve static method 23668: Lorg/apache/batik/dom/svg12/SVG12DOMImplementation;.getDOMImplementation ()Lorg/w3c/dom/DOMImplementation;
03-17 20:26:37.698: DEBUG/dalvikvm(3632): VFY: replacing opcode 0x71 at 0x0025
03-17 20:26:37.728: WARN/dalvikvm(3632): threadid=10: thread exiting with uncaught exception (group=0x313c61f8)
Also, there are a lot of warnings on make:
What causes this problem?
Batik uses Java2D API, which is unavailable on Android. You need to use another library.

Unity3D Plugin - The Google Play services resources were not found

I'm trying to add GooglePlay Leaderboards and Achievements into my Unity3D plugin, but keep getting the error:
........ D/dalvikvm( 6052): VFY: replacing opcode 0x60 at 0x003f
W/dalvikvm( 6052): VFY: unable to resolve static field 1854
(common_google_play_services_update_text) in
Lcom/google/android/gms/R$string; D/dalvikvm( 6052): VFY: replacing
opcode 0x60 at 0x0046 W/dalvikvm( 6052): VFY: unable to resolve static
field 1851 (common_google_play_services_unsupported_text) in
Lcom/google/android/gms/R$string; D/dalvikvm( 6052): VFY: replacing
opcode 0x60 at 0x0066 W/dalvikvm( 6052): VFY: unable to resolve static
field 1848 (common_google_play_services_network_error_text) in
Lcom/google/android/gms/R$string; D/dalvikvm( 6052): VFY: replacing
opcode 0x60 at 0x006d W/dalvikvm( 6052): VFY: unable to resolve static
field 1846 (common_google_play_services_invalid_account_text) in
Lcom/google/android/gms/R$string; D/dalvikvm( 6052): VFY: replacing
opcode 0x60 at 0x0074 W/dalvikvm( 6052): VFY: unable to resolve static
field 1850 (common_google_play_services_unknown_issue) in
Lcom/google/android/gms/R$string; D/dalvikvm( 6052): VFY: replacing
opcode 0x60 at 0x000c E/GooglePlayServicesUtil( 6052): The Google
Play services resources were not found. Check your project
configuration to ensure that the resources are included.
D/GooglePlayServices( 6052): onSignInFailed ......
As far as I know iv'e done everything correctly. Added the "google-play-services_lib" project to my native Java eclipse project, added it as a "Reference", added the "google-play-services.jar" to that project and to the Unity plugins folder. I have also set "google-play-services.jar" to export its entries and can see in my "R.txt" file the entries are there.
Copy the complete google play services library project ($android-sdk/extras/google/google_play_services/libproject/google-play-services_lib) to the unity Plugins/Android folder.

Categories