2016-10-07 18 views
8

ठीक पर एकता एंड्रॉइड एपीके क्रैशिंग ठीक है, इसलिए जब से मैंने सफलतापूर्वक बनाया है, मैंने अपने गेम में here से Google Play सेवाओं को जोड़ने का प्रयास किया है।स्टार्टअप

मैंने एकता पैकेज आयात किया, और प्रासंगिक सेटअप विंडो में एंड्रॉइड के लिए Google play गेम्स सेट अप किया।

मैंने इस बिंदु पर निर्माण करने की कोशिश की, हालांकि मैं उस अजीब त्रुटि को प्राप्त करने में असमर्थ था, जबकि डीएक्स फाइलों के निर्माण के दौरान एआर फाइलों के बीच संघर्ष होने का संकेत मिलता था। मैंने इसे दोनों संपत्ति/प्लगइन्स/एंड्रॉइड/प्ले-सर्विसेज-बेस-9.0.2 और संपत्ति/प्लगइन्स/एंड्रॉइड/प्ले-सर्विसेज-बेसमेंट-9.0.2 दोनों के कारण होने के कारण संकुचित कर दिया।

मैंने इन दोनों को अनियंत्रित किया है ताकि इन्हें डीईएक्स त्रुटि सामग्री में रूपांतरण करने के लिए एंड्रॉइड में बनाया जा सके। मुझे लगता है कि यह ठीक होगा।

मैं तो गूगल प्ले पर एप्लिकेशन धक्का दे दिया, (अल्फा पर्यावरण) गूगल के लिए एक छोटा सा नियंत्रक स्क्रिप्ट के साथ शुरू पर() के लिए लॉग इन करने के लिए खेलते हैं:

void Awake() 
{ 
    // recommended for debugging: 
    PlayGamesPlatform.DebugLogEnabled = true; 
    // Activate the Google Play Games platform 
    PlayGamesPlatform.Activate(); 
} 

void Start() 
{ 
    Login(); 
} 

void Login() 
{ 
    Social.localUser.Authenticate((bool success) => { 
     LoggedIn = success; 
    }); 
} 

हालांकि एकता पहले खोलने से पहले दुर्घटनाग्रस्त हुआ प्रतीत होता है दृश्य। यह स्टार्टअप पर तुरंत दुर्घटनाग्रस्त हो रहा है। लॉगकैट सामान here देखा जा सकता है।

समस्या प्रतीत होता है लाइन 842 के आसपास पाए जाते हैं:

10-07 06:03:06.282: E/AndroidRuntime(9551): FATAL EXCEPTION: main 
10-07 06:03:06.298: W/ActivityManager(771): Force finishing activity 1 com.PINGUAPPS.TEMPLATE/com.unity3d.player.UnityPlayerNativeActivity 
10-07 06:03:06.339: W/ActivityManager(771): Force finishing activity 2 com.google.android.apps.mtaas.backdrop/.BackdropActivity 
10-07 06:03:06.402: D/Atlas(771): Validating map... 

मुझे नहीं पता कि यह कैसे तय करने के लिए है?

:: अतिरिक्त जानकारी ::

तो मैं वापस एक बिंदु है जहां मैं एकता एकता में आयात पैकेज के लिए लुढ़का है, लेकिन मैं अभी तक इसे कॉन्फिगर, यह संसाधनों से युक्त मेरे एक्सएमएल देने नहीं किया है । यह इस बिंदु पर संपादक में एक NullReferenceException दे रहा है:

NullReferenceException: Object reference not set to an instance of an object 
GooglePlayServices.PlayServicesResolver.OnPostprocessAllAssets (System.String[] importedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromAssetPaths) (at Assets/PlayServicesResolver/Editor/PlayServicesResolver.cs:104) 
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) 
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. 
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) 
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) 
UnityEditor.AssetPostprocessingInternal.PostprocessAllAssets (System.String[] importedAssets, System.String[] addedAssets, System.String[] deletedAssets, System.String[] movedAssets, System.String[] movedFromPathAssets) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:27) 
UnityEditor.AssetDatabase:Refresh() 
GooglePlayGames.Editor.GPGSUpgrader:.cctor() (at Assets/GooglePlayGames/Editor/GPGSUpgrader.cs:107) 
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[]) 

लाइन यह संदर्भ देता है:

if (!Resolver.ShouldAutoResolve(importedAssets, deletedAssets, 
       movedAssets, movedFromAssetPaths)) 

हालांकि सही इस NullReferenceException के बाद, मैं देख समाधानकर्ता लॉग में पंजीकृत किया जा रहा। जैसे:

Registering resolver version 1.2.0 
UnityEngine.Debug:Log(Object) 
GooglePlayServices.ResolverVer1_2:.cctor() (at Assets/PlayServicesResolver/Editor/ResolverVer1_2.cs:34) 
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[]) 

आदि

अब, मैं इस APK का निर्माण और मेरे फोन ठीक, कोई समस्या नहीं पर चला सकते हैं। (स्पष्ट रूप से Google play गेम सेवाएं बहुत कुछ नहीं करेंगे, क्योंकि यह कॉन्फ़िगर नहीं है)।

तो, मैं विंडो >> Google Play गेम्स >> सेटअप >> एंड्रॉइड पर जाता हूं और यहां, मैं अपने संसाधन XML को पेस्ट करता हूं। मैं संसाधन सी # फ़ाइल के लिए एक जगह और नाम देता हूं, और सेटअप हिट करता हूं।

