Moving classes to multidex in existing APK - android

I am trying to move some frameworks from classes.dex to classes2.dex (MultiDex) from an existing APK. To do so I use smali. It seem it works for some apps and for some not:
D/dalvikvm( 1401): GC_CONCURRENT freed 258K, 24% free 13896K/18268K, paused 2ms+1ms, total 19ms
I/dalvikvm( 2737): Could not find method com.facebook.FacebookSdk.sdkInitialize, referenced from method com.foursquare.robin.App.onCreate
W/dalvikvm( 2737): VFY: unable to resolve static method 16788: Lcom/facebook/FacebookSdk;.sdkInitialize (Landroid/content/Context;)V
D/dalvikvm( 2737): VFY: replacing opcode 0x71 at 0x014d
E/dalvikvm( 2737): Could not find class 'com.twitter.sdk.android.core.u', referenced from method com.foursquare.common.app.support.am.a
W/dalvikvm( 2737): VFY: unable to resolve new-instance 8004 (Lcom/twitter/sdk/android/core/u;) in Lcom/foursquare/common/app/support/am;
D/dalvikvm( 2737): VFY: replacing opcode 0x22 at 0x0005
D/dalvikvm( 2737): DexOpt: unable to opt direct call 0xd553 at 0x09 in Lcom/foursquare/common/app/support/am;.a
I/MultiDex( 2737): VM with version 1.6.0 does not have multidex support
I/MultiDex( 2737): install
I/MultiDex( 2737): MultiDexExtractor.load(/data/app/com.foursquare.robin-1.apk, false)
I/MultiDex( 2737): Detected that extraction must be performed.
D/dalvikvm( 2737): GC_CONCURRENT freed 325K, 11% free 3389K/3784K, paused 1ms+0ms, total 5ms
I/MultiDex( 2737): Extraction is needed for file /data/data/com.foursquare.robin/code_cache/secondary-dexes/com.foursquare.robin-1.apk.classes2.zip
I/MultiDex( 2737): Extracting /data/data/com.foursquare.robin/code_cache/secondary-dexes/com.foursquare.robin-1.apk.classes-838392451.zip
I/MultiDex( 2737): Renaming to /data/data/com.foursquare.robin/code_cache/secondary-dexes/com.foursquare.robin-1.apk.classes2.zip
I/MultiDex( 2737): Extraction success - length /data/data/com.foursquare.robin/code_cache/secondary-dexes/com.foursquare.robin-1.apk.classes2.zip: 392940
I/MultiDex( 2737): load found 1 secondary dex files
D/dalvikvm( 2737): DexOpt: --- BEGIN 'com.foursquare.robin-1.apk.classes2.zip' (bootstrap=0) ---
I/dalvikvm( 2753): No library specified. The standard exception handler will be used
D/dalvikvm( 2753): DexOpt: load 18ms, verify+opt 57ms, 1428508 bytes
D/dalvikvm( 2737): DexOpt: --- END 'com.foursquare.robin-1.apk.classes2.zip' (success) ---
D/dalvikvm( 2737): DEX prep '/data/data/com.foursquare.robin/code_cache/secondary-dexes/com.foursquare.robin-1.apk.classes2.zip': unzip in 13ms, rewrite 232ms
I/MultiDex( 2737): install done
D/AndroidRuntime( 2737): Shutting down VM
W/dalvikvm( 2737): threadid=1: thread exiting with uncaught exception (group=0x42d5d140)
E/AndroidRuntime( 2737): FATAL EXCEPTION: main
E/AndroidRuntime( 2737): Process: com.foursquare.robin, PID: 2737
E/AndroidRuntime( 2737): java.lang.NoClassDefFoundError: com.twitter.sdk.android.core.u
E/AndroidRuntime( 2737): at com.foursquare.common.app.support.am.a(SourceFile)
E/AndroidRuntime( 2737): at com.foursquare.robin.App.onCreate(SourceFile:213)
E/AndroidRuntime( 2737): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
E/AndroidRuntime( 2737): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
E/AndroidRuntime( 2737): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
E/AndroidRuntime( 2737): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime( 2737): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 2737): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 2737): at android.app.ActivityThread.main(ActivityThread.java:5017)
E/AndroidRuntime( 2737): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2737): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 2737): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime( 2737): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime( 2737): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 1321): Force finishing activity com.foursquare.robin/.activities.MainActivity
Is this because MultiDex is installed after Twitter API or do I have to modify something else than the dex files?

I'll first quote myself (from this blogpost):
So what is main dex, and which classes it must include?
On application start, the default ClassLoader has a single entry in
its path - classes.dex file. It is also called the main dex. To
support more than one dex file, the multidex support library
implemented runtime patching of ClassLoader's path. This code should
run as soon as you have the application context (the perfect place for
it is in Application#attachBaseContext method).
Therefore, the Application class should be definitely included in the
main dex, since it should already be present when you patching the
ClassLoader.
Any other classes must be included? Yes. There's a thing called
Dalvik verifier that has complex rules for determining
inappropriate bytecode. For example, before loading the Application
class, VM verifier performs its checks and if it finds a field whose
type it can't resolve (yet), it will not allow to run instruction that
accessing this field, even if at that point of time we already patched
the ClassLoader and the class could be resolved.
In your example, app's Application class (com.foursquare.robin.App) indirectly depends on com.twitter.sdk.android.core.u class. But as you can see in your logs, Dalvik verifier already patched the new-instance instruction:
E/dalvikvm( 2737): Could not find class 'com.twitter.sdk.android.core.u', referenced from method com.foursquare.common.app.support.am.a
W/dalvikvm( 2737): VFY: unable to resolve new-instance 8004 (Lcom/twitter/sdk/android/core/u;) in Lcom/foursquare/common/app/support/am;
D/dalvikvm( 2737): VFY: replacing opcode 0x22 at 0x0005

Related

video as a splash screen?

i have created a app which have video as a splash screen , my app work fine on android 6.0 and above but when I run my app on android 5.0 it show can't play this video after showing this my app goes to mainactivity and it works fine .
can you help me showing the video in android 5.0 . my min sdk version is android 4.4 api 19 but my app dont work on android 4.4 it stops , can you help me to make my app work fine on android 4.4 and 5.0
debug log if you need
for android 4.4
**
Log messages will follow once session has started...
I/dalvikvm( 3346): Could not find method android.view.Window$Callback.onPointerCaptureChanged, referenced from method android.support.v7.view.WindowCallbackWrapper.onPointerCaptureChanged
W/dalvikvm( 3346): VFY: unable to resolve interface method 21560: Landroid/view/Window$Callback;.onPointerCaptureChanged (Z)V
D/dalvikvm( 3346): VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm( 3346): Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
W/dalvikvm( 3346): VFY: unable to resolve interface method 21562: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
D/dalvikvm( 3346): VFY: replacing opcode 0x72 at 0x0002
W/dalvikvm( 3346): VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
I/dalvikvm( 3346): Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
W/dalvikvm( 3346): VFY: unable to resolve interface method 21564: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
D/dalvikvm( 3346): VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm( 3346): Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
W/dalvikvm( 3346): VFY: unable to resolve interface method 21568: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm( 3346): VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm( 3346): Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
W/dalvikvm( 3346): VFY: unable to resolve virtual method 1020: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm( 3346): Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
W/dalvikvm( 3346): VFY: unable to resolve virtual method 1042: Landroid/content/res/TypedArray;.getType (I)I
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0008
D/ ( 3346): HostConnection::get() New Host Connection established 0xb8ee3aa0, tid 3346
D/EGL_emulation( 3346): eglCreateContext: 0xb8ee5f20: maj 2 min 0 rcv 2
D/EGL_emulation( 3346): eglMakeCurrent: 0xb8ee5f20: ver 2 0
E/EGL_emulation( 3346): tid 3346: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)
W/HardwareRenderer( 3346): Backbuffer cannot be preserved
D/OpenGLRenderer( 3346): Enabling debug mode 0
D/MediaPlayer( 3346): getMetadata
E/MediaPlayer( 3346): error (1, -2147483648)
E/MediaPlayer( 3346): Error (1,-2147483648)
D/VideoView( 3346): Error: 1,-2147483648
I/dalvikvm( 3346): Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
W/dalvikvm( 3346): VFY: unable to resolve virtual method 983: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm( 3346): Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
W/dalvikvm( 3346): VFY: unable to resolve virtual method 985: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0002
E/dalvikvm( 3346): Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
W/dalvikvm( 3346): VFY: unable to resolve instanceof 263 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
D/dalvikvm( 3346): VFY: replacing opcode 0x20 at 0x000c
D/dalvikvm( 3346): GC_FOR_ALLOC freed 169K, 7% free 3253K/3484K, paused 3ms, total 3ms
D/dalvikvm( 3346): GC_FOR_ALLOC freed 1K, 7% free 3473K/3708K, paused 2ms, total 2ms
I/dalvikvm-heap( 3346): Grow heap (frag case) to 5.868MB for 2536932-byte allocation
D/dalvikvm( 3346): GC_CONCURRENT freed <1K, 4% free 5950K/6188K, paused 1ms+1ms, total 3ms
D/dalvikvm( 3346): WAIT_FOR_CONCURRENT_GC blocked 2ms
I/dalvikvm( 3346): Could not find method android.widget.TextView.getAutoSizeMaxTextSize, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeMaxTextSize
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22589: Landroid/widget/TextView;.getAutoSizeMaxTextSize ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.getAutoSizeMinTextSize, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeMinTextSize
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22590: Landroid/widget/TextView;.getAutoSizeMinTextSize ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.getAutoSizeStepGranularity, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeStepGranularity
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22591: Landroid/widget/TextView;.getAutoSizeStepGranularity ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.getAutoSizeTextAvailableSizes, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeTextAvailableSizes
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22592: Landroid/widget/TextView;.getAutoSizeTextAvailableSizes ()[I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.getAutoSizeTextType, referenced from method android.support.v7.widget.AppCompatTextView.getAutoSizeTextType
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22593: Landroid/widget/TextView;.getAutoSizeTextType ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0005
I/dalvikvm( 3346): Could not find method android.widget.TextView.setAutoSizeTextTypeUniformWithConfiguration, referenced from method android.support.v7.widget.AppCompatTextView.setAutoSizeTextTypeUniformWithConfiguration
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22648: Landroid/widget/TextView;.setAutoSizeTextTypeUniformWithConfiguration (IIII)V
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.setAutoSizeTextTypeUniformWithPresetSizes, referenced from method android.support.v7.widget.AppCompatTextView.setAutoSizeTextTypeUniformWithPresetSizes
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22649: Landroid/widget/TextView;.setAutoSizeTextTypeUniformWithPresetSizes ([II)V
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.setAutoSizeTextTypeWithDefaults, referenced from method android.support.v7.widget.AppCompatTextView.setAutoSizeTextTypeWithDefaults
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22650: Landroid/widget/TextView;.setAutoSizeTextTypeWithDefaults (I)V
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.TextView.getAutoSizeStepGranularity, referenced from method android.support.v7.widget.AppCompatTextHelper.loadFromAttributes
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22591: Landroid/widget/TextView;.getAutoSizeStepGranularity ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0161
I/dalvikvm( 3346): Could not find method android.text.StaticLayout$Builder.obtain, referenced from method android.support.v7.widget.AppCompatTextViewAutoSizeHelper.createStaticLayoutForMeasuring
W/dalvikvm( 3346): VFY: unable to resolve static method 20680: Landroid/text/StaticLayout$Builder;.obtain (Ljava/lang/CharSequence;IILandroid/text/TextPaint;I)Landroid/text/StaticLayout$Builder;
D/dalvikvm( 3346): VFY: replacing opcode 0x71 at 0x0014
I/dalvikvm( 3346): Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
W/dalvikvm( 3346): VFY: unable to resolve virtual method 756: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.createDeviceProtectedStorageContext, referenced from method android.support.v4.content.ContextCompat.createDeviceProtectedStorageContext
W/dalvikvm( 3346): VFY: unable to resolve virtual method 747: Landroid/content/Context;.createDeviceProtectedStorageContext ()Landroid/content/Context;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.getCodeCacheDir, referenced from method android.support.v4.content.ContextCompat.getCodeCacheDir
W/dalvikvm( 3346): VFY: unable to resolve virtual method 754: Landroid/content/Context;.getCodeCacheDir ()Ljava/io/File;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.getColor, referenced from method android.support.v4.content.ContextCompat.getColor
W/dalvikvm( 3346): VFY: unable to resolve virtual method 755: Landroid/content/Context;.getColor (I)I
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.getColorStateList, referenced from method android.support.v4.content.ContextCompat.getColorStateList
W/dalvikvm( 3346): VFY: unable to resolve virtual method 756: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.getDataDir, referenced from method android.support.v4.content.ContextCompat.getDataDir
W/dalvikvm( 3346): VFY: unable to resolve virtual method 758: Landroid/content/Context;.getDataDir ()Ljava/io/File;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.getDrawable, referenced from method android.support.v4.content.ContextCompat.getDrawable
W/dalvikvm( 3346): VFY: unable to resolve virtual method 761: Landroid/content/Context;.getDrawable (I)Landroid/graphics/drawable/Drawable;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.getNoBackupFilesDir, referenced from method android.support.v4.content.ContextCompat.getNoBackupFilesDir
W/dalvikvm( 3346): VFY: unable to resolve virtual method 769: Landroid/content/Context;.getNoBackupFilesDir ()Ljava/io/File;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.isDeviceProtectedStorage, referenced from method android.support.v4.content.ContextCompat.isDeviceProtectedStorage
W/dalvikvm( 3346): VFY: unable to resolve virtual method 782: Landroid/content/Context;.isDeviceProtectedStorage ()Z
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.content.Context.startForegroundService, referenced from method android.support.v4.content.ContextCompat.startForegroundService
W/dalvikvm( 3346): VFY: unable to resolve virtual method 798: Landroid/content/Context;.startForegroundService (Landroid/content/Intent;)Landroid/content/ComponentName;
D/dalvikvm( 3346): VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm( 3346): Could not find method android.widget.Button.getAutoSizeMaxTextSize, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeMaxTextSize
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22028: Landroid/widget/Button;.getAutoSizeMaxTextSize ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.Button.getAutoSizeMinTextSize, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeMinTextSize
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22029: Landroid/widget/Button;.getAutoSizeMinTextSize ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.Button.getAutoSizeStepGranularity, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeStepGranularity
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22030: Landroid/widget/Button;.getAutoSizeStepGranularity ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.Button.getAutoSizeTextAvailableSizes, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeTextAvailableSizes
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22031: Landroid/widget/Button;.getAutoSizeTextAvailableSizes ()[I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.Button.getAutoSizeTextType, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeTextType
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22032: Landroid/widget/Button;.getAutoSizeTextType ()I
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0005
I/dalvikvm( 3346): Could not find method android.widget.Button.setAutoSizeTextTypeUniformWithConfiguration, referenced from method android.support.v7.widget.AppCompatButton.setAutoSizeTextTypeUniformWithConfiguration
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22041: Landroid/widget/Button;.setAutoSizeTextTypeUniformWithConfiguration (IIII)V
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.Button.setAutoSizeTextTypeUniformWithPresetSizes, referenced from method android.support.v7.widget.AppCompatButton.setAutoSizeTextTypeUniformWithPresetSizes
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22042: Landroid/widget/Button;.setAutoSizeTextTypeUniformWithPresetSizes ([II)V
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
I/dalvikvm( 3346): Could not find method android.widget.Button.setAutoSizeTextTypeWithDefaults, referenced from method android.support.v7.widget.AppCompatButton.setAutoSizeTextTypeWithDefaults
W/dalvikvm( 3346): VFY: unable to resolve virtual method 22043: Landroid/widget/Button;.setAutoSizeTextTypeWithDefaults (I)V
D/dalvikvm( 3346): VFY: replacing opcode 0x6f at 0x0004
D/EGL_emulation( 3346): eglMakeCurrent: 0xb8ee5f20: ver 2 0
E/EGL_emulation( 3346): tid 3346: eglSurfaceAttrib(1199): error 0x3009 (EGL_BAD_MATCH)
W/HardwareRenderer( 3346): Backbuffer cannot be preserved
D/AndroidRuntime( 3346): Shutting down VM
W/dalvikvm( 3346): threadid=1: thread exiting with uncaught exception (group=0x94ceeb20)
E/AndroidRuntime( 3346): FATAL EXCEPTION: main
E/AndroidRuntime( 3346): Process: com.hoogle.quoteslibrary, PID: 3346
E/AndroidRuntime( 3346): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hoogle.quoteslibrary/com.hoogle.quoteslibrary.MainActivity}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
E/AndroidRuntime( 3346): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
E/AndroidRuntime( 3346): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
E/AndroidRuntime( 3346): at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 3346): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 3346): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 3346): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 3346): at android.app.ActivityThread.main(ActivityThread.java:5017)
E/AndroidRuntime( 3346): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3346): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 3346): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
E/AndroidRuntime( 3346): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
E/AndroidRuntime( 3346): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 3346): Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
E/AndroidRuntime( 3346): at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:469)
E/AndroidRuntime( 3346): at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323)
E/AndroidRuntime( 3346): at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
E/AndroidRuntime( 3346): at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
E/AndroidRuntime( 3346): at com.hoogle.quoteslibrary.MainActivity.onCreate(MainActivity.java:32)
E/AndroidRuntime( 3346): at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 3346): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 3346): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
E/AndroidRuntime( 3346): ... 11 more**
for android 5.0 ,5.1
Log messages will follow once session has started...
I/art ( 3102): Background sticky concurrent mark sweep GC freed 2513(202KB) AllocSpace objects, 0(0B) LOS objects, 23% free, 849KB/1117KB, paused 709us total 126.615ms
D/OpenGLRenderer( 3102): Use EGL_SWAP_BEHAVIOR_PRESERVED: true
D/ ( 3102): HostConnection::get() New Host Connection established 0xb3ec7a10, tid 3102
D/Atlas ( 3102): Validating map...
D/ ( 3102): HostConnection::get() New Host Connection established 0xae0822e0, tid 3119
I/OpenGLRenderer( 3102): Initialized EGL, version 1.4
W/OpenGLRenderer( 3102): Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/EGL_emulation( 3102): eglCreateContext: 0xae034a60: maj 2 min 0 rcv 2
D/EGL_emulation( 3102): eglMakeCurrent: 0xae034a60: ver 2 0
D/OpenGLRenderer( 3102): Enabling debug mode 0
D/EGL_emulation( 3102): eglMakeCurrent: 0xae034a60: ver 2 0
D/MediaPlayer( 3102): getMetadata
W/art ( 3102): Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/art ( 3102): Background partial concurrent mark sweep GC freed 461(38KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 1918KB/3MB, paused 5.934ms total 20.788ms
W/ResourcesManager( 3102): Asset path '/system/framework/com.android.media.remotedisplay.jar' does not exist or contains no resources.
W/ResourcesManager( 3102): Asset path '/system/framework/com.android.location.provider.jar' does not exist or contains no resources.
I/WebViewFactory( 3102): Loading com.android.webview version 39 (4212452-x86) (code 300007)
I/LibraryLoader( 3102): Time to load native libraries: 1 ms (timestamps 7244-7245)
I/LibraryLoader( 3102): Expected native library version number "",actual native library version number ""
V/WebViewChromiumFactoryProvider( 3102): Binding Chromium to main looper Looper (main, tid 1) {65917f2}
I/LibraryLoader( 3102): Expected native library version number "",actual native library version number ""
I/chromium( 3102): [INFO:library_loader_hooks.cc(104)] Chromium logging enabled: level = 0, default verbosity = 0
I/BrowserStartupController( 3102): Initializing chromium process, singleProcess=true
W/art ( 3102): Attempt to remove local handle scope entry from IRT, ignoring
W/AudioManagerAndroid( 3102): Requires BLUETOOTH permission
W/chromium( 3102): [WARNING:resource_bundle.cc(304)] locale_file_path.empty()
I/chromium( 3102): [INFO:aw_browser_main_parts.cc(65)] Load from apk succesful, fd=41 off=46184 len=3037
I/chromium( 3102): [INFO:aw_browser_main_parts.cc(78)] Loading webviewchromium.pak from, fd:42 off:229484 len:1089587
D/EGL_emulation( 3102): eglCreateContext: 0xa2014f40: maj 2 min 0 rcv 2
D/EGL_emulation( 3102): eglMakeCurrent: 0xa2014f40: ver 2 0
W/chromium( 3102): [WARNING:data_reduction_proxy_settings.cc(331)] SPDY proxy OFF at startup
W/art ( 3102): Attempt to remove local handle scope entry from IRT, ignoring
W/AwContents( 3102): onDetachedFromWindow called when already detached. Ignoring
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/Ads ( 3102): Google Play Service is out of date, the Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires updated Google Play Service.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/Ads ( 3102): Google Play Service is out of date, the Google Mobile Ads SDK will not integrate with Firebase. Admob/Firebase integration requires updated Google Play Service.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
D/zzcz ( 3102): File /data/data/com.hoogle.quoteslibrary/cache/1521499837408.dex not found. No need for deletion
I/Ads ( 3102): Starting ad request.
I/Ads ( 3102): This request is sent from a test device.
E/bf ( 3102): fd
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
W/GooglePlayServicesUtil( 3102): Google Play services out of date. Requires 12451000 but found 11302270
D/EGL_emulation( 3102): eglMakeCurrent: 0xae034a60: ver 2 0
W/chromium( 3102): [WARNING:simple_index_file.cc(337)] Could not map Simple Index file.
W/art ( 3102): Long monitor contention event with owner method=java.util.List java.util.Collections.emptyList() from Collections.java:2401 waiters=3 for 145ms
W/art ( 3102): Attempt to remove local handle scope entry from IRT, ignoring
W/AwContents( 3102): onDetachedFromWindow called when already detached. Ignoring
W/art ( 3102): Attempt to remove local handle scope entry from IRT, ignoring
W/art ( 3102): Attempt to remove local handle scope entry from IRT, ignoring
W/art ( 3102): Long monitor contention event with owner method=java.util.List java.util.Collections.emptyList() from Collections.java:2401 waiters=4 for 170ms
E/MediaPlayer( 3102): error (1, -38)
D/EGL_emulation( 3102): eglMakeCurrent: 0xae034a60: ver 2 0
E/bf ( 3102): fd
I/chromium( 3102): [INFO:CONSOLE(8)] "The key "viewport-fit" is not recognized and ignored.", source: https://www.brainyquote.com/topics/love (8)
You should look at line where is says :
E/AndroidRuntime( 3346): FATAL EXCEPTION: main
E/AndroidRuntime( 3346): Process: com.hoogle.quoteslibrary, PID: 3346
E/AndroidRuntime( 3346): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.hoogle.quoteslibrary/com.hoogle.quoteslibrary.MainActivity}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
The third line ends with:
java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
It seems a problem of Theme to fix in styles.xml
For example look at AppCompat does not support the current theme features - nothing works
E/AndroidRuntime( 3346): Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
The easiest way to solve the above issue is to put:-
Theme.AppCompat.NoActionBar as your parent theme.
otherwise put this in style
<style name="Theme.AppCompat.Light.NoActionBar.FullScreen" parent="#style/Theme.AppCompat.Light">
<item name="windowActionBar">true</item>
<item name="windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
Check this edited style

