I am using 2 build environments in parallel: Windows and Ubuntu.
When I build APK in Windows (via command line) - the APK is fine and runs great.
But when I build exactly the same project on Ubuntu - it fails (running on the same Android device).
I clone the project from the same git repository, and during the gradle build - I receive the one-to-one same messages.
Have no idea where I should start digging.
Any advise will be appreciated.
BTW, I have run-time logs from both APK's:
The logs:
============ Linux ============
08-16 09:02:35.455 5866-5975/com.growdirector.tabletapp.growdirectorapp D/JVM: JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioManager)
NativeRegistration::ctor#[tid=5975]
NativeRegistration::NewObject#[tid=5975]
08-16 09:02:35.455 5866-5975/com.growdirector.tabletapp.growdirectorapp W/System.err: java.lang.NoSuchMethodError: no non-static method "Lorg/webrtc/voiceengine/WebRtcAudioManager;.<init>(Landroid/content/Context;J)V"
08-16 09:02:35.456 5866-5975/com.growdirector.tabletapp.growdirectorapp E/rtc: #
# Fatal error in ../../webrtc/modules/utility/source/helpers_android.cc, line 51
# last system error: 0
# Check failed: !jni->ExceptionCheck()
# Error during GetMethodID: <init>, (Landroid/content/Context;J)V
#
========================================================
======== WIN =========================================
08-14 19:06:15.210 2483-2656/com.growdirector.tabletapp.growdirectorapp D/JVM: JNIEnvironment::RegisterNatives(org/webrtc/voiceengine/WebRtcAudioManager)
NativeRegistration::ctor#[tid=2656]
NativeRegistration::NewObject#[tid=2656]
08-14 19:06:15.211 2483-2656/com.growdirector.tabletapp.growdirectorapp I/org.webrtc.Logging: WebRtcAudioManager: ctor#[name=Thread-318, id=318]
08-14 19:06:15.213 211-838/? D/AudioFlinger_Threads: thread 0xad4c0000 type 0 TID 838 waking up
08-14 19:06:15.213 211-840/? D/AudioFlinger_Threads: thread 0xad200000 type 0 TID 840 waking up
08-14 19:06:15.214 211-838/? D/AudioALSAStreamOut: latency(), flags 2, return 23
08-14 19:06:15.214 211-840/? D/AudioALSAStreamOut: latency(), flags 4, return 10
08-14 19:06:15.214 801-1380/? D/PowerManagerService: acquireWakeLockInternal: lock=137038916, flags=0x1, tag="AudioMix", ws=null, uid=1013, pid=0
updateWakeLockSummaryLocked: mWakefulness=Awake, mWakeLockSummary=0x1
08-14 19:06:15.214 2483-2568/com.growdirector.tabletapp.growdirectorapp D/AudioSystem: getIoDescriptor: ioHandle = 2, index = -2, mIoDescriptors = 0x9db88218
======================================================
Thanks!
Related
New to flutter/mobile development. Had to do a bit of R&D to get what i need in a mobile app, I'm stuck at the very end of the finish line. i.e making my .apk work on the actual device.
I've tried installing app with flutter install and by transferting build\app\outputs\apk\release\app-arm64-v8a-release.apk on to my device.
App get installed successfully, but crashes immediately on the start.
On the other hand It builds and runs fine with flutter run, on both emulator and on physical device (s10+)
Build
flutter build apk --split-per-abi --obfuscate --split-debug-info=/MyApp/
Running "flutter pub get" in Myapp... 0.8s
Removed unused resources: Binary resource data reduced from 494KB to 479KB: Removed 2%
Removed unused resources: Binary resource data reduced from 494KB to 479KB: Removed 2%
Removed unused resources: Binary resource data reduced from 494KB to 479KB: Removed 2%
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 75.5s
√ Built build\app\outputs\flutter-apk\app-armeabi-v7a-release.apk (6.0MB).
No plan to publish it on the Play Store, it has to be used internally and i'm stuck at the very end of my work. Any word of advice what to look for to solve this?
Update
Logcat set to Error
2020-09-30 00:00:12.918 2472-9529/? E/pageboostd: prefetch start : app comstsltdstevenspin
2020-09-30 00:00:12.919 507-507/? E/audit: type=1400 audit(1601420412.917:20565): avc: denied { search } for pid=2472 comm="pageboostd" name="com.stsltd.stevenspin" dev="sda31" ino=1708995 scontext=u:r:pageboostd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 SEPF_SM-G975F_10_0020 audit_filtered
2020-09-30 00:00:12.919 507-507/? E/audit: type=1400 audit(1601420412.917:20566): avc: denied { search } for pid=2472 comm="pageboostd" name="com.stsltd.stevenspin" dev="sda31" ino=1708995 scontext=u:r:pageboostd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 SEPF_SM-G975F_10_0020 audit_filtered
2020-09-30 00:00:12.921 2472-9529/? E/pageboostd: comstsltdstevenspin, amt 48201728 scnt 15 fcnt 35
2020-09-30 00:00:12.921 2472-9529/? E/pageboostd: prefetch end : app comstsltdstevenspin data_amount 48201728
2020-09-30 00:00:13.125 2472-9530/? E/pageboostd: active launch start : app comexampleStevensPin
2020-09-30 00:00:13.125 2472-9530/? E/pageboostd: comexampleStevensPin, amt 1536600 scnt 2 fcnt 0
2020-09-30 00:00:13.126 2472-9530/? E/pageboostd: comexampleStevensPin, amt 0 scnt 2 fcnt 0
2020-09-30 00:00:13.126 2472-9530/? E/pageboostd: active launch end : app comexampleStevensPin data_amount 1536600
2020-09-30 00:00:13.145 7174-7174/? E/mple.StevensPi: Not starting debugger since process cannot load the jdwp agent.
2020-09-30 00:00:13.481 572-572/? E/Layer: [Surface(name=AppWindowToken{8f83aa6 token=Token{a332c01 ActivityRecord{6c5ede8 u0 com.example.StevensPin/.MainActivity t2284}}})/#0xb5d144d - animation-leash#0] No local sync point found, barrierLayer : [com.sec.android.app.launcher/com.sec.android.app.launcher.activities.LauncherActivity$_1923#0]
2020-09-30 00:00:13.560 7174-7174/? A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 7174 (mple.StevensPin), pid 7174 (mple.StevensPin)
2020-09-30 00:00:13.580 1025-1121/? E/WindowManager: win=Window{96f549b u0 Splash Screen com.example.StevensPin EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.AppWindowToken.destroySurfaces:1248 com.android.server.wm.AppWindowToken.destroySurfaces:1229 com.android.server.wm.WindowState.onExitAnimationDone:5182 com.android.server.wm.WindowStateAnimator.onAnimationFinished:320 com.android.server.wm.WindowState.onAnimationFinished:5623 com.android.server.wm.-$$Lambda$yVRF8YoeNdTa8GR1wDStVsHu8xM.run:2 com.android.server.wm.SurfaceAnimator.lambda$getFinishedCallback$0$SurfaceAnimator:100
2020-09-30 00:00:13.603 9594-9594/? A/DEBUG: pid: 7174, tid: 7174, name: mple.StevensPin >>> com.example.StevensPin <<<
2020-09-30 00:00:13.604 9594-9594/? A/DEBUG: #01 pc 00157a3f /data/app/com.example.StevensPin-pGnjhn3RCPRS-R-mc79c5Q==/lib/arm/libflutter.so (BuildId: e975fb1af56ffc3c5acc61eaa8e0aba1720b5000)
2020-09-30 00:00:13.604 9594-9594/? A/DEBUG: #02 pc 004e1a38 /data/app/com.example.StevensPin-pGnjhn3RCPRS-R-mc79c5Q==/lib/arm/libflutter.so!libflutter.so (offset 0x4e0000) (BuildId: e975fb1af56ffc3c5acc61eaa8e0aba1720b5000)
2020-09-30 00:00:14.003 507-507/? E/audit: type=1701 audit(1601420414.001:20595): auid=4294967295 uid=10309 gid=10309 ses=4294967295 subj=u:r:untrusted_app_27:s0:c53,c257,c512,c768 pid=7174 comm="mple.StevensPin" exe="/system/bin/app_process32" sig=6 res=1
2020-09-30 00:00:14.090 1025-1308/? E/InputDispatcher: channel 'f4478b2 com.example.StevensPin/com.example.StevensPin.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2020-09-30 00:00:14.094 1025-1433/? E/WindowManager: win=Window{f4478b2 u0 com.example.StevensPin/com.example.StevensPin.MainActivity EXITING} destroySurfaces: appStopped=false win.mWindowRemovalAllowed=true win.mRemoveOnExit=true win.mViewVisibility=0 caller=com.android.server.wm.AppWindowToken.destroySurfaces:1248 com.android.server.wm.AppWindowToken.destroySurfaces:1229 com.android.server.wm.WindowState.onExitAnimationDone:5182 com.android.server.wm.-$$Lambda$01bPtngJg5AqEoOWfW3rWfV7MH4.accept:2 java.util.ArrayList.forEach:1262 com.android.server.wm.AppWindowToken.onAnimationFinished:3931 com.android.server.wm.AppWindowToken.commitVisibility:913
2020-09-30 00:00:14.525 2472-9613/? E/pageboostd: prefetch start : app comstsltdstevenspin
2020-09-30 00:00:14.526 507-507/? E/audit: type=1400 audit(1601420414.525:20596): avc: denied { search } for pid=2472 comm="pageboostd" name="com.stsltd.stevenspin" dev="sda31" ino=1708995 scontext=u:r:pageboostd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 SEPF_SM-G975F_10_0020 audit_filtered
2020-09-30 00:00:14.528 2472-9613/? E/pageboostd: comstsltdstevenspin, amt 48201728 scnt 15 fcnt 35
2020-09-30 00:00:14.529 2472-9613/? E/pageboostd: prefetch end : app comstsltdstevenspin data_amount 48201728
Update 2
While searching online i've found that similar issue happened if you are using a third party lib and try shrinking the build.
I'm using msal_mobile for authenticating user at the beginning. If i don't shrink my build
flutter build apk --no-shrink
Now the app works and doesn't crash.
On the other hand if I avoid the following msal_mobile initializing code, and build the apk with shrinking enabled flutter build apk, which uses R8 to shrink, app doesn't crash again.
class _MyAppState extends State<MyApp> {
MsalMobile msal;
#override
void initState() {
super.initState();
MsalMobile.create('assets/auth_config.json', "https://login.microsoftonline.com/Organizations").then((client) {
setState(() {
msal = client;
});
});
}
}
Is there some different approach to shrink the app when u are using lib that causes such issue.
I encountered the same error and narrowed the problem down to the msal_mobile package having issues invoking platform-specific functionality with its method channels (specifically Line 39 of msal_mobile.dart).
Based on what I read here, it seems like the Android modification and obfuscation process ends up being a bit overzealous when renaming methods, making the method channels used in the msal_mobile package think that the method they are trying to call doesn't exist.
The only solution that I found to work for my own situation isn't ideal, as it increases the size of my app, but it got my project working again, so I thought I would share.
In your project's directory, open the file android/app/build.gradle and add the following lines to the release section of buildTypes:
buildTypes {
release {
signingConfig signingConfigs.debug
minifyEnabled false // Add this line
shrinkResources false // Add this line
useProguard false // Add this line
}
}
I hope this helps a bit!
My application is showing very strange behavior for a tablet device, it crashes as it launches (Lollipop - 5.1.1 Tablet device, without any meaningful logs) though it runs fine on mobile devices even including Lollipop - 5.0 phone device with almost same log report
minSdkVersion 19
targetSdkVersion 28
Log report
E/com.samsung.app: [AccuTab_Magagine]>>> UIMK:1376 [0:0] time : 17:31
E/Watchdog: !#Sync 2614 [07-31 17:31:00.264]
? E/AffinityControl: AffinityControl: registerfunction enter
? E/AffinityControl: AffinityControl: registerfunction enter
E/WindowState: getStack: Window{2bd3ac2f u0 d0 com.project.debug/com.screens.account_login.AccountLoginActivity} couldn't find taskId=500 Callers=com.android.server.wm.WindowState.getDisplayContent:1059 com.android.server.wm.WindowState.isDefaultDisplay:1778 com.android.server.wm.WindowState.getMultiWindowStyleLw:2363 com.android.internal.policy.impl.multiwindow.MultiPhoneWindowManager.shouldEnableLayoutInsetsBySoftInput:1505
E/Zygote: MountEmulatedStorage()
E/Zygote: v2
E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
com.switchsolutions.agricultureapplication.mobilink.debug E/StudioProfiler: Studio Profilers encountered an unexpected error. Consider reporting a bug, including logcat output below.
See also: https://developer.android.com/studio/report-bugs.html#studio-bugs
Failed to capture application
E/WindowState: getStack: Window{2bd3ac2f u0 d0 com.project.debug/com.screens.account_login.AccountLoginActivity} couldn't find taskId=500 Callers=com.android.server.wm.WindowState.getDisplayContent:1059 com.android.server.wm.WindowState.isDefaultDisplay:1778 com.android.server.wm.WindowState.getMultiWindowStyleLw:2363 com.android.internal.policy.impl.multiwindow.MultiPhoneWindowManager.shouldEnableLayoutInsetsBySoftInput:1505
E/android.os.Debug: ro.product_ship = true
E/android.os.Debug: ro.debug_level = 0x4f4c
This just started happening recently and it has gotten progressively worse. I was initially alerted when I saw a couple calls to the Facebook API when my app had nothing to do with FB whatsoever.
Things I tried that (temporarily) helped:
- Closing all tabs in Chrome
- Closing all open applications
- Selecting "Show only selected application" option
Note. My app isn't even running. This happens as soon as I open Android Studio and plug my phone in. I get roughly 1,000 log/30 minutes.
Example 1
Example 2
08-11 13:08:53.087 2099-2099/? I/wpa_supplicant: RRM: Ignoring radio measurement request: Not RRM network
08-11 13:08:53.566 1626-1626/? D/HeadsetPhoneState: sendDeviceStateChanged. mService=1 mIsSimStateLoaded=true mSignal=2 mRoam=0 mBatteryCharge=4
08-11 13:08:55.629 1105-1142/? I/WifiService: requestActivityInfo uid=1000
08-11 13:08:55.630 1105-1142/? I/WifiService: reportActivityInfo uid=1000
getSupportedFeatures uid=1000
08-11 13:08:55.636 1954-1954/? E/QtiImsExtUtils: getConfigForPhoneId phoneId is invalid
isCarrierConfigEnabled bundle is null
08-11 13:09:12.433 2453-2453/? I/clatd: Detecting NAT64 prefix from DNS...
08-11 13:09:12.658 1751-1789/? I/QcrilOemhookMsgTunnel: [0]processOemHookIndication length=21
08-11 13:09:12.659 1751-1751/? D/QcrilMsgTunnelIfaceManager: handleMessage what = 0
08-11 13:09:12.665 15401-15415/? V/QMI_OEMHOOK: Thread=ModemService received { when=0 what=0 obj=android.os.AsyncResult#862fe81 target=com.qualcomm.qcrilhook.QmiOemHook }
08-11 13:05:00.210 2554-2554/? I/BeaconBle: Starting scan on OS scanner. BT state: 12
08-11 13:05:00.212 2554-2554/? D/BluetoothAdapter: isLeEnabled(): ON
08-11 13:05:00.214 1105-1795/? I/ActivityManager: Start proc 25103:com.cvs.launchers.cvs/u0a161 for broadcast com.cvs.launchers.cvs/com.ibm.mce.sdk.wi.AlarmReceiver
08-11 13:05:00.215 1105-1541/? D/RecurrenceRule: Resolving using anchor 2018-08-11T13:05:00.215-04:00[America/New_York]
08-11 13:05:00.217 1626-2168/? I/bt_stack: [INFO:gatt_api.cc(1004)] GATT_Register
[INFO:gatt_api.cc(1027)] allocated gatt_if=5
08-11 13:05:00.218 2554-18778/? D/BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=5 mScannerId=0
08-11 13:05:00.221 1105-1541/? D/RecurrenceRule: Cycle 18 from 2018-07-19T00:00-04:00[America/New_York] to 2018-08-19T00:00-04:00[America/New_York]
08-11 13:05:00.222 1105-1541/? D/NetworkStats: Resolving plan for NetworkTemplate: matchRule=MOBILE_ALL, subscriberId=311480..., matchSubscriberIds=[311480...]
Your selecected filter Show only selected application will only work if a process is selected. Just select your process when your app is running where it currently says No Debuggable Processes.
The output shown in your screenshot is the log of the whole device, including logs of the system and other apps.
Logcat shows logs in general, so if you want to see just specific app, you got app filter above the list. Also theres text filter if given app is too noisy as well
BUILD SUCCESSFULon Android Emulator \
Total time: 2 mins 32.03 secs
Built the following apk(s): mulator -
/var/meteor/met-wsecom/.meteor/local/cordova-build/platforms/android/build/outputs/apk/android-debug.apk
Using apk: /var/meteor/met-wsecom/.meteor/local/cordova-build/platforms/android/build/outputs/apk/android-debug.apk
Package name: com.id15ripp23h390l1sizzfo
INSTALL SUCCESS on Android Emulator /
Starting app on Android Emulator |
Tailing logs for Android Emulator
=> Started app on Android Emulator.
I20170221-10:02:19.232(5.5)? 02-21 10:00:35.411 7748 7748 I chromium: [INFO:library_loader_hooks.cc(120)] Chromium logging enabled: level = 0, default verbosity = 0
I20170221-10:02:20.637(5.5)? 02-21 10:00:36.053 7748 7748 W chromium: [WARNING:resource_bundle.cc(285)] locale_file_path.empty()
I20170221-10:02:20.637(5.5)? 02-21 10:00:37.400 7748 7748 D MeteorWebApp: Detected new bundled version, removing versions directory if it exists
I20170221-10:02:20.638(5.5)? 02-21 10:00:37.759 7748 7774 W chromium: [WARNING:data_reduction_proxy_config.cc(423)] SPDY proxy OFF at startup
I20170221-10:02:20.638(5.5)? 02-21 10:00:41.538 7748 7748 I MeteorWebApp: Serving asset bundle with version: 8b3faaa5b6fa7637c474dd2669147eaefc505608
I20170221-10:02:20.638(5.5)? 02-21 10:00:52.066 7748 7748 I chromium: [INFO:CONSOLE(1185)] "deviceready has not fired after 5 seconds.", source: http://localhost:12672/cordova.js (1185)
I20170221-10:02:20.638(5.5)? 02-21 10:00:52.066 7748 7748 I chromium: [INFO:CONSOLE(1178)] "Channel not fired: onDOMContentLoaded", source: http://localhost:12672/cordova.js (1178)
I'm new on eclipse and android and I want for my first app do a wifi connection between the smartphone and an ip camera, unfortunately my app crash if when I want to see the stream of the camera.
My logcat said that:
03-06 18:11:26.879: E/(680): Could not open '/data/data/hotplug/cmd'<br/>
03-06 18:11:26.879: E/(680): error : 2, No such file or directory
[Edit k3b 2017-08-09]
I have the same issue on my andriod-4.4 my logcat contain this
08-09 20:38:40.436 1883-2035/? I/libPerfService: 1: set: 1
[ 08-09 20:38:40.436 1883:0x7f3 E/ ]
Could not open '/data/data/hotplug/cmd'
[ 08-09 20:38:40.436 1883:0x7f3 E/ ]
error : 2, No such file or directory
googleing "libPerfService" for found androidStudio log doesn't work
11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set freq: 1950000
11-02 02:29:48.792 1014-1231/? I/libPerfService: 1: set: 4
found https://census.tsyrklevich.net/file_permissions//system/lib/libperfservice.so with no description
Does anybody know where libPerfService comes from? is this a maleware waiting for command? I have not found any defintion for it.