Skip to content
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

Ionic 4 Capacitor #64

Closed
Dev-Root2IoT opened this issue Feb 17, 2020 · 2 comments
Closed

Ionic 4 Capacitor #64

Dev-Root2IoT opened this issue Feb 17, 2020 · 2 comments

Comments

@Dev-Root2IoT
Copy link

Dev-Root2IoT commented Feb 17, 2020

Hello,

Facing below error:
MainActivity has leaked IntentReceiver org.apache.cordova.plugin.CordovaUnityLauncher$UnityToIonicBroadcastReceiver@f1117a6 that was originally registered here. Are you missing a call to unregisterReceiver()?

# ionic info

Ionic:

   Ionic CLI                     : 6.0.1 
   Ionic Framework               : @ionic/angular 4.11.8
   @angular-devkit/build-angular : 0.803.23
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.1.2

Capacitor:

   Capacitor CLI   : 1.4.0
   @capacitor/core : 1.4.0

Cordova:

   Cordova CLI       : 9.0.0
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res : 0.6.0
   native-run  : 0.2.8

Please help me out.

@yasirkula
Copy link
Owner

Does this help: #61

@Dev-Root2IoT Dev-Root2IoT changed the title Ionic 4 Capcitor Ionic 4 Capacitor Feb 18, 2020
@Dev-Root2IoT
Copy link
Author

Dev-Root2IoT commented Feb 18, 2020

Yes it helped,

Still facing below error:

D/ViewRootImpl@d3e6799[MainActivity]: ViewPostIme pointer 0
D/ViewRootImpl@d3e6799[MainActivity]: ViewPostIme pointer 1
V/Capacitor/Plugin: To native (Cordova plugin): callbackId: LaunchAR1850650334, service: LaunchAR, action: launchAR, actionArgs: ["my message for Unity-side"]
D/InputMethodManager: HSIFW - flag : 0 Pid : 14346
D/Capacitor: App paused
D/ViewRootImpl@2ab5e72[MainActivity]: dispatchDetachedFromWindow
D/InputTransport: Input channel destroyed: '56732cf', fd=151
D/ViewRootImpl@d3e6799[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@8e6deb7[MainActivity]
    getNavigationBarColor() -855310
I/: Increase max job count 60
D/Capacitor: Unable to find a Capacitor plugin to handle requestCode, trying Cordova plugins 11
D/ViewRootImpl@d3e6799[MainActivity]: stopped(false) old=false
D/Capacitor/Plugin/App: Firing change: true
V/Capacitor/Plugin/App: Notifying listeners for event appStateChange
D/Capacitor/Plugin/App: No listeners found for event appStateChange
D/Capacitor: App resumed
D/ViewRootImpl@d3e6799[MainActivity]: MSG_RESIZED_REPORT: frame=[0,0][1080,2280] ci=[0,117][0,0] vi=[0,117][0,0] or=1
D/ViewRootImpl@d3e6799[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@8e6deb7[MainActivity]
    getNavigationBarColor() -855310
V/Capacitor/Plugin/Network: Notifying listeners for event networkStatusChange
D/Capacitor/Plugin/Network: No listeners found for event networkStatusChange

Also in the Unity AndroidManifest, Do we need to remove the whole activity tag ?

Right now I have commented it our

<!--    <activity android:label="@string/app_name" android:screenOrientation="fullSensor" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false" android:name="com.DefaultCompany.UnityTest.UnityPlayerActivity">-->
<!--      <intent-filter>-->
<!--        <action android:name="android.intent.action.MAIN" />-->
<!--        <category android:name="android.intent.category.LAUNCHER" />-->
<!--      </intent-filter>-->
<!--      <meta-data android:name="unityplayer.UnityActivity" android:value="true" />-->
<!--      <meta-data android:name="android.notch_support" android:value="true" />-->
<!--    </activity>-->

SOLVED

The actual error was
Unity : Failed to load 'libmain.so', the application will terminate.

At Unity Player Setting, Uncheck strip engine code and using that build in Ionic fixed this issue.
Strip Engine Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants