Cannot find master when launching unity from Android (error)
                                        
                    •
                    Android                                    
                I tried to start unityplayeractivity when I clicked the button. But it threw an error "main file cannot be found" @ h_ 404_ 1@
In the list @ h_ 404_ 1@
@H_ 404_ 1@
<activity
        android:name="com.unity3d.player.UnityPlayerActivity"
        android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection"
        android:label="@string/app_name"
        android:launchMode="singleTask"
        android:screenOrientation="landscape">
        <intent-filter>
            <category android:name="com.google.intent.category.CARDBOARD" />
        </intent-filter>
        <Meta-data
            android:name="unityplayer.UnityActivity"
            android:value="true" />
    </activity>
I'm starting @ h with the following code_ 404_ 1@
@H_ 404_ 1@
Intent intent = new Intent(CurrentActivity.this, UnityPlayerActivity.class);
    startActivity(intent);
Just build armeabi-v7a. However, if you try to build other versions, such as x86 or generic APK, you are prone to this error. @ h_ 404_ 1@
Therefore, specify in gradle that only armeabi-v7a APK. @ h be built_ 404_ 1@
@H_ 404_ 1@
splits {
    // Configures multiple APKs based on ABI.
    abi {
        // Enables building multiple APKs per ABI.
        enable true
        // By default all ABIs are included, so use reset() and include to specify that we only
        // want APKs for x86, armeabi-v7a, and mips.
        // Resets the list of ABIs that Gradle should create APKs for to none.
        reset()
        // Specifies a list of ABIs that Gradle should create APKs for.
        include "armeabi-v7a"
    }
}
                
                            The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
                        
                                            
                        THE END
                    
                    
                    
                                                        二维码
                        
                        
                                                
                        