Reputation: 2843
I recently upgraded to android studio 0.5.1.
Since that moment, I'm getting the following logcat message on an android 2.3.5 testing device. The messages are followed buy an instant close of the app (without a force close message). The same issue occures on an api level 8 emulator so it seems not to be devices specific.
I/dalvikvm﹕ Failed resolving Landroid/support/v7/widget/SearchView$5; interface 949 'Landroid/view/View$OnLayoutChangeListener;'
W/dalvikvm﹕ Link of class 'Landroid/support/v7/widget/SearchView$5;' failed
E/dalvikvm﹕ Could not find class 'android.support.v7.widget.SearchView$5', referenced from method android.support.v7.widget.SearchView.addOnLay
W/dalvikvm﹕ VFY: unable to resolve new-instance 869 (Landroid/support/v7/widget/SearchView$5;) in Landroid/support/v7/widget/SearchView;
D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x0002
D/dalvikvm﹕ VFY: dead code 0x0004-000a in Landroid/support/v7/widget/SearchView;.addOnLayoutChangeListenerToDropDownAnchorSDK11 ()V
On my Nexus 4 (Android Kitkat) the app works. For me, it looks like the app somehow fails to find or load the support package correctly, although it is in my build.gradle.:
dependencies {
// some other imports here
compile 'com.android.support:support-v4:+'
compile 'com.android.support:appcompat-v7:+'
}
Testing with different buildToolVersions (19.0.1 and 19.0.3) and different support version (replaced the + with 19.0.+) didnt help.
Any help would be appreciated.
// Update: I downgraded to Android Studio 0.4.2 with gradle 1.9 and it is working again. This lets me assume its a problem within AS and/or gradle 1.11. - Gonna report that as a bug
Upvotes: 3
Views: 722
Reputation: 1228
I had same problem. Adding this section to gradle helped me out :
apply plugin: 'android'
...
android.aaptOptions.useAaptPngCruncher = true
Also check this issue :
http://code.google.com/p/android/issues/detail?id=67412
Upvotes: 0
Reputation: 21
changing from:
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
to:
dependencies {
classpath 'com.android.tools.build:gradle:0.9.0'
}
works for me
Upvotes: 2
Reputation: 1420
I think I've had this before -- you have to install the support package in the android sdk screen capture
Upvotes: 0