मैं निम्नलिखित जार निर्भरता संघर्ष विकल्पों को देखने के:

Remove or replace play-services-ads version 9.0.2 with version 9.6.1? 
Remove or replace support-v4 version 23.1.1 with version 24.0.0? 
Remove or replace play-services-gcm version 9.0.2 with version 9.6.1? 
Remove or replace play-services-location version 9.0.2 with version 9.6.1? 
Remove or replace play-services-base version 9.0.2 with version 9.6.1? 
Remove or replace play-services-basement version 9.0.2 with version 9.6.1? 
Remove or replace support-annotations version 23.1.1 with version 23.4.0? 
Remove or replace play-services-iid version 9.0.2 with version 9.6.1? 
Remove or replace play-services-tasks version 9.0.2 with version 9.6.1? 

मैं दबाने इन सब के साथ ही ठीक करने के लिए रखने की कोशिश की है, दोनों कार्य खत्म मेरी Aars के साथ कोई विरोध के कारण।

मैंने अभी कोशिश की है, इस बार उन सभी के लिए ठीक दबाकर, और मेरे आखिरी सफल निर्माण के बाद से इसे फिर से करने का प्रयास किया।जार परिवर्तित प्रारूप डेक्स के लिए जबकि, यह निर्माण निम्न त्रुटि देने में विफल रहता है:

CommandInvokationFailure: Unable to convert classes into dex format. 
C:\Program Files (x86)\Java\jdk1.7.0_55\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="C:/Users/PINGU/AppData/Local/Android/sdk\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" - 

stderr[ 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.a) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.banners.BannerSize$1) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.banners.b) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.banners.d) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.banners.a) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.banners.c) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.interstitials.a.b) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.interstitials.a.c) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.ofw.a) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.e) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.f) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.g) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.h) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.d) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.i) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.j) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.m) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.n) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.a.o) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.b) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.c) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.e) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.h) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.f) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.g) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.k) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.i) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.j) that doesn't come with an 
associated EnclosingMethod attribute. This class was probably produced by a 
compiler that did not target the modern .class file format. The recommended 
solution is to recompile the class from source, using an up-to-date compiler 
and without specifying any "-target" type options. The consequence of ignoring 
this warning is that reflective operations on this class will incorrectly 
indicate that it is *not* an inner class. 
warning: Ignoring InnerClasses attribute for an anonymous inner class 
(com.fyber.ads.videos.l) that doesn't come with<message truncated> 

जैसा कि पहले उल्लेख, मैं और मेरे नाटक के सेवाओं आधार लगाने से होने से रोकने के कर सकते हैं खेलने-सेवाओं तहखाने फ़ाइलें और एंड्रॉइड के लिए उन्हें बनाने के लिए अनचेकिंग। जब मैं ऐसा करता हूं तो एपीके बनाता है, हालांकि ऐप खोले जाने पर ही क्रैश हो जाएगा।

+0

क्या आप एआर संघर्ष त्रुटि सूचीबद्ध कर सकते हैं? यह सहायक होगा। – JeanLuc

+0

जैसा कि मैं सोच सकता था उतनी अतिरिक्त जानकारी जोड़ी - उम्मीद है कि यह मदद करता है :) – pingu2k4

+0

यदि आपके पास ग्रहण है, तो बस लॉन्च करने वाले ऐप पर त्रुटियों को देखने के लिए लॉगकैट का उपयोग करें। – Kenshin

उत्तर

0

मुझे पिछले साल अपने एंड्रॉइड गेम प्रोजेक्ट पर एक ही समस्या का सामना करना पड़ा। मैंने एंड्रॉइड सपोर्ट रिपोजिटरी, एंड्रॉइड सपोर्ट लाइब्रेरी, Google Play Services, Google रिपोजिटरी, Google बिलिंग लाइब्रेरी, एंड्रॉइड एपीआई 6.0 अपडेट किया, और फिर समस्या हल हो गई। मुझे अभी भी पता नहीं है कि समस्या का स्रोत क्या है, लेकिन मैंने अपनी परियोजना में इस तरह से समस्या हल की। मुझे आशा है कि यह आपके लिए भी काम करेगा।

0

निर्भरताओं के साथ काम करना वास्तव में एक दर्द है .... यह लंबे समय से मैंने एकता पर काम किया है .. और मुझे इसमें बहुत कुछ याद नहीं है .. लेकिन इन्हें लिंक पर देखें मदद कर सकते है।

http://answers.unity3d.com/questions/644841/nullreferenceexception-object-reference-not-set-to-83.html

भी इस निर्भरता समाधानकर्ता कोशिश ....

https://github.com/googlesamples/unity-jar-resolver

0

एक समय पहले मेरी एकता परियोजना के साथ एक ही मुद्दा था। एक डुप्लिकेट समर्थन-वी 4 वर्ग था। यह पता चला कि एक खाली परियोजना में गोगल प्ले प्लगइन आयात करना सबसे अच्छा था (परीक्षण परीक्षण करें)।

फिर Google play प्लगइन और एक्सटेंशन, संपादक और प्लगइन्स फ़ोल्डर्स से सभी फ़ाइलों को पूरी तरह से हटाएं और खाली प्रोजेक्ट से पुनः आयात करें। क्षमा करें, मैं अब और स्पष्ट नहीं कर सकता कि अब मेरे प्रोजेक्ट फ़ाइलों तक पहुंच है।