Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/mobile: gomobile install results in APK that cannot inflate - png not found error #12647

Closed
monopole opened this issue Sep 16, 2015 · 4 comments

Comments

@monopole
Copy link

This issue is for https://github.com/golang/mobile

This bug happens on a 1+ phone, model A0001, Cyanogen OS 11.0-XNPH05Q, Android 4.4.4.
In contrast, the same 'gomobile install' to a 2nd Gen Moto X running Android 5.1 works fine.

The app and install procedure described at https://github.com/monopole/volley

I/ActivityManager( 797): Start proc io.v.go.examples.aaavolley for activity io.v.go.examples.aaavolley/org.golang.app.GoNativeActivity: pid=4548 uid=10090 gids={50090, 1028, 1015, 3003}
D/ActivityThread( 4548): handleBindApplication:io.v.go.examples.aaavolley
D/ActivityThread( 4548): setTargetHeapUtilization:0.75
D/ActivityThread( 4548): setTargetHeapMinFree:2097152
D/dalvikvm( 4548): Trying to load lib /data/app-lib/io.v.go.examples.aaavolley-1/libnetwork.so 0x41a99840
D/dalvikvm( 4548): Added shared lib /data/app-lib/io.v.go.examples.aaavolley-1/libnetwork.so 0x41a99840
E/ActivityThread( 4548): Failed to inflate
E/ActivityThread( 4548): android.view.InflateException: Binary XML file line #30: Error inflating class com.android.internal.widget.ActionBarContainer
E/ActivityThread( 4548): at android.view.LayoutInflater.createView(LayoutInflater.java:620)
E/ActivityThread( 4548): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
E/ActivityThread( 4548): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
E/ActivityThread( 4548): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
E/ActivityThread( 4548): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
E/ActivityThread( 4548): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
E/ActivityThread( 4548): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3287)
E/ActivityThread( 4548): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3350)
E/ActivityThread( 4548): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:358)
E/ActivityThread( 4548): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:352)
E/ActivityThread( 4548): at android.app.Activity.setContentView(Activity.java:1949)
E/ActivityThread( 4548): at android.app.NativeActivity.onCreate(NativeActivity.java:145)
E/ActivityThread( 4548): at org.golang.app.GoNativeActivity.onCreate(GoNativeActivity.java:49)
E/ActivityThread( 4548): at android.app.Activity.performCreate(Activity.java:5231)
E/ActivityThread( 4548): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/ActivityThread( 4548): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
E/ActivityThread( 4548): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
E/ActivityThread( 4548): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/ActivityThread( 4548): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
E/ActivityThread( 4548): at android.os.Handler.dispatchMessage(Handler.java:102)
E/ActivityThread( 4548): at android.os.Looper.loop(Looper.java:136)
E/ActivityThread( 4548): at android.app.ActivityThread.main(ActivityThread.java:5146)
E/ActivityThread( 4548): at java.lang.reflect.Method.invokeNative(Native Method)
E/ActivityThread( 4548): at java.lang.reflect.Method.invoke(Method.java:515)
E/ActivityThread( 4548): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
E/ActivityThread( 4548): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/ActivityThread( 4548): at dalvik.system.NativeStart.main(Native Method)
E/ActivityThread( 4548): Caused by: java.lang.reflect.InvocationTargetException
E/ActivityThread( 4548): at java.lang.reflect.Constructor.constructNative(Native Method)
E/ActivityThread( 4548): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
E/ActivityThread( 4548): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
E/ActivityThread( 4548): ... 26 more
E/ActivityThread( 4548): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-mdpi/ic_allapps.png from drawable resource ID #0x10800bd
E/ActivityThread( 4548): at android.content.res.Resources.loadDrawable(Resources.java:2255)
E/ActivityThread( 4548): at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
E/ActivityThread( 4548): at android.view.View.(View.java:3561)
E/ActivityThread( 4548): at android.view.ViewGroup.(ViewGroup.java:470)
E/ActivityThread( 4548): at android.widget.FrameLayout.(FrameLayout.java:101)
E/ActivityThread( 4548): at android.widget.FrameLayout.(FrameLayout.java:97)
E/ActivityThread( 4548): at com.android.internal.widget.ActionBarContainer.(ActionBarContainer.java:52)
E/ActivityThread( 4548): ... 29 more
E/ActivityThread( 4548): Caused by: java.io.FileNotFoundException: res/drawable-mdpi/ic_allapps.png
E/ActivityThread( 4548): at android.content.res.AssetManager.openNonAssetNative(Native Method)
E/ActivityThread( 4548): at android.content.res.AssetManager.openNonAsset(AssetManager.java:427)
E/ActivityThread( 4548): at android.content.res.Resources.loadDrawable(Resources.java:2246)
E/ActivityThread( 4548): ... 35 more
D/AndroidRuntime( 4548): Shutting down VM
W/dalvikvm( 4548): threadid=1: thread exiting with uncaught exception (group=0x415e6db8)
E/AndroidRuntime( 4548): FATAL EXCEPTION: main
E/AndroidRuntime( 4548): Process: io.v.go.examples.aaavolley, PID: 4548
E/AndroidRuntime( 4548): java.lang.RuntimeException: Unable to start activity ComponentInfo{io.v.go.examples.aaavolley/org.golang.app.GoNativeActivity}: android.view.InflateException: Binary XML file line #30: Error inflating class com.android.internal.widget.ActionBarContainer
E/AndroidRuntime( 4548): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2212)
E/AndroidRuntime( 4548): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2271)
E/AndroidRuntime( 4548): at android.app.ActivityThread.access$800(ActivityThread.java:144)
E/AndroidRuntime( 4548): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
E/AndroidRuntime( 4548): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4548): at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime( 4548): at android.app.ActivityThread.main(ActivityThread.java:5146)
E/AndroidRuntime( 4548): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4548): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 4548): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
E/AndroidRuntime( 4548): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
E/AndroidRuntime( 4548): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 4548): Caused by: android.view.InflateException: Binary XML file line #30: Error inflating class com.android.internal.widget.ActionBarContainer
E/AndroidRuntime( 4548): at android.view.LayoutInflater.createView(LayoutInflater.java:620)
E/AndroidRuntime( 4548): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
E/AndroidRuntime( 4548): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
E/AndroidRuntime( 4548): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
E/AndroidRuntime( 4548): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
E/AndroidRuntime( 4548): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
E/AndroidRuntime( 4548): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3287)
E/AndroidRuntime( 4548): at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3350)
E/AndroidRuntime( 4548): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:358)
E/AndroidRuntime( 4548): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:352)
E/AndroidRuntime( 4548): at android.app.Activity.setContentView(Activity.java:1949)
E/AndroidRuntime( 4548): at android.app.NativeActivity.onCreate(NativeActivity.java:145)
E/AndroidRuntime( 4548): at org.golang.app.GoNativeActivity.onCreate(GoNativeActivity.java:49)
E/AndroidRuntime( 4548): at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime( 4548): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 4548): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2169)
E/AndroidRuntime( 4548): ... 11 more
E/AndroidRuntime( 4548): Caused by: java.lang.reflect.InvocationTargetException
E/AndroidRuntime( 4548): at java.lang.reflect.Constructor.constructNative(Native Method)
E/AndroidRuntime( 4548): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
E/AndroidRuntime( 4548): at android.view.LayoutInflater.createView(LayoutInflater.java:594)
E/AndroidRuntime( 4548): ... 26 more
E/AndroidRuntime( 4548): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-mdpi/ic_allapps.png from drawable resource ID #0x10800bd
E/AndroidRuntime( 4548): at android.content.res.Resources.loadDrawable(Resources.java:2255)
E/AndroidRuntime( 4548): at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
E/AndroidRuntime( 4548): at android.view.View.(View.java:3561)
E/AndroidRuntime( 4548): at android.view.ViewGroup.(ViewGroup.java:470)
E/AndroidRuntime( 4548): at android.widget.FrameLayout.(FrameLayout.java:101)
E/AndroidRuntime( 4548): at android.widget.FrameLayout.(FrameLayout.java:97)
E/AndroidRuntime( 4548): at com.android.internal.widget.ActionBarContainer.(ActionBarContainer.java:52)
E/AndroidRuntime( 4548): ... 29 more
E/AndroidRuntime( 4548): Caused by: java.io.FileNotFoundException: res/drawable-mdpi/ic_allapps.png
E/AndroidRuntime( 4548): at android.content.res.AssetManager.openNonAssetNative(Native Method)
E/AndroidRuntime( 4548): at android.content.res.AssetManager.openNonAsset(AssetManager.java:427)
E/AndroidRuntime( 4548): at android.content.res.Resources.loadDrawable(Resources.java:2246)
E/AndroidRuntime( 4548): ... 35 more
W/ActivityManager( 797): Force finishing activity io.v.go.examples.aaavolley/org.golang.app.GoNativeActivity
I/QCOM PowerHAL( 226): Processing audio hint. Metadata: state=0
D/LogFetchServiceManager( 1774): Received entry added
W/ActivityManager( 797): Activity pause timeout for ActivityRecord{41e04688 u0 io.v.go.examples.aaavolley/org.golang.app.GoNativeActivity t9 f}
I/Timeline( 1256): Timeline: Activity_idle id: android.os.BinderProxy@41a21ce0 time:1139544

@monopole
Copy link
Author

BTW: I don't know what
res/drawable-mdpi/ic_allapps.png
is. It's not an asset I'm trying to include in 'volley'.

@ianlancetaylor ianlancetaylor changed the title gomobile install results in APK that cannot inflate - png not found error x/tools/mobile: gomobile install results in APK that cannot inflate - png not found error Sep 16, 2015
@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Sep 16, 2015
@ianlancetaylor
Copy link
Member

CC @crawshaw

@hyangah
Copy link
Contributor

hyangah commented Sep 16, 2015

I have no clue why it requires ic_allapps.png.
Random google search gives this thread - which presents the similar trace -
http://community.rubymotion.com/t/android-projects-wont-run-oneplus-one-rm-3-7-3-8-missing-res-drawable-mdpi-ic-allapps-png/310/9 and according to the last msg from OP updating to Cyanogen OS 12
may resolve this issue.

@monopole
Copy link
Author

FWIW, the oneplus one came out of the box with cm-11.

I just upgraded to cm-12 via a sideload, and the problem is gone.

I now have a whole new set of problems :-)

@golang golang locked and limited conversation to collaborators Sep 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants