android приложение полностью работает в режиме отладки, но вылетает при выпуске - PullRequest
0 голосов
/ 31 марта 2020

Я собрал приложение как android реагирует на нативную. когда я работал над отладкой, это работало просто отлично, но теперь при сборке релиза это не так, и приложение вылетает при запуске. Я проверил E LogCat, и проблема, кажется, заключается в следующем: TypeError: undefined не является объектом (оценивает 'u.getState')

Может кто-нибудь помочь мне решить эту проблему?

Здесь это полный логкат

3-31 01:54:14.659 25416 25419 E nightwatch-watcher: Failed to read from logcat: Success
03-31 01:54:14.698  3302  5239 E BufferQueueProducer: [com.shopertino/com.shopertino.MainActivity[18706]#0] disconnect: not connected (req=1)
03-31 01:54:14.715 18706 18706 E ViewRootImpl: sendUserActionEvent() returned.
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: TypeError: undefined is not an object (evaluating 'u.getState')
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: 
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: This error is located at:
03-31 01:54:14.732 18706 18763 E unknown:ReactNative:     in s
03-31 01:54:14.732 18706 18763 E unknown:ReactNative:     in l
03-31 01:54:14.732 18706 18763 E unknown:ReactNative:     in RCTView
03-31 01:54:14.732 18706 18763 E unknown:ReactNative:     in RCTView
03-31 01:54:14.732 18706 18763 E unknown:ReactNative:     in c, stack:
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: s@367:429
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: Sn@90:30120
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: Or@90:45887
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: na@90:72881
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: ra@90:73371
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: Oa@90:80972
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: Wa@90:80310
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: Aa@90:79323
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: sa@90:78013
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: Ba@90:82505
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: render@90:85076
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: exports@338:592
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: run@334:615
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: runApplication@334:2017
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: value@28:3311
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: <unknown>@28:822
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: value@28:2565
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: value@28:794
03-31 01:54:14.732 18706 18763 E unknown:ReactNative: value@-1
03-31 01:54:14.738 18706 18763 E AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Process: com.shopertino, PID: 18706
03-31 01:54:14.738 18706 18763 E AndroidRuntime: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'u.getState')
03-31 01:54:14.738 18706 18763 E AndroidRuntime: 
03-31 01:54:14.738 18706 18763 E AndroidRuntime: This error is located at:
03-31 01:54:14.738 18706 18763 E AndroidRuntime:     in s
03-31 01:54:14.738 18706 18763 E AndroidRuntime:     in l
03-31 01:54:14.738 18706 18763 E AndroidRuntime:     in RCTView
03-31 01:54:14.738 18706 18763 E AndroidRuntime:     in RCTView
03-31 01:54:14.738 18706 18763 E AndroidRuntime:     in c, stack:
03-31 01:54:14.738 18706 18763 E AndroidRuntime: s@367:429
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Sn@90:30120
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Or@90:45887
03-31 01:54:14.738 18706 18763 E AndroidRuntime: na@90:72881
03-31 01:54:14.738 18706 18763 E AndroidRuntime: ra@90:73371
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Oa@90:80972
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Wa@90:80310
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Aa@90:79323
03-31 01:54:14.738 18706 18763 E AndroidRuntime: sa@90:78013
03-31 01:54:14.738 18706 18763 E AndroidRuntime: Ba@90:82505
03-31 01:54:14.738 18706 18763 E AndroidRuntime: render@90:85076
03-31 01:54:14.738 18706 18763 E AndroidRuntime: exports@338:592
03-31 01:54:14.738 18706 18763 E AndroidRuntime: run@334:615
03-31 01:54:14.738 18706 18763 E AndroidRuntime: runApplication@334:2017
03-31 01:54:14.738 18706 18763 E AndroidRuntime: value@28:3311
03-31 01:54:14.738 18706 18763 E AndroidRuntime: <unknown>@28:822
03-31 01:54:14.738 18706 18763 E AndroidRuntime: value@28:2565
03-31 01:54:14.738 18706 18763 E AndroidRuntime: value@28:794
03-31 01:54:14.738 18706 18763 E AndroidRuntime: value@-1
03-31 01:54:14.738 18706 18763 E AndroidRuntime: 
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.modules.core.ExceptionsManagerModule.showOrThrowError(ExceptionsManagerModule.java:54)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.modules.core.ExceptionsManagerModule.reportFatalException(ExceptionsManagerModule.java:38)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:158)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:873)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:214)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:232)
03-31 01:54:14.738 18706 18763 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:764)
03-31 01:54:14.809  3856  3856 E SDAgentPackageStateReceiver: Not going to handle 'com.shopertino'!
03-31 01:54:14.843  3301  3301 E lmkd    : Error writing /proc/18706/oom_score_adj; errno=22
03-31 01:54:14.850  3856  3912 E WindowManager: RemoteException occurs on reporting focusChanged, w=Window{f32745d u0 com.shopertino/com.shopertino.MainActivity}
03-31 01:54:14.850  3856  3912 E WindowManager: android.os.DeadObjectException
03-31 01:54:14.850  3856  3912 E WindowManager:     at android.os.BinderProxy.transactNative(Native Method)
03-31 01:54:14.850  3856  3912 E WindowManager:     at android.os.BinderProxy.transact(Binder.java:1145)
03-31 01:54:14.850  3856  3912 E WindowManager:     at android.view.IWindow$Stub$Proxy.windowFocusChanged(IWindow.java:500)
03-31 01:54:14.850  3856  3912 E WindowManager:     at com.android.server.wm.WindowState.reportFocusChangedSerialized(WindowState.java:3920)
03-31 01:54:14.850  3856  3912 E WindowManager:     at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:5456)
03-31 01:54:14.850  3856  3912 E WindowManager:     at android.os.Handler.dispatchMessage(Handler.java:106)
03-31 01:54:14.850  3856  3912 E WindowManager:     at android.os.Looper.loop(Looper.java:214)
03-31 01:54:14.850  3856  3912 E WindowManager:     at android.os.HandlerThread.run(HandlerThread.java:65)
03-31 01:54:14.850  3856  3912 E WindowManager:     at com.android.server.ServiceThread.run(ServiceThread.java:44)

1 Ответ

0 голосов
/ 01 апреля 2020

Proguard заставлял приложение взламывать sh, я временно отключил его, и оно работало как чудо.

buildTypes {
        release {
           // minifyEnabled enableProguardInReleaseBuilds <--- commented this line
           // proguardFiles getDefaultProguardFile("proguard-android.txt"),  "proguard-rules.pro" and this
            signingConfig signingConfigs.release
            debuggable true

        }
...