I have a problem with AdMob. When I call interstitial or banner the application crushes.
Errors:
Could not find class 'com.google.android.gms.ads.InterstitialAd', referenced from method com.google.unity.ads.Interstitial$1.run
Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.ads.InterstitialAd
When I apply the folder google-play-service-lib from the Android SDK, Unity automatically deletes it. If someone has the same problem or a similar, please help.
Related
Hi I am working with unity.
I am trying to build my application in android
I am getting this error when building. Normally I can play the game in unity. I am building for android.
I have a Keystore. I created a key.
java.lang.RuntimeException: Duplicate class
com.facebook.android.BuildConfig found in modules
jetified-facebook- android-
wrapper-7.17.2-runtime.jar (:facebook-android-wrapper-7.17.2:)
and jetified- facebook-android-wrapper-8.0.0-runtime.jar (:facebook-
android-wrapper-8.0.0:)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I looked at these links
https://github.com/facebook/facebook-sdk-for-unity/issues/386
Duplicates class found in modules
https://forum.unity.com/threads/androidx-corecomponentfactory-problem-on-2019-3.777584/#post-5193863
But it does not solve my problem. I am getting still the same errors.
I found the solution:
It seems adding voodoo packes in unity and facebook is conflicting. If you have voodoo packages you do not need to add facebook sdks again.
I've started working on converting a game into Virtual reality. For starting purposes, I've created an empty project and imported Google VR plugin. But when I want to create the build in cellphone, following error occurs:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
stderr[
AndroidManifest.xml:30: error: No resource identifier found for attribute 'enableVrMode' in package 'android'
stdout[
Configurations:
(default)`
I've searched internet, changed API levels, did everything I could. But it didn't worked. Need your help guys.
The enableVrMode attribute was added in Android N. You will get this error if you are using anything less that this version.
Download Android SDK Platform-Tools 24 and then Android 7.0 (API 24). You can do this from Android Studio. That should solve your problem.
If this does not solve your problem, note that the latest Google VR SDK includes some API that requires Unity VR Technical preview to work.You can read here for more information.
I got much help through Stackoverflow.
Recently, I checked this error when I used Unity.
SystemException: 'System.Net.Sockets' are supported only with Unity Android Pro. Referenced from assembly 'Assembly-CSharp'
To solve this error, I did it as follows :
I would open up Visual Studio and do a Find in Files for "System.Net.Sockets". The file name was 'UDPReceive.cs'.
I searched script for finding script error. But I didn't find script error.
I did find another solution. The solution is to add '#if UNITY_EDITOR' at the very top of any file that uses 'System.Net.Sockets' and '#endif' at the bottom of files. But this error occured continuingly.
I deleted 'Assembly-CSharp' file and 'UDPReceive.cs'. But this error was not solved and more errors occur X_X
So, I wanna solve this error.
Could you notify solution of this error to me?
Is there only solution using paid Android Pro?
+) My Unity Version is 4.6.3 & Unity Pro Version (Internal Develop Version)
I am working on a Xamarin based mobile app. It has previously deployed to an iPhone, and is currently working on the simulator. However, when I try to Debug on my iPhone, I get:
Error MT2002: Failed to resolve assembly: 'PCLStorage.Abstractions, Version=1.0.2.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64' (MT2002) (My_App.iOS)
PCLStorage is installed and up to date in my iOS and Core projects, although neither have any references to the package. It was installed when I added the AWS Core SDK. How do I resolve this error, I assume that is what is stopping the debug on iPhone?
Edit: (based on Answer below)
If I disable the linker in my build settings, I get the error:
My_App/iOS/MTOUCH: Error MT3001: Could not AOT the assembly 'My_App/iOS/obj/iPhone/Debug/build-iphone4.1-9.2.1/mtouch-cache/Build/AWSSDK.Core.dll' (MT3001) (My_App.iOS)
I would really appreciate some suggestions as I haven't made much headroom with this...
Try disabling "Linker" in the build options for Device builds. It's possible that if you are not directly referencing the library, the linker is stripping it out, causing it to fail at runtime.
I just had the same problem after switching from the simulator to an actual device
Fortunately, I've gotten the error only in 3 pages...
Fix was to remove the assembly attribute from the XAML:
From
xmlns:viewModels="clr-namespace:XXX.ViewModels;assembly=XXX"
To
xmlns:viewModels="clr-namespace:XXX.ViewModels"
When I compile one of the Android code samples from Xamarin I get the following error on compile, what can I do to fix it?
C:\Program Files
(x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3):
Error MSB4131: The "ResourceNameCaseMap" parameter is not supported by
the "AndroidComputeResPaths" task. Verify the parameter exists on the
task, and it is a gettable public instance property. (MSB4131) (Snake)
I fixed the problem, one I had to update my mono.android SDK. Second, thanks to the new update of the official android SDK, I had to change the location of the aapt.exe file and the lib directory so that it would build properly, it's working fine now.