I am trying to integrate the QR reading capabilities of Zxing into a stand-alone app, and have been using this very helpful guide http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/ along with these pointers Integrating the ZXing library directly into my Android application but after having built the library, and followed all steps to launch this activity on a button press, it still does not work. The app launches, but upon pressing the button, it crashes.
activity_main.html
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="#dimen/activity_vertical_margin"
android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:paddingTop="#dimen/activity_vertical_margin"
tools:context=".MainActivity" >
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="buttPress"
android:text="#string/button_send"
android:textColor="#FFFFFF"
/>
</RelativeLayout>
MainActivity.java
package se.mydomain.myapp;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
public void buttPress(View view) {
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.putExtra("SCAN_MODE", "QR_CODE_MODE");
startActivityForResult(intent, 0);
}
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
String contents = intent.getStringExtra("SCAN_RESULT");
String format = intent.getStringExtra("SCAN_RESULT_FORMAT");
// Handle successful scan
} else if (resultCode == RESULT_CANCELED) {
// Handle cancel
}
}
}
}
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="se.mydomain.myapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.CAMERA"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="se.mydomain.myapp.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>
<activity android:name="com.google.zxing.client.android.CaptureActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.zxing.client.android.SCAN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
This is the output in logcat upon launching and then pressing the button. Am I missing something obvious here? This happens both when emulating and when running on a phone, btw.
04-16 13:31:58.313: D/gralloc_goldfish(1359): Emulator without GPU emulation detected.
04-16 13:32:13.034: I/Choreographer(1359): Skipped 82 frames! The application may be doing too much work on its main thread.
04-16 13:32:13.093: W/dalvikvm(1359): VFY: unable to resolve static field 872 (ISSUE_NUMBER) in Lcom/google/zxing/ResultMetadataType;
04-16 13:32:13.103: D/dalvikvm(1359): VFY: replacing opcode 0x62 at 0x0017
04-16 13:32:13.103: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.133: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;)
04-16 13:32:13.133: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/ResultPoint;)
04-16 13:32:13.133: I/dalvikvm(1359): Could not find method com.google.zxing.ResultPoint.getX, referenced from method com.google.zxing.client.android.CaptureActivity.drawLine
04-16 13:32:13.143: W/dalvikvm(1359): VFY: unable to resolve virtual method 3648: Lcom/google/zxing/ResultPoint;.getX ()F
04-16 13:32:13.143: D/dalvikvm(1359): VFY: replacing opcode 0x6e at 0x0000
04-16 13:32:13.143: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.175: I/dalvikvm(1359): Could not find method com.google.zxing.Result.getResultPoints, referenced from method com.google.zxing.client.android.CaptureActivity.drawResultPoints
04-16 13:32:13.175: W/dalvikvm(1359): VFY: unable to resolve virtual method 3644: Lcom/google/zxing/Result;.getResultPoints ()[Lcom/google/zxing/ResultPoint;
04-16 13:32:13.183: D/dalvikvm(1359): VFY: replacing opcode 0x6e at 0x0003
04-16 13:32:13.183: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.224: I/dalvikvm(1359): Could not find method com.google.zxing.Result.toString, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeExternally
04-16 13:32:13.224: W/dalvikvm(1359): VFY: unable to resolve virtual method 3647: Lcom/google/zxing/Result;.toString ()Ljava/lang/String;
04-16 13:32:13.224: D/dalvikvm(1359): VFY: replacing opcode 0x74 at 0x007d
04-16 13:32:13.253: I/dalvikvm(1359): Could not find method com.google.zxing.Result.getText, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeExternally
04-16 13:32:13.253: W/dalvikvm(1359): VFY: unable to resolve virtual method 3645: Lcom/google/zxing/Result;.getText ()Ljava/lang/String;
04-16 13:32:13.264: D/dalvikvm(1359): VFY: replacing opcode 0x74 at 0x01c0
04-16 13:32:13.264: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.284: I/dalvikvm(1359): Could not find method com.google.zxing.Result.getBarcodeFormat, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecodeInternally
04-16 13:32:13.284: W/dalvikvm(1359): VFY: unable to resolve virtual method 3641: Lcom/google/zxing/Result;.getBarcodeFormat ()Lcom/google/zxing/BarcodeFormat;
04-16 13:32:13.284: D/dalvikvm(1359): VFY: replacing opcode 0x74 at 0x004c
04-16 13:32:13.324: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.354: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.364: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.384: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.384: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.394: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.394: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.414: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.454: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.454: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.484: I/dalvikvm(1359): Could not find method com.google.zxing.Result.getText, referenced from method com.google.zxing.client.android.CaptureActivity.handleDecode
04-16 13:32:13.494: W/dalvikvm(1359): VFY: unable to resolve virtual method 3645: Lcom/google/zxing/Result;.getText ()Ljava/lang/String;
04-16 13:32:13.494: D/dalvikvm(1359): VFY: replacing opcode 0x6e at 0x0068
04-16 13:32:13.504: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.504: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.524: W/dalvikvm(1359): VFY: unable to find class referenced in signature (Lcom/google/zxing/Result;)
04-16 13:32:13.574: W/dalvikvm(1359): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/google/zxing/client/android/CaptureActivity;
04-16 13:32:13.584: W/dalvikvm(1359): Class init failed in newInstance call (Lcom/google/zxing/client/android/CaptureActivity;)
04-16 13:32:13.584: D/AndroidRuntime(1359): Shutting down VM
04-16 13:32:13.594: W/dalvikvm(1359): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
04-16 13:32:13.664: E/AndroidRuntime(1359): FATAL EXCEPTION: main
04-16 13:32:13.664: E/AndroidRuntime(1359): java.lang.ExceptionInInitializerError
04-16 13:32:13.664: E/AndroidRuntime(1359): at java.lang.Class.newInstanceImpl(Native Method)
04-16 13:32:13.664: E/AndroidRuntime(1359): at java.lang.Class.newInstance(Class.java:1319)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.os.Handler.dispatchMessage(Handler.java:99)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.os.Looper.loop(Looper.java:137)
04-16 13:32:13.664: E/AndroidRuntime(1359): at android.app.ActivityThread.main(ActivityThread.java:5041)
04-16 13:32:13.664: E/AndroidRuntime(1359): at java.lang.reflect.Method.invokeNative(Native Method)
04-16 13:32:13.664: E/AndroidRuntime(1359): at java.lang.reflect.Method.invoke(Method.java:511)
04-16 13:32:13.664: E/AndroidRuntime(1359): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-16 13:32:13.664: E/AndroidRuntime(1359): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-16 13:32:13.664: E/AndroidRuntime(1359): at dalvik.system.NativeStart.main(Native Method)
04-16 13:32:13.664: E/AndroidRuntime(1359): Caused by: java.lang.NoClassDefFoundError: com.google.zxing.ResultMetadataType
04-16 13:32:13.664: E/AndroidRuntime(1359): at com.google.zxing.client.android.CaptureActivity.<clinit>(CaptureActivity.java:101)
04-16 13:32:13.664: E/AndroidRuntime(1359): ... 15 more
04-16 13:32:19.034: I/Process(1359): Sending signal. PID: 1359 SIG: 9
Related
I am trying to use Snackbar from the support library but when I lunch the app on an emulator with an API below 21 , the app crush.
I think the support library will make the snackbar work on an older version , is that correct ?
Gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.user.test"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.2.0'
compile 'com.automationrockstars:design:1.0.3'
}
MainActivity.java
package com.example.user.test;
import android.support.design.widget.Snackbar;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.LinearLayout;
public class MainActivity extends AppCompatActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
#Override
protected void onStart() {
super.onStart();
LinearLayout l = (LinearLayout) findViewById(R.id.linear1);
Snackbar snackbar = Snackbar.make(l,"Hello",Snackbar.LENGTH_LONG);
snackbar.show();
}
}
Edit (the logcat)
03-04 18:54:49.827 1468-1468/? D/dalvikvm: Late-enabling CheckJNI
03-04 18:54:49.911 1468-1474/? E/jdwp: Failed sending reply to debugger: Broken pipe
03-04 18:54:49.911 1468-1474/? D/dalvikvm: Debugger has detached; object registry had 1 entries
03-04 18:54:49.939 1468-1468/? I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
03-04 18:54:49.951 1468-1468/? W/dalvikvm: VFY: unable to resolve interface method 20911: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
03-04 18:54:49.951 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
03-04 18:54:49.955 1468-1468/? W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
03-04 18:54:49.959 1468-1468/? I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
03-04 18:54:49.963 1468-1468/? W/dalvikvm: VFY: unable to resolve interface method 20913: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
03-04 18:54:49.963 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
03-04 18:54:49.963 1468-1468/? I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
03-04 18:54:49.963 1468-1468/? W/dalvikvm: VFY: unable to resolve interface method 20917: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
03-04 18:54:49.963 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
03-04 18:54:49.963 1468-1468/? I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
03-04 18:54:49.963 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 487: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
03-04 18:54:49.963 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
03-04 18:54:49.963 1468-1468/? I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
03-04 18:54:49.967 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 509: Landroid/content/res/TypedArray;.getType (I)I
03-04 18:54:49.967 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
03-04 18:54:50.059 1468-1468/? I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
03-04 18:54:50.059 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 21394: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
03-04 18:54:50.063 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
03-04 18:54:50.071 1468-1468/? I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
03-04 18:54:50.087 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 301: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
03-04 18:54:50.087 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
03-04 18:54:50.095 1468-1468/? I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
03-04 18:54:50.095 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 450: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-04 18:54:50.095 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
03-04 18:54:50.095 1468-1468/? I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
03-04 18:54:50.095 1468-1468/? W/dalvikvm: VFY: unable to resolve virtual method 452: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
03-04 18:54:50.095 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
03-04 18:54:50.107 1468-1468/? E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
03-04 18:54:50.107 1468-1468/? W/dalvikvm: VFY: unable to resolve instanceof 146 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
03-04 18:54:50.107 1468-1468/? D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
03-04 18:54:50.187 1468-1471/? D/dalvikvm: GC_CONCURRENT freed 188K, 10% free 2682K/2980K, paused 2ms+1ms, total 62ms
03-04 18:54:50.187 1468-1468/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 57ms
03-04 18:54:50.187 1468-1468/? D/AndroidRuntime: Shutting down VM
03-04 18:54:50.187 1468-1468/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa61fe908)
03-04 18:54:50.191 1468-1468/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.user.test/com.example.user.test.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.support.design.widget.Snackbar.make(Snackbar.java:136)
at com.example.user.test.MainActivity.onStart(MainActivity.java:21)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1164)
at android.app.Activity.performStart(Activity.java:5114)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2153)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
at android.app.ActivityThread.access$600(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
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:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
try this code:
LinearLayout l;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
l = (LinearLayout) findViewById(R.id.linear1);
}
#Override
protected void onStart() {
super.onStart();
Snackbar snackbar = Snackbar.make(l,"Hello",Snackbar.LENGTH_LONG);
snackbar.show();
}
if that does not work create snackbar using: android.R.id.content
Snackbar.make(findViewById(android.R.id.content), "Hello", Snackbar.LENGTH_LONG).show();
I'm encountering some problems running my app on devices with android version <5 (works fine on Lollipop and Marshmellow, crashes on start on Jelly Bean).
Things that can help: i'm using google maps on my app.
Here's the debug code:
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1302)
I/ActivityThread: Pub com.developer.project.firebaseinitprovider: com.google.firebase.provider.FirebaseInitProvider
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts
W/dalvikvm: VFY: unable to resolve interface method 21082: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;)
I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested
W/dalvikvm: VFY: unable to resolve interface method 21084: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode
W/dalvikvm: VFY: unable to resolve interface method 21088: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm: VFY: replacing opcode 0x72 at 0x0002
I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
W/dalvikvm: VFY: unable to resolve virtual method 683: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
W/dalvikvm: VFY: unable to resolve virtual method 705: Landroid/content/res/TypedArray;.getType (I)I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0008
I/dalvikvm: Could not find method android.support.graphics.drawable.VectorDrawableCompat.getLayoutDirection, referenced from method android.support.graphics.drawable.VectorDrawableCompat.needMirroring
W/dalvikvm: VFY: unable to resolve virtual method 3949: Landroid/support/graphics/drawable/VectorDrawableCompat;.getLayoutDirection ()I
D/dalvikvm: VFY: replacing opcode 0x6e at 0x000f
I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild
W/dalvikvm: VFY: unable to resolve virtual method 21671: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode;
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
I/dalvikvm: Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged
W/dalvikvm: VFY: unable to resolve virtual method 20966: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
D/dalvikvm: VFY: replacing opcode 0x6f at 0x0007
I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList
W/dalvikvm: VFY: unable to resolve virtual method 442: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0006
I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
W/dalvikvm: VFY: unable to resolve virtual method 646: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
W/dalvikvm: VFY: unable to resolve virtual method 648: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
W/dalvikvm: VFY: unable to resolve instanceof 186 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper;
D/dalvikvm: VFY: replacing opcode 0x20 at 0x000c
D/dalvikvm: GC_CONCURRENT freed 221K, 4% free 8135K/8391K, paused 14ms+1ms, total 24ms
W/ResourceType: Failure getting entry for 0x7f020083 (t=1 e=131) in package 0 (error -75)
D/AndroidRuntime: Shutting down VM
W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xae6aa228)
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.developer.project/com.developer.project.MainActivity}: android.view.InflateException: Binary XML file line #30: Error inflating class ImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #30: Error inflating class ImageView
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.developer.project.MainActivity.onCreate(MainActivity.java:38)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020083 a=-1 r=0x7f020083}
at android.content.res.Resources.loadDrawable(Resources.java:1897)
at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
at android.widget.ImageView.<init>(ImageView.java:120)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:60)
at android.support.v7.widget.AppCompatImageView.<init>(AppCompatImageView.java:56)
at android.support.v7.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:106)
at android.support.v7.app.AppCompatDelegateImplV9.createView(AppCompatDelegateImplV9.java:1017)
at android.support.v7.app.AppCompatDelegateImplV9.onCreateView(AppCompatDelegateImplV9.java:1076)
at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:675)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:143)
at com.developer.project.MainActivity.onCreate(MainActivity.java:38)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
In the exception, you can see "Error inflating class ImageView", but if I remove the ImageView the error it's in the textvivew and so on...
The error in "MainActivity" is on the line "setContentView"
This is the mainActivity xml (I think not useful...):
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#F8F8F8">
<TextView
android:layout_width="100dp"
android:layout_height="5dp"
android:id="#+id/textView72"
android:textSize="20dp"
android:gravity="center_vertical"
android:background="#CCCCCC"
android:paddingLeft="10dp"
android:textColor="#FFFFFF"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true" />
<ImageView
android:layout_width="40dp"
android:layout_height="40dp"
android:id="#+id/imageViewInfo"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:src="#drawable/info_logo"
android:layout_marginBottom="5dp"
android:layout_marginRight="5dp" />
<GridLayout
android:layout_width="295dp"
android:layout_height="175dp"
android:id="#+id/gridLayoutStart"
android:background="#FFF9F9"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true">
<Button
android:layout_width="285dp"
android:layout_height="85dp"
android:text="#string/searchByCity"
android:id="#+id/btnSearchCity"
android:layout_row="0"
android:layout_column="0"
android:background="#drawable/circlebutton_top"
android:textColor="#FFFFFF"
android:textSize="18dp"
android:typeface="sans"
android:textAllCaps="false"
android:drawableLeft="#drawable/search_40"
android:paddingLeft="10dp"
android:layout_columnSpan="2"/>
<Button
android:layout_width="285dp"
android:layout_height="85dp"
android:text="#string/nearMe"
android:id="#+id/btnNearMe"
android:layout_row="1"
android:layout_column="0"
android:background="#drawable/circlebutton_bottom"
android:textColor="#FFFFFF"
android:textSize="18dp"
android:typeface="sans"
android:textAllCaps="false"
android:drawableLeft="#drawable/map_40"
android:paddingLeft="10dp"
android:layout_marginTop="5dp"
android:layout_columnSpan="2" />
</GridLayout>
</RelativeLayout>
<ListView
android:id="#+id/navListBench"
android:layout_width="200dp"
android:layout_height="match_parent"
android:layout_gravity="left|start"
android:background="#ffeeeeee"/>
</android.support.v4.widget.DrawerLayout>
I confirm that on my devices with android 5 and 6 the app is working perfectly...
Solved.
The problem was not firebase, but the drawables.
In the exception, the right thing to watch was "Resource is not a Drawable".
There was two drawable folders: one called "drawable" and an another "drawable-21".
I've moved all to the main drawable folder and now it's working.
What does these exceptions really mean?I have already given the permission of Internet in manifest file.
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
LOGCAT after running the app-
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.019 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:21:31.031 6603-6603/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
05-02 15:53:47.830 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.830 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.Login.access$super
05-02 15:53:47.834 16081-16081/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
05-02 15:54:04.238 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestPermissions, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.238 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 193: Landroid/app/Activity;.requestPermissions ([Ljava/lang/String;I)V
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.onRequestPermissionsResult, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 160: Landroid/app/Activity;.onRequestPermissionsResult (I[Ljava/lang/String;[I)V
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.requestVisibleBehind, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 194: Landroid/app/Activity;.requestVisibleBehind (Z)Z
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application I/dalvikvm: Could not find method android.app.Activity.shouldShowRequestPermissionRationale, referenced from method com.example.somya.client_feedback_application.MainActivity.access$super
05-02 15:54:04.246 16517-16517/com.example.somya.client_feedback_application W/dalvikvm: VFY: unable to resolve virtual method 227: Landroid/app/Activity;.shouldShowRequestPermissionRationale (Ljava/lang/String;)Z
Those are not exceptions. They are messages from the runtime, indicating that your code refers to classes or methods that do not appear to exist on the version of Android you are running on. This is typical if you are using Build.VERSION.SDK_INT to conditionally execute code on newer devices and skip that code on older devices.
I've written a server and a local proxy using netty. The project runs well on my pc, but when I change a bit to make it an android app, it just cannot work.
I tried many times and find that after insert the following code, things go wrong.
pipeline.addLast("spdyEncoder", new SpdyFrameEncoder(3));
pipeline.addLast("spdyDecoder", new SpdyFrameDecoder(3));
I compared the logs between adding or not the spdy codec, the difference is
"Could not find class 'com.jcraft.jzlib.Deflater', referenced from method io.netty.handler.codec.spdy.SpdyHeaderBlockJZlibEncoder.", SO i guess the problem is with the jzlib deflater, but I really don't know how to fix it. Can anybody help me, thanks a lot in advance.
Here is the LogCat:
09-22 03:35:15.761: D/Multiplex(863): initInstance
09-22 03:35:15.761: D/MultiplexChannelConnMgr(863): constructor
09-22 03:35:15.771: I/dalvikvm(863): Could not find method org.slf4j.LoggerFactory.getILoggerFactory, referenced from method io.netty.util.internal.logging.Slf4JLoggerFactory.<init>
09-22 03:35:15.771: W/dalvikvm(863): VFY: unable to resolve static method 28005: Lorg/slf4j/LoggerFactory;.getILoggerFactory ()Lorg/slf4j/ILoggerFactory;
09-22 03:35:15.771: D/dalvikvm(863): VFY: replacing opcode 0x71 at 0x0026
09-22 03:35:15.781: I/dalvikvm(863): Could not find method org.slf4j.LoggerFactory.getLogger, referenced from method io.netty.util.internal.logging.Slf4JLoggerFactory.newInstance
09-22 03:35:15.781: W/dalvikvm(863): VFY: unable to resolve static method 28006: Lorg/slf4j/LoggerFactory;.getLogger (Ljava/lang/String;)Lorg/slf4j/Logger;
09-22 03:35:15.794: D/dalvikvm(863): VFY: replacing opcode 0x71 at 0x0002
09-22 03:35:15.862: W/System.err(863): log4j:WARN No appenders could be found for logger (io.netty.util.internal.logging.InternalLoggerFactory).
09-22 03:35:15.871: W/System.err(863): log4j:WARN Please initialize the log4j system properly.
09-22 03:35:15.871: W/System.err(863): log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
09-22 03:35:16.110: D/dalvikvm(863): GC_CONCURRENT freed 121K, 9% free 2660K/2904K, paused 70ms+38ms, total 213ms
09-22 03:35:16.180: E/dalvikvm(863): Could not find class 'javassist.ClassPool', referenced from method io.netty.util.internal.JavassistTypeParameterMatcherGenerator.<clinit>
09-22 03:35:16.180: W/dalvikvm(863): VFY: unable to resolve new-instance 2027 (Ljavassist/ClassPool;) in Lio/netty/util/internal/JavassistTypeParameterMatcherGenerator;
09-22 03:35:16.180: D/dalvikvm(863): VFY: replacing opcode 0x22 at 0x0008
09-22 03:35:16.180: I/dalvikvm(863): Could not find method javassist.ClassPool.getAndRename, referenced from method io.netty.util.internal.JavassistTypeParameterMatcherGenerator.generate
09-22 03:35:16.190: W/dalvikvm(863): VFY: unable to resolve virtual method 16552: Ljavassist/ClassPool;.getAndRename (Ljava/lang/String;Ljava/lang/String;)Ljavassist/CtClass;
09-22 03:35:16.190: D/dalvikvm(863): VFY: replacing opcode 0x6e at 0x0032
09-22 03:35:16.190: I/dalvikvm(863): Could not find method javassist.ClassPool.appendClassPath, referenced from method io.netty.util.internal.JavassistTypeParameterMatcherGenerator.appendClassPath
09-22 03:35:16.190: W/dalvikvm(863): VFY: unable to resolve virtual method 16550: Ljavassist/ClassPool;.appendClassPath (Ljava/lang/String;)Ljavassist/ClassPath;
09-22 03:35:16.190: D/dalvikvm(863): VFY: replacing opcode 0x6e at 0x0002
09-22 03:35:16.190: W/dalvikvm(863): VFY: unable to find class referenced in signature (Ljavassist/ClassPath;)
09-22 03:35:16.190: I/dalvikvm(863): Could not find method javassist.ClassPool.appendClassPath, referenced from method io.netty.util.internal.JavassistTypeParameterMatcherGenerator.appendClassPath
09-22 03:35:16.190: W/dalvikvm(863): VFY: unable to resolve virtual method 16551: Ljavassist/ClassPool;.appendClassPath (Ljavassist/ClassPath;)Ljavassist/ClassPath;
09-22 03:35:16.190: D/dalvikvm(863): VFY: replacing opcode 0x6e at 0x0002
09-22 03:35:16.190: D/dalvikvm(863): DexOpt: unable to opt direct call 0x40a5 at 0x0b in Lio/netty/util/internal/JavassistTypeParameterMatcherGenerator;.<clinit>
09-22 03:35:16.200: D/dalvikvm(863): DexOpt: unable to opt direct call 0x40a4 at 0x16 in Lio/netty/util/internal/JavassistTypeParameterMatcherGenerator;.<clinit>
09-22 03:35:16.200: W/dalvikvm(863): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lio/netty/util/internal/JavassistTypeParameterMatcherGenerator;
09-22 03:35:16.260: D/MultiplexChannelConnMgr(863): Before connect to 10.108.112.239:9001
09-22 03:35:16.330: E/dalvikvm(863): Could not find class 'com.jcraft.jzlib.Deflater', referenced from method io.netty.handler.codec.spdy.SpdyHeaderBlockJZlibEncoder.<init>
09-22 03:35:16.330: W/dalvikvm(863): VFY: unable to resolve new-instance 574 (Lcom/jcraft/jzlib/Deflater;) in Lio/netty/handler/codec/spdy/SpdyHeaderBlockJZlibEncoder;
09-22 03:35:16.330: D/dalvikvm(863): VFY: replacing opcode 0x22 at 0x0005
09-22 03:35:16.340: W/dalvikvm(863): VFY: unable to resolve instance field 1051
09-22 03:35:16.340: D/dalvikvm(863): VFY: replacing opcode 0x54 at 0x0003
09-22 03:35:16.340: W/dalvikvm(863): VFY: unable to resolve instance field 1051
09-22 03:35:16.340: D/dalvikvm(863): VFY: replacing opcode 0x5b at 0x0049
09-22 03:35:16.350: W/dalvikvm(863): VFY: unable to resolve instance field 1051
09-22 03:35:16.350: D/dalvikvm(863): VFY: replacing opcode 0x5b at 0x000b
09-22 03:35:16.361: I/dalvikvm(863): Could not find method com.jcraft.jzlib.Deflater.deflateEnd, referenced from method io.netty.handler.codec.spdy.SpdyHeaderBlockJZlibEncoder.end
09-22 03:35:16.361: W/dalvikvm(863): VFY: unable to resolve virtual method 4173: Lcom/jcraft/jzlib/Deflater;.deflateEnd ()I
09-22 03:35:16.361: D/dalvikvm(863): VFY: replacing opcode 0x6e at 0x000b
09-22 03:35:16.361: D/dalvikvm(863): DexOpt: unable to opt direct call 0x104b at 0x07 in Lio/netty/handler/codec/spdy/SpdyHeaderBlockJZlibEncoder;.<init>
09-22 03:35:16.381: D/MultiplexChannelConnMgr(863): Catch error: null
**09-22 03:35:16.381: W/System.err(863): java.nio.channels.ClosedChannelException**
You need to add com.jcraft.jzlib to your classpath. This is done by adding jzlib jar.
http://www.jcraft.com/jzlib/
Some jar libraries in the libs/ folder are not picked up in some cases.
Just like arcgis for Android sample project "HelloWord", compiled without problems, but can't run properly.
04-16 14:56:33.104: D/dalvikvm(9369): Late-enabling CheckJNI
04-16 14:56:33.134: I/dalvikvm(9369): Turning on JNI app bug workarounds for target SDK version 7...
04-16 14:56:33.234: D/ArcGIS.LifeCycle(9369): map.onChildViewAdded
04-16 14:56:33.244: D/ArcGIS.LifeCycle(9369): map.initLayer
04-16 14:56:33.244: D/ArcGIS.LifeCycle(9369): >>>layer init startcom.esri.android.map.ags.ArcGISTiledMapServiceLayer
04-16 14:56:33.244: D/ArcGIS.LifeCycle(9369): layer init...
04-16 14:56:33.244: W/dalvikvm(9369): VFY: unable to find class referenced in signature (Lorg/codehaus/jackson/JsonNode;)
04-16 14:56:33.244: I/dalvikvm(9369): Could not find method org.codehaus.jackson.JsonNode.get, referenced from method com.esri.android.a.e.a
04-16 14:56:33.244: W/dalvikvm(9369): VFY: unable to resolve virtual method 4781: Lorg/codehaus/jackson/JsonNode;.get (Ljava/lang/String;)Lorg/codehaus/jackson/JsonNode;
04-16 14:56:33.244: D/dalvikvm(9369): VFY: replacing opcode 0x6e at 0x0005
04-16 14:56:33.244: I/dalvikvm(9369): Could not find method
org.codehaus.jackson.JsonNode.getTextValue, referenced from method com.esri.android.a.e.a
04-16 14:56:33.244: W/dalvikvm(9369): VFY: unable to resolve virtual method 4784: Lorg/codehaus/jackson/JsonNode;.getTextValue ()Ljava/lang/String;
04-16 14:56:33.244: D/dalvikvm(9369): VFY: replacing opcode 0x6e at 0x000b
04-16 14:56:33.244: E/HtcAppUsageStatsListener(9369): afterPerformResume
04-16 14:56:33.244: E/HtcAppUsageStatsListener(9369): java.lang.NullPointerException
04-16 14:56:33.244: E/HtcAppUsageStatsListener(9369): at android.app.HtcAppUsageStatsListener.afterPerformResume(HtcAppUsageStatsListener.java:77)
04-16 14:56:33.244: D/ArcGIS.TileCache(9369): max number of cached tiles:1000
04-16 14:56:33.244: D/ArcGIS.LifeCycle(9369): sdcache inited.
04-16 14:56:33.244: D/ArcGIS.TileCache(9369): SDCardCache
04-16 14:56:33.244: E/dalvikvm(9369): Could not find class
'org.codehaus.jackson.JsonFactory', referenced from method com.esri.core.internal.b.a.e.<clinit>
04-16 14:56:33.244: W/dalvikvm(9369): VFY: unable to resolve new-instance 717
(Lorg/codehaus/jackson/JsonFactory;) in Lcom/esri/core/internal/b/a/e;
04-16 14:56:33.244: D/dalvikvm(9369): VFY: replacing opcode 0x22 at 0x0000
04-16 14:56:33.244: W/dalvikvm(9369): VFY: unable to find class referenced in signature (Lorg/codehaus/jackson/JsonFactory;)
04-16 14:56:33.254: I/dalvikvm(9369): Could not find method org.codehaus.jackson.JsonFactory.createJsonParser, referenced from method com.esri.core.internal.b.a.e.a
04-16 14:56:33.254: W/dalvikvm(9369): VFY: unable to resolve virtual method 4760: Lorg/codehaus/jackson/JsonFactory;.createJsonParser
(Ljava/io/InputStream;)Lorg/codehaus/jackson/JsonParser;
04-16 14:56:33.254: D/dalvikvm(9369): VFY: replacing opcode 0x6e at 0x016c
04-16 14:56:33.254: I/dalvikvm(9369): Could not find method org.codehaus.jackson.JsonFactory.createJsonParser, referenced from method com.esri.core.internal.b.a.e.a
04-16 14:56:33.254: W/dalvikvm(9369): VFY: unable to resolve virtual method 4761: Lorg/codehaus/jackson/JsonFactory;.createJsonParser (Ljava/lang/String;)Lorg/codehaus/jackson/JsonParser;
04-16 14:56:33.254: D/dalvikvm(9369): VFY: replacing opcode 0x6e at 0x0022
04-16 14:56:33.254: I/dalvikvm(9369): Could not find method org.codehaus.jackson.JsonFactory.createJsonParser, referenced from method com.esri.core.internal.b.a.e.a
04-16 14:56:33.254: W/dalvikvm(9369): VFY: unable to resolve virtual method 4761:
Lorg/codehaus/jackson/JsonFactory;.createJsonParser (Ljava/lang/String;)Lorg/codehaus/jackson/JsonParser;
04-16 14:56:33.254: D/dalvikvm(9369): VFY: replacing opcode 0x6e at 0x001f
04-16 14:56:33.254: D/dalvikvm(9369): DexOpt: unable to opt direct call 0x1296 at 0x02 in Lcom/esri/core/internal/b/a/e;.<clinit>
04-16 14:56:33.264: W/dalvikvm(9369): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/esri/core/internal/b/a/e;
04-16 14:56:33.274: D/ArcGIS(9369): Failed to initialize the MapView.
04-16 14:56:33.274: D/ArcGIS(9369): java.lang.ExceptionInInitializerError
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.core.internal.a.a.k.a(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initModel(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.android.map.ags.ArcGISTiledMapServiceLayer.initModel(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.android.map.LayerView.initLayer(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.android.map.MapView$1.a(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.android.map.MapView$1.call(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-16 14:56:33.274: D/ArcGIS(9369): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-16 14:56:33.274: D/ArcGIS(9369): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
04-16 14:56:33.274: D/ArcGIS(9369): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
04-16 14:56:33.274: D/ArcGIS(9369): at java.lang.Thread.run(Thread.java:864)
04-16 14:56:33.274: D/ArcGIS(9369): Caused by: java.lang.NoClassDefFoundError: org.codehaus.jackson.JsonFactory
04-16 14:56:33.274: D/ArcGIS(9369): at com.esri.core.internal.b.a.e.<clinit>(Unknown Source)
04-16 14:56:33.274: D/ArcGIS(9369): ... 11 more
04-16 14:56:33.274: D/ArcGIS.LifeCycle(9369): sdcard inited.
04-16 14:56:33.294: D/ArcGIS.LifeCycle(9369): map.onSizechanged
04-16 14:56:33.294: D/ArcGIS.LifeCycle(9369): !!! onSizeChangedSignal
04-16 14:56:33.294: D/ArcGIS.LifeCycle(9369): map.onLayout
04-16 14:56:33.304: D/ArcGIS.LifeCycle(9369): map.onLayout
04-16 14:56:33.314: D/memalloc(9369): /dev/pmem: Mapped buffer base:0x51fbc000 size:27017216 offset:24928256 fd:56
we might have encountered the same error - In my case the solution was to separate the Ant targets to two calls (i.e. "ant myParameters myTarget1 myTarget2", and "ant myParameters debug delivery"). Hope this works for you, anyhow - Google need to add better support for their undocumented/faulty changes (and stackoverflow isn't the best place for questions that are not originated in stupidity, as the lifetime of a complex question isn't too long here).
If that doesn't work for you please elaborate your question.