寻找React Native Android App崩溃的原因

时间:2019-12-10 06:50:41

标签: android react-native react-native-android react-native-navigation wix-react-native-navigation

花费了许多小时进行跟踪之后,我才发现React Native Android App崩溃的问题。在反应本地运行android之后出现白屏,然后突然消息显示MyApp已停止!该应用程序以前运行良好!可能是Android Studio更新导致了此问题!完成adb logcat之后,这是输出! (对不起,详细输出)。

12-10 09:10:00.586  1413  1413 I boot-pipe: done populating /dev/random
12-10 09:10:04.801  2603  2603 I MicroDetectionWorker: #updateMicroDetector [detectionMode: [mDetectionMode: [1]]]
12-10 09:10:04.801  2603  2603 I MicroDetectionWorker: #startMicroDetector [speakerMode: 0]
12-10 09:10:04.802  2603  2603 I AudioController: Using mInputStreamFactoryBuilder
12-10 09:10:04.803  2603  2603 I MicroDetectionWorker: onReady
12-10 09:10:04.806  2603  2716 I MicroRecognitionRunner: Starting detection.
12-10 09:10:04.806  2603  2680 I MicrophoneInputStream: mic_starting com.google.android.apps.gsa.staticplugins.aa.c@427c2af
12-10 09:10:04.806  1499  1594 W ServiceManager: Permission failure: android.permission.RECORD_AUDIO from uid=10032 pid=2603
12-10 09:10:04.806  1499  1594 E         : Request requires android.permission.RECORD_AUDIO
12-10 09:10:04.806  1499  1594 E         : android.permission.CAPTURE_AUDIO_HOTWORD
12-10 09:10:04.806  2603  2680 E AudioRecord: Could not get audio input for session 281, record source 1999, sample rate 16000, format 0x1, channel mask 0x10, flags 0
12-10 09:10:04.807  2603  2680 E AudioRecord-JNI: Error creating AudioRecord instance: initialization check failed with status -22.
12-10 09:10:04.807  2603  2680 E android.media.AudioRecord: Error code -20 when initializing native AudioRecord object.
12-10 09:10:04.807  2603  2680 I MicrophoneInputStream: mic_started com.google.android.apps.gsa.staticplugins.aa.c@427c2af
12-10 09:10:04.812  2603  2680 I MicrophoneInputStream: mic_close com.google.android.apps.gsa.staticplugins.aa.c@427c2af
12-10 09:10:04.813  2603  2716 I MicroRecognitionRunner: Detection finished
12-10 09:10:04.813  2603  2716 W ErrorReporter: reportError [type: 211, code: 524300]: Error reading from input stream
12-10 09:10:04.813  2603  2908 I MicroRecognitionRunner: Stopping hotword detection.
12-10 09:10:04.813  2603  2716 W ErrorProcessor: onFatalError, processing error from engine(4)
12-10 09:10:04.813  2603  2716 W ErrorProcessor: com.google.android.apps.gsa.shared.speech.b.g: Error reading from input stream
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.staticplugins.recognizer.j.a.a(SourceFile:28)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.staticplugins.recognizer.j.b.run(SourceFile:15)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.shared.util.concurrent.a.ag.run(Unknown Source:4)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.shared.util.concurrent.a.bo.run(SourceFile:4)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.shared.util.concurrent.a.bo.run(SourceFile:4)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.lang.Thread.run(Thread.java:764)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:6)
12-10 09:10:04.813  2603  2716 W ErrorProcessor: Caused by: com.google.android.apps.gsa.shared.exception.GsaIOException: Error code: 393238 | Buffer overflow, no available space.
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.speech.audio.Tee.f(SourceFile:103)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.speech.audio.au.read(SourceFile:2)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at java.io.InputStream.read(InputStream.java:101)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.speech.audio.ao.run(SourceFile:18)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    at com.google.android.apps.gsa.speech.audio.an.run(SourceFile:2)
12-10 09:10:04.813  2603  2716 W ErrorProcessor:    ... 11 more
12-10 09:10:04.813  2603  2716 I AudioController: internalShutdown
12-10 09:10:04.814  2603  2603 I MicroDetectionWorker: onReady
12-10 09:10:04.838  2603  2603 I MicroDetector: Keeping mic open: false
12-10 09:10:04.838  2603  2603 I MicroDetectionWorker: #onError(false)
12-10 09:10:04.839  2603  2721 I DeviceStateChecker: DeviceStateChecker cancelled
12-10 09:10:04.807  2603  2680 E ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
12-10 09:10:08.228  1626  1643 E BatteryExternalStatsWorker: modem info is invalid: ModemActivityInfo{ mTimestamp=0 mSleepTimeMs=0 mIdleTimeMs=0 mTxTimeMs[]=[0, 0, 0, 0, 0] mRxTimeMs=0 mEnergyUsed=0}
12-10 09:10:29.990  2603  2716 I AudioController: internalShutdown
12-10 09:10:30.005  2603  2603 I MicroDetectionWorker: onReady
12-10 09:10:30.005  2603  2603 I MicroDetector: Keeping mic open: false
12-10 09:10:30.005  2603  2603 I MicroDetectionWorker: #onError(false)
12-10 09:10:30.005  2603  2721 I DeviceStateChecker: DeviceStateChecker cancelled
12-10 09:10:30.581  4961  4961 D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 2000 <<<<<<
12-10 09:10:30.588  4961  4961 W app_process: Could not reserve sentinel fault page
12-10 09:10:30.767  4961  4961 W app_process: Unexpected CPU variant for X86 using defaults: x86
12-10 09:10:30.769  4961  4961 I app_process: The ClassLoaderContext is a special shared library.
12-10 09:10:30.806  4961  4961 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
12-10 09:10:30.812  4973  4973 E asset   : setgid: Operation not permitted
12-10 09:10:31.343  1626  1652 W PackageParser: Unknown element under <manifest>: meta-data at /data/app/vmdl1727045792.tmp/base.apk Binary XML file line #18
12-10 09:10:31.357  1626  1652 I PackageManager.DexOptimizer: Running dexopt (dexoptNeeded=1) on: /data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ==/base.apk pkg=com.myapp isa=x86 dexoptFlags=boot_complete,debuggable,public target-filter=quicken oatDir=/data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ==/oat sharedLibraries=PCL[]
12-10 09:10:31.369  4976  4976 W dex2oat : Unexpected CPU variant for X86 using defaults: x86
12-10 09:10:31.369  4976  4976 W dex2oat : Mismatch between dex2oat instruction set features (ISA: X86 Feature string: -ssse3,-sse4.1,-sse4.2,-avx,-avx2,-popcnt) and those of dex2oat executable (ISA: X86 Feature string: ssse3,-sse4.1,-sse4.2,-avx,-avx2,-popcnt) for the command line:
12-10 09:10:31.369  4976  4976 W dex2oat : /system/bin/dex2oat --zip-fd=8 --zip-location=base.apk --input-vdex-fd=-1 --output-vdex-fd=10 --oat-fd=9 --oat-location=/data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ==/oat/x86/base.odex --instruction-set=x86 --instruction-set-variant=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --compiler-filter=quicken --swap-fd=11 --debuggable --classpath-dir=/data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ== --class-loader-context=PCL[]
12-10 09:10:31.369  4976  4976 I dex2oat : /system/bin/dex2oat --input-vdex-fd=-1 --output-vdex-fd=10 --compiler-filter=quicken --debuggable --classpath-dir=/data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ== --class-loader-context=PCL[]
12-10 09:10:31.371  4976  4976 W dex2oat : Could not reserve sentinel fault page
12-10 09:10:32.007  4976  4976 I dex2oat : dex2oat took 638.634ms (964.409ms cpu) (threads: 2) arena alloc=62KB (63776B) java alloc=4MB (5018336B) native alloc=5MB (5892024B) free=2MB (3020872B)
12-10 09:10:32.011  1626  1640 I ActivityManager: Force stopping com.myapp appid=10080 user=-1: installPackageLI
12-10 09:10:32.162  1502  2099 E         : Couldn't opendir /data/app/vmdl1727045792.tmp: No such file or directory
12-10 09:10:32.162  1502  2099 E installd: Failed to delete /data/app/vmdl1727045792.tmp: No such file or directory
12-10 09:10:32.163  1626  1652 I ActivityManager: Force stopping com.myapp appid=10080 user=0: pkg removed
12-10 09:10:32.163  4961  4961 I Pm      : Package com.myapp installed in 1355 ms
12-10 09:10:32.179  4961  4961 I app_process: System.exit called, status: 0
12-10 09:10:32.179  4961  4961 I AndroidRuntime: VM exiting with result code 0.
12-10 09:10:32.184  1626  1683 I InputReader: Reconfiguring input devices.  changes=0x00000010
12-10 09:10:32.188  1626  1683 I chatty  : uid=1000(system) InputReader identical 1 line
12-10 09:10:32.192  1626  1683 I InputReader: Reconfiguring input devices.  changes=0x00000010
12-10 09:10:32.206  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.214  2691  2691 I chatty  : uid=10024(com.android.vending) identical 3 lines
12-10 09:10:32.215  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.221  2117  4693 E NetworkScheduler.SR: Unrecognised action provided: android.intent.action.PACKAGE_REMOVED
12-10 09:10:32.235  1626  2293 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
12-10 09:10:32.244  1827  1827 D CarrierSvcBindHelper: No carrier app for: 0
12-10 09:10:32.247  1626  1626 I Telecom : DefaultDialerCache: Refreshing default dialer for user 0: now com.google.android.dialer: DDC.oR@AKc
12-10 09:10:32.256  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.256  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.260  2691  3046 W WearSignatureVerifier: No package com.google.android.wearable.app.cn
12-10 09:10:32.261  2691  3046 I chatty  : uid=10024(com.android.vending) GAC_Executor[1] identical 2 lines
12-10 09:10:32.261  2691  3046 W WearSignatureVerifier: No package com.google.android.wearable.app.cn
12-10 09:10:32.267  2691  2691 I Finsky  : [2] com.google.android.finsky.utils.PermissionPolicies$PermissionPolicyService.onStartCommand(18): post-install permissions check for com.myapp
12-10 09:10:32.267  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.267  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.270  1827  1827 D CarrierSvcBindHelper: No carrier app for: 0
12-10 09:10:32.273  2691  2691 I Finsky  : [2] com.google.android.finsky.externalreferrer.d.run(9): Package state data is missing for com.myapp
12-10 09:10:32.274  2117  2117 I WearableService: Wearable Services not starting - Wear is not available on this device.
12-10 09:10:32.281  2691  2691 W Finsky  : [2] com.google.android.finsky.application.FinskyAppImpl.bx(1166): No account configured on this device.
12-10 09:10:32.294  1827  1827 D ImsResolver: maybeAddedImsService, packageName: com.myapp
12-10 09:10:32.294  1827  1827 D CarrierConfigLoader: mHandler: 9 phoneId: 0
12-10 09:10:32.298  2205  2215 I zygote  : Background concurrent copying GC freed 6722(457KB) AllocSpace objects, 7(520KB) LOS objects, 49% free, 3MB/6MB, paused 68us total 112.528ms
12-10 09:10:32.301  2117  2380 D WearableService: onGetService - Wear is not available on this device.
12-10 09:10:32.302  2691  2691 W WearSignatureVerifier: No package com.google.android.wearable.app.cn
12-10 09:10:32.302  2691  2691 E Finsky  : [2] com.google.android.finsky.wear.bl.a(3): onConnectionFailed: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
12-10 09:10:32.302  2691  2691 W Finsky  : [2] com.google.android.finsky.wear.aj.run(9): Dropping command=auto_install due to Gms not connected
12-10 09:10:32.311  1626  1636 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
12-10 09:10:32.312  1626  1640 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.apps.photos/.account.full.FetchAccountPropertiesAppUpgradeBroadcastReceiver
12-10 09:10:32.312  1626  1640 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.apps.photos/.backgroundsignin.BackgroundSignInBroadcastReceiver
12-10 09:10:32.312  1626  1640 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.apps.photos/.experiments.phenotype.full.PhenotypeAppUpgradeBroadcastReceiver
12-10 09:10:32.312  1626  1640 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.apps.photos/.notificationchannels.AppUpdateBroadcastReceiver
12-10 09:10:32.324  2368  4992 D Wear_Controller: Received broadcast action=android.intent.action.PACKAGE_REMOVED and uri=com.myapp
12-10 09:10:32.350  1626  1636 W BroadcastQueue: Background execution not allowed: receiving Intent { act=android.intent.action.PACKAGE_REPLACED dat=package:com.myapp flg=0x4000010 (has extras) } to com.google.android.googlequicksearchbox/com.google.android.apps.gsa.googlequicksearchbox.GelStubAppWatcher
12-10 09:10:32.396  1743  1762 I zygote  : Background concurrent copying GC freed 13156(654KB) AllocSpace objects, 0(0B) LOS objects, 49% free, 4MB/9MB, paused 64us total 201.135ms
12-10 09:10:32.419  2368  4999 D Wear_Controller: Received broadcast action=android.intent.action.PACKAGE_ADDED and uri=com.myapp
12-10 09:10:32.715  1626  2163 I ActivityManager: Start proc 5010:com.myapp/u0a80 for activity com.myapp/.MainActivity
12-10 09:10:32.732  5010  5010 W zygote  : Unexpected CPU variant for X86 using defaults: x86
12-10 09:10:32.735  1405  1444 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 8298496
12-10 09:10:32.758  5010  5017 E zygote  : Failed sending reply to debugger: Broken pipe
12-10 09:10:32.758  5010  5017 I zygote  : Debugger is no longer active
12-10 09:10:32.848  5010  5010 D FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
12-10 09:10:32.849  5010  5010 D FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
12-10 09:10:32.849  5010  5010 I FirebaseInitProvider: FirebaseApp initialization successful
12-10 09:10:33.071  5010  5010 V fb-UnpackingSoSource: regenerating DSO store com.facebook.soloader.ApkSoSource
12-10 09:10:33.072  5010  5010 V fb-UnpackingSoSource: starting syncer worker
12-10 09:10:33.081  5010  5028 I FA      : App measurement is starting up, version: 12780
12-10 09:10:33.081  5010  5028 I FA      : To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
12-10 09:10:33.081  5010  5028 I FA      : To enable faster debug mode event logging run:
12-10 09:10:33.081  5010  5028 I FA      :   adb shell setprop debug.firebase.analytics.app com.myapp
12-10 09:10:33.195  5010  5028 W GooglePlayServicesUtil: Google Play services out of date.  Requires 12451000 but found 11580470
12-10 09:10:33.224  5010  5010 D ReactNative: ReactInstanceManager.createReactContextInBackground()
12-10 09:10:33.224  5010  5010 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
12-10 09:10:33.241  1418  1431 E SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
12-10 09:10:33.496  5010  5010 E unknown:ReactNative: Unable to display loading message because react activity isn't available
12-10 09:10:33.513  1626  1647 I ActivityManager: Displayed com.myapp/.MainActivity: +807ms
12-10 09:10:33.537  5010  5028 I FA      : This instance being marked as an uploader
12-10 09:10:33.581  2368  2860 I Icing   : Indexing 0FC5A07B286EB89ECAB4195EE20B9EE1AB615B80 from com.google.android.gms
12-10 09:10:33.608  1418  1418 W SurfaceFlinger: couldn't log to binary event log: overflow.
12-10 09:10:33.651  2368  2860 I Icing   : Indexing done 0FC5A07B286EB89ECAB4195EE20B9EE1AB615B80
12-10 09:10:33.686  5010  5028 W GooglePlayServicesUtil: Google Play services out of date.  Requires 12451000 but found 11580470
12-10 09:10:33.713  2603  2603 W SearchService: Abort, client detached.
12-10 09:10:33.839  2117  2117 I GeofencerStateMachine: removeGeofences: removeRequest=RemoveGeofencingRequest[REMOVE_BY_PENDING_INTENT pendingIntent=PendingIntent[creatorPackage=com.google.android.gms], packageName=null]
12-10 09:10:33.843  2117  5046 I Places  : ?: Couldn't find platform key file.
12-10 09:10:33.866  2117  2117 I GeofencerStateMachine: removeGeofences: removeRequest=RemoveGeofencingRequest[REMOVE_BY_PENDING_INTENT pendingIntent=PendingIntent[creatorPackage=com.google.android.gms], packageName=null]
12-10 09:10:33.868  2117  2117 I chatty  : uid=10014 com.google.android.gms.persistent identical 1 line
12-10 09:10:33.870  2117  2117 I GeofencerStateMachine: removeGeofences: removeRequest=RemoveGeofencingRequest[REMOVE_BY_PENDING_INTENT pendingIntent=PendingIntent[creatorPackage=com.google.android.gms], packageName=null]
12-10 09:10:34.484  5010  5015 I zygote  : Do partial code cache collection, code=60KB, data=37KB
12-10 09:10:34.484  5010  5015 I zygote  : After code cache collection, code=59KB, data=36KB
12-10 09:10:34.484  5010  5015 I zygote  : Increasing code cache capacity to 256KB
12-10 09:10:34.585  5010  5010 D ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
12-10 09:10:34.585  5010  5010 D ReactNative: ReactInstanceManager.recreateReactContextInBackground()
12-10 09:10:34.585  5010  5010 D ReactNative: ReactInstanceManager.runCreateReactContextOnNewThread()
12-10 09:10:34.592  5010  5048 I zygote  : Thread[24,tid=5048,Native,Thread*=0x91290c00,peer=0x12d81bd8,"Thread-3"] recursive attempt to load library "/data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ==/lib/x86/libfb.so"
12-10 09:10:34.592  5010  5048 D ReactNative: ReactInstanceManager.createReactContext()
12-10 09:10:34.596  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupViewManager
12-10 09:10:34.597  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTGroupShadowNode
12-10 09:10:34.598  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeViewManager
12-10 09:10:34.598  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTShapeShadowNode
12-10 09:10:34.599  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextViewManager
12-10 09:10:34.599  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.art.ARTTextShadowNode
12-10 09:10:34.600  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.views.checkbox.ReactCheckBoxManager
12-10 09:10:34.604  5010  5048 W unknown:ViewManagerPropertyUpdater: Could not find generated setter for class com.facebook.react.uimanager.LayoutShadowNode
12-10 09:10:35.170  5010  5052 W GooglePlayServicesUtil: Google Play services out of date.  Requires 12451000 but found 11580470
12-10 09:10:35.479  1626  1636 I ActivityManager: START u0 {act=android.intent.action.VIEW flg=0x10008000 cmp=com.myapp/com.reactnativenavigation.controllers.NavigationActivity (has extras)} from uid 10080
12-10 09:10:35.541  1405  1444 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 8298496
12-10 09:10:35.571  5010  5010 D AndroidRuntime: Shutting down VM
12-10 09:10:35.576  5010  5010 E AndroidRuntime: FATAL EXCEPTION: main
12-10 09:10:35.576  5010  5010 E AndroidRuntime: Process: com.myapp, PID: 5010
12-10 09:10:35.576  5010  5010 E AndroidRuntime: java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface; in class Landroid/support/v4/content/res/ResourcesCompat; or its super classes (declaration of 'android.support.v4.content.res.ResourcesCompat' appears in /data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ==/base.apk)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.app.ActivityThread.-wrap11(Unknown Source:0)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:164)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6494)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
12-10 09:10:35.576  5010  5010 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
12-10 09:10:35.600  1743  1775 W asset   : Asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk is neither a directory nor file (type=1).
12-10 09:10:35.600  1743  1775 E ResourcesManager: failed to add asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk
12-10 09:10:35.600  1743  1775 W PackageManager: Failure retrieving resources for com.myapp
12-10 09:10:35.600  1743  1775 W asset   : Asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk is neither a directory nor file (type=1).
12-10 09:10:35.600  1743  1775 E ResourcesManager: failed to add asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk
12-10 09:10:35.600  1743  1775 W PackageManager: Failure retrieving resources for com.myapp
12-10 09:10:35.601  1743  1775 W asset   : Asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk is neither a directory nor file (type=1).
12-10 09:10:35.601  1743  1775 E ResourcesManager: failed to add asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk
12-10 09:10:35.601  1743  1775 W PackageManager: Failure retrieving resources for com.myapp
12-10 09:10:35.601  1743  1775 W asset   : Asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk is neither a directory nor file (type=1).
12-10 09:10:35.601  1743  1775 E ResourcesManager: failed to add asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk
12-10 09:10:35.601  1743  1775 W PackageManager: Failure retrieving resources for com.myapp
12-10 09:10:35.601  1743  1775 W asset   : Asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk is neither a directory nor file (type=1).
12-10 09:10:35.601  1743  1775 E ResourcesManager: failed to add asset path /data/app/com.myapp-Sr-m6BJSCDuUztbtfBYRoA==/base.apk
12-10 09:10:35.601  1743  1775 W PackageManager: Failure retrieving resources for com.myapp
12-10 09:10:35.603  1626  2291 W ActivityManager:   Force finishing activity com.myapp/com.reactnativenavigation.controllers.NavigationActivity
12-10 09:10:35.607  1626  1641 I ActivityManager: Showing crash dialog for package com.myapp u0
12-10 09:10:35.653  1405  1444 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3100672
12-10 09:10:35.658  1405  1444 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3100672
12-10 09:10:35.660  1405  1405 D gralloc_ranchu: gralloc_alloc: Creating ashmem region of size 3100672
12-10 09:10:35.671  1626  4828 I zygote  : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
12-10 09:10:35.671  1626  4828 I OpenGLRenderer: Initialized EGL, version 1.4
12-10 09:10:35.671  1626  4828 D OpenGLRenderer: Swap behavior 1
12-10 09:10:35.671  1626  4828 W OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
12-10 09:10:35.671  1626  4828 D OpenGLRenderer: Swap behavior 0
12-10 09:10:35.673  1626  4828 D EGL_emulation: eglCreateContext: 0x8c1a13e0: maj 3 min 0 rcv 3
12-10 09:10:35.675  1626  4828 D EGL_emulation: eglMakeCurrent: 0x8c1a13e0: ver 3 0 (tinfo 0x91222030)
12-10 09:10:36.106  1626  1640 W ActivityManager: Activity pause timeout for ActivityRecord{1d73abc u0 com.myapp/com.reactnativenavigation.controllers.NavigationActivity t9 f}

该应用程序未使用任何麦克风,奇怪的是音频和麦克风存在一些错误。以下是构建细节:

compileSdkVersion 27
    buildToolsVersion "27.0.3"

    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }

    defaultConfig {
        applicationId "com.myapp"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 13
        versionName "1.0.8"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

我使用的是react-native:0.53.0,使用react-native-navigation:1.1.375

更新 我终于可以通过使用较早的备份之一替换android文件夹来运行该应用程序!尚未完全发现问题,但这与React Native Navigation有关。这是更新的gradle中的代码片段:

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"

compileOptions {
    sourceCompatibility 1.8
    targetCompatibility 1.8
}

defaultConfig {
    applicationId "com.myapp"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 17
    versionName "1.0.9"
    ndk {
        abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
    }
}

4 个答案:

答案 0 :(得分:0)

我认为您的buildToolsVersion有问题。 您可以检查一下是否具有与此处完全相同的版本吗?

    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    ...
        minSdkVersion 16
        targetSdkVersion 22

摘自: https://react-native-community.github.io/upgrade-helper/?from=0.53.0&to=0.61.5

答案 1 :(得分:0)

您可以尝试清理您的android-project,然后再尝试重新构建吗?

cd android && ./gradlew clean

答案 2 :(得分:0)

导致应用崩溃的错误是:

java.lang.NoSuchMethodError: No static method getFont(Landroid/content/Context;ILandroid/util/TypedValue;ILandroid/widget/TextView;)Landroid/graphics/Typeface; in class Landroid/support/v4/content/res/ResourcesCompat; or its super classes (declaration of 'android.support.v4.content.res.ResourcesCompat' appears in /data/app/com.myapp-uNSnIgB5mPdTGWEHkrTdCQ==/base.apk)

通常,targetSdkVersioncompileSdkVersion应该匹配,并且buildToolsVersion也应该是适当的版本。

尝试执行this answer中列出的步骤。

答案 3 :(得分:0)

您是否检查了包名称(例如com.example.app)与您的 android / app / main / java / com / example / app /( MainActivity和MainApplication)。这样。