Unable to find unity activity in manifest. UnityEditor.HostView:OnGUI()? - unity3d

i had a problem when build an run Google CardBoard SDK for Unity.
some one can solve it?
I used:
Unity 4.2
Device: Lg - p925 ( android 4.04)
the Console in Unity Edit show:
Unable to find unity activity in manifest. You need to make sure orientation attribute is set to landscape manually.
UnityEditor.HostView:OnGUI()
Installation failed with the following output:
pkg: /data/local/tmp/Package.apk
Failure [INSTALL_FAILED_OLDER_SDK]
rm failed for -f, No such file or directory
2127 KB/s (9391146 bytes in 4.311s)
UnityEditor.HostView:OnGUI()
Error building Player: UnityException: Unable to install APK!
Installation failed. See the Console for details.
please!

About the message Unable to find unity activity in manifest., try adding the following line inside the <activity> tag in AndroidManifest.xml (found in Assets/Plugins/Android):
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />

Look at the Manifest
<uses-sdk android:minSdkVersion="16" />
Your Device is 15.

Related

google_maps_flutter does not work correctly on Android 11

I am using the google_maps_flutter package and whenever I click the button to launch the google map I encounter this error:
google maps is not installed or is disabled
But such a thing was not true :(((
This error is happened to me in Android 11.
please help me to solve this.
To fix this, you will need to add the Google Maps package "com.google.android.apps.maps" as an entry in your AndroidManifest.xml entry:
<manifest package="com.your.package">
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
...
</manifest>

ionic base64togallery plugin not working in android-targetSdkVersion 29

I'm using base64-to-gallery to save images for android devices in my ionic app.
Previously it was working fine but now after added <preference name="android-targetSdkVersion" value="29" />to config.xml file, under android platform, it's not working.
Please kindly help me with it.
Finally solved the issue. To anyone who is struggling, I will explain as below.
As mentioned in the git, https://github.com/Nexxa/cordova-base64-to-gallery , ionic Cordova base64togallery plugin has been discontinued.
And also when trying to submit the ionic mobile app for Android production, it's saying that the target SDK version should be more than 29.
But as usual, if we add <preference name="android-targetSdkVersion" value="29" /> to the config.xml file under the Android platform, it will not work the base64togallery plugin (not saving images to your device)
So you have to do like below,
In your ionic project, go to build.gradle file (platforms\android\build.gradle) and change defaultTargetSdkVersion and defaultCompileSdkVersion to 29. (as below)
defaultTargetSdkVersion=29
defaultCompileSdkVersion=29
And then go to AndroidManifest.xml file
(platforms\android\app\src\main\AndroidManifest.xml) and add android:requestLegacyExternalStorage="true" to the application tag, as showing below.
<application android:hardwareAccelerated="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:networkSecurityConfig="#xml/network_security_config" android:requestLegacyExternalStorage="true" android:supportsRtl="true">
Then try to build your app for debug or release versions.

Flutter Image Cropper Android Manifest Error - "com.yalantis.ucrop.UCropActivity, was not found in the project or the libraries"

I am getting the error "Class referenced in the manifest, com.yalantis.ucrop.UCropActivity, was not found in the project or the libraries " when I add an activity to my Android Manifest file. Here is the code which is causing the error:
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"/>
I am trying to install the image_cropper package, and in the installation guide it requires that I add this activity statement to the Android Manifest file. I am using MacOS
What I have tried:
I have followed the note in the installation guide "From v1.2.0, you need to migrate your android project to v2 embedding (detail)"
I ran pub get when I added to my pubspec.yaml
I ran flutter doctor and I have no warnings
Cleaned my flutter project and restarted Android Studio
you have to add the two activities in the android manifest that will help you edit the loaded image, the path is android android/app/src/main and add.
<activity android:name="com.android.camera.CropImage"/>
<activity android:name="com.yalantis.ucrop.UCropActivity"/>
I had the same problem and realized I made the silliest mistake. I merged an old project into a new one, and my manifest file was in the wrong place.
Make sure it's in android/app/src/main
I added these lines to /android/app/build.gradle file
android{
//...
lintOptions {
abortOnError false
}
}
and it worked for me.
ref: AndroidManifest class referenced applicationName was not found

Inmobi Unity SDK is crashing

I am facing an issue with the Inmobi unity package with GDPR 811.
The app that I have built using the above package crashes when I try to open it. So I tried running the stack traces on the Android profiler and found that it is not able to find some UnityPlayerPro xyActivity Class. I have tried removing this class from the Android manifest but it gives build errors.
I used Unity 2019.2.0f1 version with the player settings for the Android platform as; Build Version equal to 0.1 and minimum API level as 16
I have attached a detailed bug report, which can give you more information.
Please help me out in this regard. I would greatly appreciate your assistance in this matter.
Bug Name: Application crashed on opening the app.
Area Path: click
Unity Version: Unity 2019.2.0f1
Build Version: 0.1
Minimum API Level
Android: 16
Environment: Android phone (Samsung Galaxy A10)
Description: Application crash on taping on the game Icon while opening it
Steps To Reproduce:
Import the Inmobi unity package with GDPR 811 into an empty project.
Add the InmobiAdsDemoUnity scene in the Build settings.
Build and run to the Android device.
Install the apk on the device.
Open the apk by tapping on it.
Main Errors caught in the stack traces.
10-30 16:24:52.769: E/AndroidRuntime(7118): java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.SleepyBoar.AdsDemoUnity/com.unity3d.player.UnityPlayerPro
xyActivity}: java.lang.ClassNotFoundException: Didn't find class
"com.unity3d.player.UnityPlayerProxyActivity" on path: DexPathList[[zip file
"/data/app/com.SleepyBoar.AdsDemoUnity-
USpZf9YlQynoJUyJE_N1Kg==/base.apk"],nativeLibraryDirectories=[/data/app/com.
SleepyBoar.AdsDemoUnity-USpZf9YlQynoJUyJE_N1Kg==/lib/arm,
/data/app/com.SleepyBoar.AdsDemoUnity-
USpZf9YlQynoJUyJE_N1Kg==/base.apk!/l`enter code here`ib/armeabi-v7a, /system/lib]]
The exception that you are getting is due to the main unity player activity name changes in the latest versions of Unity (from 2018).
To resolve this, you would need to find the AndroidManifest.xml file in your Unity Project and replace the activity name from com.unity3d.player.UnityPlayerProxyActivity to com.unity3d.player.UnityPlayerActivity
From
<activity
android:name="com.unity3d.player.UnityPlayerProxyActivity"
android:launchMode="singleTask"
android:label="#string/app_name">
to
<activity
android:name="com.unity3d.player.UnityPlayerActivity" // changes in this line
android:launchMode="singleTask"
android:label="#string/app_name">
After this, you should be able to run it successfully.

Notification plugin not working phonegap 3.0 for iphone

I am developing an app with phonegap 3.0.0. I need to show the confirm dialog so I added the Notification plugin from phonegap CLI with the following command (as described in CLI Documentation):
$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
But now I can't build the project. When I try to build it fails with following error:
** BUILD FAILED **
The following build commands failed:
CompileC build/CamTest.build/Debug-iphonesimulator/CamTest.build/Objects-normal/i386/CDVNotification.o CamTest/Plugins/org.apache.cordova.dialogs/CDVNotification.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
When I remove the Notification plugin everything works fine. I've also tried to add the following in my config.xml (CamTest/www/config.xml) to no effect:
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>
Please someone tell me how to work with plugins in Phonegap 3.0.0. I am trying it on iphone simulator. Thanks.
We were facing the same problem, but before we added the required lines in config.xml. So, the following two step process also mentioned in this and this link solved the problem.
On the command line
$ cordova plugin add
https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
In project's config.xml
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>