-
Notifications
You must be signed in to change notification settings - Fork 284
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
华为荣耀6测试 image classification奔溃 #6
Comments
谢谢,从log上看是libhiai.so在该平台上加载不到__register_atfor这个符号,我们向华为反映下情况。 |
今天重新更新代码,测试了下,还是出现错误 |
由于demo中的NPU功能依赖于华为kirin810&990芯片的手机,因此,HIAI的库有可能在你机器上不能正常工作。如果只想测试CPU功能,建议按照 https://github.com/PaddlePaddle/Paddle-Lite/wiki/source_compile 或 https://github.com/PaddlePaddle/Paddle-Lite-Demo 步骤在tiny publish模式下编译armv7&v8的libpaddle_lite_jni.so和PaddlePredictor.jar,替换本demo中的libpaddle_lite_jni.so和PaddlePredictor.jar。 |
10-07 09:05:12.301 18760-18760/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1368: Landroid/graphics/drawable/Drawable;.setTintList (Landroid/content/res/ColorStateList;)V |
华为荣耀6今天测试,还是出现奔溃现象 是不是因为不支持安卓4? |
之前的回复已经解释了为什么会出现这个问题,也给出了解决方案。 由于demo中的libpaddle_lite_jni.so依赖于华为NPU libhiai.so库,而libhiai.so要求设备的安卓系统版本较高,才会出现crash现象,建议按照 https://github.com/PaddlePaddle/Paddle-Lite/wiki/source_compile 或 https://github.com/PaddlePaddle/Paddle-Lite-Demo 步骤在tiny publish模式下编译armv7&v8的libpaddle_lite_jni.so和PaddlePredictor.jar,或直接使用release预编译好的armv7&v8的libpaddle_lite_jni.so和PaddlePredictor.jar https://github.com/PaddlePaddle/Paddle-Lite/releases ,替换本demo中的libpaddle_lite_jni.so和PaddlePredictor.jar。 |
手机是华为荣耀6
配置信息
型号H60-L02
RAM 3GB
android版本4.4.2 API19
打开APP正常,点击 image classification按钮时产生奔溃现象
logcat信息:
08-28 21:28:01.205 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.getAutoSizeMaxTextSize, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeMaxTextSize
08-28 21:28:01.205 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14718: Landroid/widget/Button;.getAutoSizeMaxTextSize ()I
08-28 21:28:01.205 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.getAutoSizeMinTextSize, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeMinTextSize
08-28 21:28:01.205 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14719: Landroid/widget/Button;.getAutoSizeMinTextSize ()I
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.getAutoSizeStepGranularity, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeStepGranularity
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14720: Landroid/widget/Button;.getAutoSizeStepGranularity ()I
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.getAutoSizeTextAvailableSizes, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeTextAvailableSizes
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14721: Landroid/widget/Button;.getAutoSizeTextAvailableSizes ()[I
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.getAutoSizeTextType, referenced from method android.support.v7.widget.AppCompatButton.getAutoSizeTextType
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14722: Landroid/widget/Button;.getAutoSizeTextType ()I
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.setAutoSizeTextTypeUniformWithConfiguration, referenced from method android.support.v7.widget.AppCompatButton.setAutoSizeTextTypeUniformWithConfiguration
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14728: Landroid/widget/Button;.setAutoSizeTextTypeUniformWithConfiguration (IIII)V
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.setAutoSizeTextTypeUniformWithPresetSizes, referenced from method android.support.v7.widget.AppCompatButton.setAutoSizeTextTypeUniformWithPresetSizes
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14729: Landroid/widget/Button;.setAutoSizeTextTypeUniformWithPresetSizes ([II)V
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.Button.setAutoSizeTextTypeWithDefaults, referenced from method android.support.v7.widget.AppCompatButton.setAutoSizeTextTypeWithDefaults
08-28 21:28:01.210 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14730: Landroid/widget/Button;.setAutoSizeTextTypeWithDefaults (I)V
08-28 21:28:01.220 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.Color.getModel, referenced from method android.support.v4.graphics.ColorUtils.compositeColors
08-28 21:28:01.220 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1026: Landroid/graphics/Color;.getModel ()Landroid/graphics/ColorSpace$Model;
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.applyTheme, referenced from method android.support.v4.graphics.drawable.DrawableCompat.applyTheme
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1199: Landroid/graphics/drawable/Drawable;.applyTheme (Landroid/content/res/Resources$Theme;)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.canApplyTheme, referenced from method android.support.v4.graphics.drawable.DrawableCompat.canApplyTheme
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1200: Landroid/graphics/drawable/Drawable;.canApplyTheme ()Z
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.getColorFilter, referenced from method android.support.v4.graphics.drawable.DrawableCompat.getColorFilter
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1211: Landroid/graphics/drawable/Drawable;.getColorFilter ()Landroid/graphics/ColorFilter;
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.inflate, referenced from method android.support.v4.graphics.drawable.DrawableCompat.inflate
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1228: Landroid/graphics/drawable/Drawable;.inflate (Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/util/AttributeSet;Landroid/content/res/Resources$Theme;)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.setHotspot, referenced from method android.support.v4.graphics.drawable.DrawableCompat.setHotspot
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1249: Landroid/graphics/drawable/Drawable;.setHotspot (FF)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.setHotspotBounds, referenced from method android.support.v4.graphics.drawable.DrawableCompat.setHotspotBounds
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1250: Landroid/graphics/drawable/Drawable;.setHotspotBounds (IIII)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.setLayoutDirection, referenced from method android.support.v4.graphics.drawable.DrawableCompat.setLayoutDirection
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1251: Landroid/graphics/drawable/Drawable;.setLayoutDirection (I)Z
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.setTint, referenced from method android.support.v4.graphics.drawable.DrawableCompat.setTint
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1254: Landroid/graphics/drawable/Drawable;.setTint (I)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.setTintList, referenced from method android.support.v4.graphics.drawable.DrawableCompat.setTintList
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1255: Landroid/graphics/drawable/Drawable;.setTintList (Landroid/content/res/ColorStateList;)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.graphics.drawable.Drawable.setTintMode, referenced from method android.support.v4.graphics.drawable.DrawableCompat.setTintMode
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 1256: Landroid/graphics/drawable/Drawable;.setTintMode (Landroid/graphics/PorterDuff$Mode;)V
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.CompoundButton.getButtonDrawable, referenced from method android.support.v4.widget.CompoundButtonCompat.getButtonDrawable
08-28 21:28:01.255 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14755: Landroid/widget/CompoundButton;.getButtonDrawable ()Landroid/graphics/drawable/Drawable;
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.CompoundButton.getButtonTintList, referenced from method android.support.v4.widget.CompoundButtonCompat.getButtonTintList
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14756: Landroid/widget/CompoundButton;.getButtonTintList ()Landroid/content/res/ColorStateList;
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.CompoundButton.getButtonTintMode, referenced from method android.support.v4.widget.CompoundButtonCompat.getButtonTintMode
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14757: Landroid/widget/CompoundButton;.getButtonTintMode ()Landroid/graphics/PorterDuff$Mode;
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.CompoundButton.setButtonTintList, referenced from method android.support.v4.widget.CompoundButtonCompat.setButtonTintList
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14773: Landroid/widget/CompoundButton;.setButtonTintList (Landroid/content/res/ColorStateList;)V
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo I/dalvikvm: Could not find method android.widget.CompoundButton.setButtonTintMode, referenced from method android.support.v4.widget.CompoundButtonCompat.setButtonTintMode
08-28 21:28:01.260 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: VFY: unable to resolve virtual method 14774: Landroid/widget/CompoundButton;.setButtonTintMode (Landroid/graphics/PorterDuff$Mode;)V
08-28 21:28:02.450 29289-29289/com.baidu.paddle.lite.demo E/dalvikvm: dlopen("/data/app-lib/com.baidu.paddle.lite.demo-1/libpaddle_lite_jni.so") failed: dlopen failed: could not load library "libhiai.so" needed by "libpaddle_lite_jni.so"; caused by cannot locate symbol "__register_atfork" referenced by "libhiai.so"...
08-28 21:28:02.450 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/baidu/paddle/lite/PaddlePredictor;
08-28 21:28:02.450 29289-29289/com.baidu.paddle.lite.demo W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x4159bc50)
The text was updated successfully, but these errors were encountered: