I am working on app using of Aviary SDK. When I call loadAviaryActivityForImage(ImportDialog.imageFilePath) next error are shown:
06-21 11:53:53.421 4534-4549/com.bigblueclip.picstitch.debug:aviarycds E/AndroidRuntime﹕ FATAL EXCEPTION: IntentService[AviaryCdsService]
junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:48)
at junit.framework.Assert.assertTrue(Assert.java:20)
at junit.framework.Assert.assertNotNull(Assert.java:218)
at junit.framework.Assert.assertNotNull(Assert.java:211)
at com.aviary.android.feather.cds.AviaryCdsService.checkProviderExists(AviaryCdsService.java:785)
at com.aviary.android.feather.cds.AviaryCdsService.onHandleIntent(AviaryCdsService.java:302)
at com.aviary.android.feather.cds.AviaryIntentService$ServiceHandler.handleMessage(AviaryIntentService.java:67)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
After that Aviary Activity run and give me valid image, so I don't know what's wrong. Does it mean that a problem is in Aviary SDK, not in my program?
There was a problem with gradle build. In detail, I use ".debug" prefix for build my app, but Aviary worked wrong with such configuration.
Related
I imported a package of my own called server (the logic of my program) and was going to use libgdx for the graphics/cross platform. The desktop launcher works fine but when I run the android launcher I get this nasty error referring to my own library.
E/AndroidRuntime: FATAL EXCEPTION: GLThread 187
Process: com.mygdx.game, PID: 8093
java.lang.NoClassDefFoundError: server.Point
at server.Shape.<init>(Shape.java:9)
at server.T.<init>(T.java:7)
at server.Stack.<init>(Stack.java:28)
at server.Logic.<init>(Logic.java:14)
at com.mygdx.game.GameLoop.create(GameLoop.java:43)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:275)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1511)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1239)
any help would be great
I solved it!
It was because I was using java.awt.point in the android build. So I basically wrote a new point class, replace it, and then cleaned my project. Everything works now
Guys I am getting the below error in RunTime, what is the root cause of this error?
java.lang.VerifyError: appPackageName at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1130)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2698)
at android.app.ActivityThread.access$1900(ActivityThread.java:148)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1413)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5457)
at java.lang.reflect.Method.invokeNative(Native Method)
You are probably using or accessing something which is simply supported in higher android SDK, as the error shows here java.lang.Class.newInstanceImpl(Native Method).
I happened to have the same kind of VerifyError while I was using String.isEmplty();. It seems you have same kind of problem as the message showing error in java.lang.Class
Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
Here is official docs
Possible causes:
You might have imported something which is using different support v4/v7 library version.
You are targeting something from a higher SDK version. In that case, update your support repository and SDK build version.
Thanks everyone for your support and answers, may be your answers are right but in my case I used extra variables in one method while I was testing, so this exception appeared. Now I get rid of redundant things in my code and it start working. It may help others.
all I am doing:
Eclipse --> new Project --> Android Application --> Activity type: blank
no changes in the code, just the simple Hello world.
It does start, I see the Hello World on the virtual device, but then immediately shuts down.
The logcat is as follows:
08-31 06:01:14.976: W/dalvikvm(1114): threadid=1: thread exiting with uncaught exception(group=0xb2aeeba8)
08-31 06:01:14.996: E/AndroidRuntime(1114): FATAL EXCEPTION: main
08-31 06:01:14.996: E/AndroidRuntime(1114): Process: com.example.tester, PID: 1114
08-31 06:01:14.996: E/AndroidRuntime(1114): java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable
08-31 06:01:14.996: E/AndroidRuntime(1114): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:107)
Any Ideas?
Edit:
Ok, apparently I for some reason have a dependency mixup:
Found 2 versions of android-support-v4.jar in the dependency list,
[2014-08-31 12:22:46 - tester] but not all the versions are identical (check is based on SHA-1 only at this
Can I simply delete one of them?
The error is essentially telling you that it can't find the Android Support Library, which it is using as a dependency.
Without knowing what build process you're using (e.g gradle) it's difficult to tell you how to fix it, but basically you'll need to either add it as a dependency, or remove the code that requires it.
For more information on the Android Support Library, try this:
https://developer.android.com/tools/support-library/index.html
If do not work the try this :
Step #1: Undo all that. If you are messing with the build path, on R16 or higher version of the ADT plugin for Eclipse, you're doing it wrong.
Step #2: Pick one of those two versions of the JAR, or pick the one from the "extras" area of your SDK installation.
Step #3: Put the right JAR in App Library.
Step #4: Delete the one from App Free, since it will pick up that JAR from App Library.
I am trying to run the Animation3DTest , one of libgdx's test examples
On the desktop (lwjgl) I can run this test flawlessly, I can see a guy and a sword and I can move him around without any errors.
However, on Android, after starting this test, I got a force stop, and here is what showed on the Logcat
09-24 10:46:49.526 24530-24577/com.badlogic.gdx.tests.android E/AndroidRuntime﹕ FATAL EXCEPTION: GLThread 1445
com.badlogic.gdx.utils.GdxRuntimeException: File not found: com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl (Classpath)
at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:133)
at com.badlogic.gdx.backends.android.AndroidFileHandle.read(AndroidFileHandle.java:77)
at com.badlogic.gdx.files.FileHandle.length(FileHandle.java:563)
at com.badlogic.gdx.backends.android.AndroidFileHandle.length(AndroidFileHandle.java:162)
at com.badlogic.gdx.files.FileHandle.readString(FileHandle.java:192)
at com.badlogic.gdx.files.FileHandle.readString(FileHandle.java:186)
at com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.getDefaultVertexShader(DefaultShader.java:249)
at com.badlogic.gdx.graphics.g3d.utils.DefaultShaderProvider.<init>(DefaultShaderProvider.java:44)
at com.badlogic.gdx.graphics.g3d.ModelBatch.<init>(ModelBatch.java:101)
at com.badlogic.gdx.tests.g3d.BaseG3dTest.create(BaseG3dTest.java:38)
at com.badlogic.gdx.tests.g3d.BaseG3dHudTest.create(BaseG3dHudTest.java:50)
at com.badlogic.gdx.tests.g3d.Animation3DTest.create(Animation3DTest.java:45)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:322)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1514)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1242)
Get the latest nightly build. Here's the bug report.
I am using Facebook android SDK 3.0 (quite new to it), and running the sample SessionLoginSample located in the sample directory of the downloaded SDK. The target is to test if the session login sample can trigger the browser and lead user to the Facebook login page without the Facebook for Android application installed. No luck, the SessionLoginSample force closed.
However, if the Facebook for Android app installed, the user could be lead to the login activity of the app. Enter the account/password then go back the SessionLoginSample without any issue. It looks like the Session object won't trigger browser and lead user to Facebook login page?
Edit: append the log
02-10 15:35:46.180: ERROR/AndroidRuntime(29604): FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to resume activity {com.facebook.samples.sessionlogin/com.facebook.LoginActivity}: android.content.res.Resources$NotFoundException: String resource ID #0x7f050012
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2455)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2483)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1997)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4511)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f050012
at android.content.res.Resources.getText(Resources.java:260)
at android.content.res.Resources.getString(Resources.java:344)
at android.content.Context.getString(Context.java:282)
at com.facebook.widget.WebDialog.onCreate(WebDialog.java:188)
at android.app.Dialog.dispatchOnCreate(Dialog.java:353)
at android.app.Dialog.show(Dialog.java:257)
at com.facebook.AuthorizationClient$WebViewAuthHandler.tryAuthorize(AuthorizationClient.java:461)
at com.facebook.AuthorizationClient.tryCurrentHandler(AuthorizationClient.java:209)
at com.facebook.AuthorizationClient.tryNextHandler(AuthorizationClient.java:188)
at com.facebook.AuthorizationClient.authorize(AuthorizationClient.java:116)
at com.facebook.AuthorizationClient.startOrContinueAuth(AuthorizationClient.java:97)
at com.facebook.LoginActivity.onResume(LoginActivity.java:113)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1157)
at android.app.Activity.performResume(Activity.java:4544)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2445)
... 12 more
Solve the original problem:
Just found the strings.xml file in the values folder in the res folder of Facebook android SDK has been changed! The WebDialog works without problem after copy the string items back. Quite weird, I NEVER change that file manually. I am using IntelliJ IDEA 12 as the IDE to build and run my project. Might be this problem caused by IntelliJ IDEA??
Do you have any debug log you can share ? It's quite possible that something hasn't built properly as I have run the app without having a facebook app installed on my device. The app shows a loginButton which triggers the login dialog.