[BUG]
ling00love opened this issue · 1 comments
在android studio上起来了,项目也能跑起来,但是起来后就闪退,报错
mac电脑,华为真机测试机,报错如下,请指导一下
FATAL EXCEPTION: main
Process: com.pixpark.gpupixeldemo, PID: 27028
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.pixpark.gpupixeldemo/com.pixpark.GPUPixelApp.MainActivity}: android.view.InflateException: Binary XML file line #14 in com.pixpark.gpupixeldemo:layout/activity_main: Binary XML file line #14 in com.pixpark.gpupixeldemo:layout/activity_main: Error inflating class com.pixpark.gpupixel.GPUPixelView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4765)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4983)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:123)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3059)
at android.os.Handler.dispatchMessage(Handler.java:117)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:293)
at android.app.ActivityThread.loopProcess(ActivityThread.java:9934)
at android.app.ActivityThread.main(ActivityThread.java:9923)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240)
Caused by: android.view.InflateException: Binary XML file line #14 in com.pixpark.gpupixeldemo:layout/activity_main: Binary XML file line #14 in com.pixpark.gpupixeldemo:layout/activity_main: Error inflating class com.pixpark.gpupixel.GPUPixelView
Caused by: android.view.InflateException: Binary XML file line #14 in com.pixpark.gpupixeldemo:layout/activity_main: Error inflating class com.pixpark.gpupixel.GPUPixelView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:868)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1020)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:975)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1137)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1098)
at android.view.LayoutInflater.inflate(LayoutInflater.java:696)
at android.view.LayoutInflater.inflate(LayoutInflater.java:540)
at com.android.internal.policy.HwPhoneLayoutInflater.inflate(HwPhoneLayoutInflater.java:138)
at com.pixpark.gpupixeldemo.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:90)
at com.pixpark.gpupixeldemo.databinding.ActivityMainBinding.inflate(ActivityMainBinding.java:84)
at com.pixpark.GPUPixelApp.MainActivity.onCreate(MainActivity.java:48)
at android.app.Activity.performCreate(Activity.java:8592)
at android.app.Activity.performCreate(Activity.java:8565)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1344)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4733)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4983)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:123)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:3059)
at android.os.Handler.dispatchMessage(Handler.java:117)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:293)
at android.app.ActivityThread.loopProcess(ActivityThread.java:9934)
at android.app.ActivityThread.main(ActivityThread.java:9923)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
2024-04-30 17:33:15.191 27028-27028 AndroidRuntime com.pixpark.gpupixeldemo E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1240)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/~~IFugzIY0v7TP8tkOdOCMiw==/com.pixpark.gpupixeldemo-0EPtT2Ej7lL5RGIQylmt0w==/lib/arm64/libgpupixel.so" is 32-bit instead of 64-bit
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1657)
at com.pixpark.gpupixel.GPUPixel.(GPUPixel.java:160)
at com.pixpark.gpupixel.GPUPixel.getInstance(GPUPixel.java:48)
at com.pixpark.gpupixel.GPUPixelView.init(GPUPixelView.java:41)
at com.pixpark.gpupixel.GPUPixelView.(GPUPixelView.java:36)
... 30 more
架构不匹配,使用 arm64库试试