StansAssets / com.stansassets.android-native

Android Native Plugin Wiki
https://api.stansassets.com/android-native/
9 stars 1 forks source link

android.content.ActivityNotFoundException error #32

Closed skullthug closed 3 years ago

skullthug commented 3 years ago

We've been upgrading our project to the latest versions of Android & iOS Native Pro. On the Android side we appear to have hit this particular issue that someone else has reported in the Unity forum https://forum.unity.com/threads/released-android-native-pro.551020/page-4#post-6568654 https://forum.unity.com/threads/released-android-native-pro.551020/page-4#post-6568654

In our instance the exact error is:

01-11 18:36:28.731 14961 14979 E Unity : AndroidJavaException: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.beliefengine.handyapp/com.stansassets.android.app.permissions.AN_PermissionsProxyActivity}; have you declared this activity in your AndroidManifest.xml? 01-11 18:36:28.731 14961 14979 E Unity : android.content.ActivityNotFoundException: Unable to find explicit activity class {com.beliefengine.handyapp/com.stansassets.android.app.permissions.AN_PermissionsProxyActivity}; have you declared this activity in your AndroidManifest.xml? 01-11 18:36:28.731 14961 14979 E Unity : at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2005) 01-11 18:36:28.731 14961 14979 E Unity : at android.app.Instrumentation.execStartActivity(Instrumentation.java:1673) 01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivityForResult(Activity.java:4587) 01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivityForResult(Activity.java:4545) 01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivity(Activity.java:4906) 01-11 18:36:28.731 14961 14979 E Unity : at android.app.Activity.startActivity(Activity.java:4874) 01-11 18:36:28.731 14961 14979 E Unity : at com.stansassets.android.app.permissions.AN_PermissionsProxyActivity.Create(AN_PermissionsProxyActivity

We have the Auto Manifest Management enabled. Usually we've been able to let this plugin manage it just fine and never run into permission problems there.

stan-osipov commented 3 years ago

For some reason, something happend with the .meta file of android library and it was excluded from the android platform. Make sure you add the Android Check box here: unnamed

With the next update, I will be setting this check box via code on the build pre-process.

skullthug commented 3 years ago

This solved my problem. Thanks!