Genymotion with Cocos2d-x v3.11

I am using cocos2d-x v3.11 on mac and using Genymotion virtual devices.
In my /jni/Application.mk, I've put,
APP_ABI :=armeabi armeabi-v7a
APP_ABI :=x86
But always same error comes NO_MATCHING_ABIS and the app doesn't launch on the genymotion.
Though error log may not be needed but here it is:
D/dalvikvm( 1893): Late-enabling CheckJNI
I/ActivityManager( 587): Start proc org.company.numbergame for activity org.company.numbergame/org.cocos2dx.cpp.AppActivity: pid=1893 uid=10060 gids={50060, 3003}
D/dalvikvm( 1893): Trying to load lib /data/app-lib/org.company.numbergame-1/libMyGame.so 0xa4fe4688
E/dalvikvm( 1893): dlopen("/data/app-lib/org.company.numbergame-1/libMyGame.so") failed: dlopen failed: library "/system/lib/libhoudini.so" not found
D/AndroidRuntime( 1893): Shutting down VM
W/dalvikvm( 1893): threadid=1: thread exiting with uncaught exception (group=0xa4d17b20)
E/AndroidRuntime( 1893): FATAL EXCEPTION: main
E/AndroidRuntime( 1893): Process: org.company.numbergame, PID: 1893
E/AndroidRuntime( 1893): java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib/libhoudini.so" not found
E/AndroidRuntime( 1893): at java.lang.Runtime.loadLibrary(Runtime.java:364)
E/AndroidRuntime( 1893): at java.lang.System.loadLibrary(System.java:526)
E/AndroidRuntime( 1893): at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:246)
E/AndroidRuntime( 1893): at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:260)
E/AndroidRuntime( 1893): at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 1893): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1893): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime( 1893): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime( 1893): at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime( 1893): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime( 1893): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1893): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 1893): at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime( 1893): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1893): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1893): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime( 1893): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime( 1893): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 587): Force finishing activity org.company.numbergame/org.cocos2dx.cpp.AppActivity
D/dalvikvm( 587): GC_FOR_ALLOC freed 856K, 19% free 8972K/10964K, paused 11ms, total 11ms
D/MobileDataStateTracker( 587): default: setPolicyDataEnable(enabled=true)
W/ActivityManager( 587): Activity pause timeout for ActivityRecord{529f9534 u0 org.company.numbergame/org.cocos2dx.cpp.AppActivity t8 f}
W/EGL_genymotion( 763): eglSurfaceAttrib not implemented
D/MobileDataStateTracker( 587): default: setPolicyDataEnable(enabled=t
The eclipse emulators are really slow and I need to use Genymotion also for multi-device resolution testing.
EDIT:
A strange issue, I noticed after restarting eclipse. (I din't change my Application.mk). When I built project using cocos compile -p android
then it started building for x86 and worked when installed on genymotion device but didn't work for my actual devices. And when I removed x86 then it built for armeabi . But it doesn't work simultaneously on both kind of devices(armeabi and x86).
Does anyone know, how can I resolve it?
Genymotion works on x86 architecture. If you want to run an ARM build on genymotion then download the ARM translation and drop it on your genymotion emulator, then it will start accepting ARM build.

LibGDX on Netbeans and Android

I am trying to run my application that uses LibGDX on Andriod using the NetBeans IDE.
However the game crashes for some reason, I just got the "This application have stopped to work" message when I try to run the application. Everything works great on PC, so apparently I have missed something in the andriod set up. Setting up an andriod project on NetBeans is not an documented area and things seem to be different on Eclipse.
If someone have manged to run LibGDX on andriod by setting up the project in Netbeans, please share the steps you did.
Some code, I doubt that would help through:
public class Game extends AndroidApplication {
public void onCreate (android.os.Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
initialize((ApplicationListener) new game.GameSystem(new Size2i(100, 100)), false);
}
}
The debug output I get is the following:
D/dalvikvm( 478): Trying to load lib /data/data/com.RPGGame/lib/libgdx.so 0x40515708
D/dalvikvm( 478): Added shared lib /data/data/com.RPGGame/lib/libgdx.so 0x40515708
D/dalvikvm( 478): No JNI_OnLoad found in /data/data/com.RPGGame/lib/libgdx.so 0x40515708, skipping init
D/AndroidRuntime( 478): Shutting down VM
W/dalvikvm( 478): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 478): FATAL EXCEPTION: main
E/AndroidRuntime( 478): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.RPGGame/com.RPGGame.MainActivity}: java.lang.ClassCastException: game.GameSystem
E/AndroidRuntime( 478): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
E/AndroidRuntime( 478): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime( 478): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 478): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 478): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 478): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 478): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 478): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 478): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 478): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 478): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 478): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 478): Caused by: java.lang.ClassCastException: game.GameSystem
E/AndroidRuntime( 478): at com.RPGGame.MainActivity.onCreate(MainActivity.java:11)
E/AndroidRuntime( 478): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 478): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
E/AndroidRuntime( 478): ... 11 more
W/ActivityManager( 104): Force finishing activity com.RPGGame/.MainActivity
W/ActivityManager( 104): Activity pause timeout for HistoryRecord{40512238 com.RPGGame/.MainActivity}
D/dalvikvm( 408): GC_EXPLICIT freed 8K, 54% free 2537K/5511K, external 1625K/2137K, paused 102ms
W/ActivityManager( 104): Activity destroy timeout for HistoryRecord{40512238 com.RPGGame/.MainActivity}
D/dalvikvm( 420): GC_EXPLICIT freed 324K, 55% free 2532K/5511K, external 1625K/2137K, paused 183ms
D/dalvikvm( 322): GC_EXPLICIT freed 9K, 55% free 2589K/5703K, external 1625K/2137K, paused 72ms
So basically I cannot cast game.GameSystem to ApplicationListener. Even if GameSystem implements ApplicationListener.
GameSystem works as intended on PC, all I did for the Andriod project was to put that code in the main file.
Okay, I solved it now, turned out I used the wrong version of game.GameSystem.

ClassDefNotFoundError in my own classes

I developed the project in Eclipse, then moved to IntelliJ IDEA CE 12, then moved back to the Eclipse. IDEA had converted it to eclipse project not correctly, so I imported project from existing source and added line
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
to the section. Ok, it compiles successfully, but generates a lot of strange errors for the classes written by me and then crashes.
LogCat output:
E/dalvikvm( 9673): Could not find class 'com.capsule.launcher.views.Screen', referenced from method com.capsule.launcher.views.Workspace$1.onPageSelected
W/dalvikvm( 9673): VFY: unable to resolve check-cast 458 (Lcom/capsule/launcher/views/Screen;) in Lcom/capsule/launcher/views/Workspace$1;
D/dalvikvm( 9673): VFY: replacing opcode 0x1f at 0x0010
W/dalvikvm( 9673): Unable to resolve superclass of Lcom/capsule/launcher/views/CellLayout; (346)
W/dalvikvm( 9673): Link of class 'Lcom/capsule/launcher/views/CellLayout;' failed
W/dalvikvm( 9673): Unable to resolve superclass of Lcom/capsule/launcher/views/DockBar; (455)
W/dalvikvm( 9673): Link of class 'Lcom/capsule/launcher/views/DockBar;' failed
W/dalvikvm( 9673): VFY: unable to find class referenced in signature (Lcom/capsule/launcher/views/DockBar;)
W/dalvikvm( 9673): Unable to resolve superclass of Lcom/capsule/launcher/views/CellLayout; (346)
W/dalvikvm( 9673): Link of class 'Lcom/capsule/launcher/views/CellLayout;' failed
W/dalvikvm( 9673): Unable to resolve superclass of Lcom/capsule/launcher/views/DockBar; (455)
W/dalvikvm( 9673): Link of class 'Lcom/capsule/launcher/views/DockBar;' failed
E/dalvikvm( 9673): Could not find class 'com.capsule.launcher.views.DockBar', referenced from method com.capsule.launcher.views.WorkspaceHolder.onLayout
W/dalvikvm( 9673): VFY: unable to resolve instanceof 456 (Lcom/capsule/launcher/views/DockBar;) in Lcom/capsule/launcher/views/WorkspaceHolder;
D/dalvikvm( 9673): VFY: replacing opcode 0x20 at 0x001b
D/AndroidRuntime( 9673): Shutting down VM
W/dalvikvm( 9673): threadid=1: thread exiting with uncaught exception (group=0x40d6e300)
E/AndroidRuntime( 9673): FATAL EXCEPTION: main
E/AndroidRuntime( 9673): java.lang.NoClassDefFoundError: com.capsule.launcher.views.DockBar
E/AndroidRuntime( 9673): at com.capsule.launcher.LauncherActivity.createWorkspace(LauncherActivity.java:116)
E/AndroidRuntime( 9673): at com.capsule.launcher.LauncherActivity.onCreate(LauncherActivity.java:58)
E/AndroidRuntime( 9673): at android.app.Activity.performCreate(Activity.java:5008)
E/AndroidRuntime( 9673): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime( 9673): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
E/AndroidRuntime( 9673): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime( 9673): at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime( 9673): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime( 9673): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 9673): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 9673): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime( 9673): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 9673): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 9673): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime( 9673): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 9673): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 301): Force finishing activity com.capsule.launcher/.LauncherActivity
D/dalvikvm( 9673): GC_CONCURRENT freed 4207K, 20% free 19381K/23943K, paused 13ms+4ms, total 52ms
W/ActivityManager( 301): Activity pause timeout for ActivityRecord{418f0cd0 com.capsule.launcher/.LauncherActivity}
D/dalvikvm( 301): GC_CONCURRENT freed 1886K, 28% free 22076K/30279K, paused 4ms+9ms, total 99ms
W/ActivityManager( 301): Activity destroy timeout for ActivityRecord{418f0cd0 com.capsule.launcher/.LauncherActivity}
D/Finsky ( 7843): [1] 5.onFinished: Installation state replication succeeded.
It worked fine in IDEA and Eclipse before!
I don't know what happend to your project, but try in Eclipse: Project--> Clean--> YourProject
Clean and Build Your Project in Eclipse.Also check in Android Manifest file ,if launcher Activity is defined correctly with its package name.
Its not a good idea to use it like this(manually) rather we can export projects from IntelliJ IDEA to Eclipse in simple steps.
please follow this standard document for the above.
http://www.jetbrains.com/idea/webhelp/exporting-intellij-idea-project-to-eclipse.html
hope this will help you.
if you use librarys in your project , try in build path add to the library export
If you do have the old working eclipse project then copy/replace all the new code and jars to it, from the IntelliJ IDEA project. Remember to copy/replace only the code and jars not the IntelliJ IDEA specific settings files.
Right click on the project which has issues and select properties.
Select the appropriate Android build (1.1, 1.5 or 1.5 with google api) and say ok.
Again right click on the project and select "Android Tools > Fix Project Properties"
Fix the imports once (if required)
Refresh the project and you should be ready to go without any manual editing
Hope this helps.

Why can Necessitas not support to display Chinese characters in my qt application for android?

Necessitas is the codename for the port of Qt on the Android Operating System and of the user-friendly Qt Creator Integration with Android. Now , using Necessitas (QT for Android),I can run & debug my Qt Applications on Android Devices.
But I got these log when I want to setText("中文") on QLabel.
Why can Necessitas not support to display Chinese characters in my qt application for android ? Or, what steps do I have less ?
Starting remote process ...
I/Qt JAVA ( 469): surfaceChanged: 480,762
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8
D/dalvikvm( 469): No JNI_OnLoad found in /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtCore.so 0x44ede7e8, skipping init
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8
D/dalvikvm( 469): No JNI_OnLoad found in /data/data/eu.licentia.necessitas.ministro/files/qt/lib/libQtGui.so 0x44ede7e8, skipping init
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-8.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-8.so 0x44ede7e8
I/Qt ( 469): qt start
D/dalvikvm( 469): Trying to load lib /data/data/eu.licentia.necessitas.industrius.example.Yiyaaixuexi/lib/libYiyaaixuexi.so 0x44ede7e8
D/dalvikvm( 469): Added shared lib /data/data/eu.licentia.necessitas.industrius.example.Yiyaaixuexi/lib/libYiyaaixuexi.so 0x44ede7e8
I/Qt ( 469): qt start
W/ApplicationContext( 469): Unable to create files directory
D/AndroidRuntime( 469): Shutting down VM
W/dalvikvm( 469): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
E/AndroidRuntime( 469): FATAL EXCEPTION: main
E/AndroidRuntime( 469): java.lang.NullPointerException
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity.startApplication(QtActivity.java:126)
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity.access$000(QtActivity.java:62)
E/AndroidRuntime( 469): at eu.licentia.necessitas.industrius.QtActivity$1$1.run(QtActivity.java:149)
E/AndroidRuntime( 469): at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime( 469): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 469): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 469): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 469): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 469): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 469): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 469): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 469): at dalvik.system.NativeStart.main(Native Method)
I/Process ( 469): Sending signal. PID: 469 SIG: 9
Is this question ambiguous, vague, incomplete, overly broad, or rhetorical ? Now I'm sure that it doesn't support at all.

Categories

Resources