Search code examples
androidandroid-emulatorbluestacks

My app works in AVD emulator, but crashes when I run in Bluestacks


When I Run my app using the eclipse emulator, (Nexus One AVD) the app displays and works fine. After exporting the .apk and installing on Bluestacks, the app installs successfully, but when I try open(run) the app on Bluestacks, I experience the app crashing. The screen flashes black and closes the app before displaying the MainActivity screen. I have also tried re-installing Bluestacks (newest version) but the problem persists.

Any ideas why this happens?

Any advice would be greatly appreciated.

Here is my Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.s45957193"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="23" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="Update"></activity>
        <activity android:name="ManageCars"></activity>
        <activity android:name="AddCar"></activity>


    </application>

</manifest>

LogCat (Debug): 04-16 09:58:18.172: D/OpenGLRenderer(2431): Use EGL_SWAP_BEHAVIOR_PRESERVED: true 04-16 09:58:18.196: D/(2431): HostConnection::get() New Host Connection established 0xabfeb620, tid 2431 04-16 09:58:18.259: D/(2431): HostConnection::get() New Host Connection established 0xb14d15f0, tid 2444 04-16 09:58:18.281: I/OpenGLRenderer(2431): Initialized EGL, version 1.4 04-16 09:58:18.340: W/EGL_emulation(2431): eglSurfaceAttrib not implemented 04-16 09:58:18.340: W/OpenGLRenderer(2431): Failed to set EGL_SWAP_BEHAVIOR on surface 0xaf0f8540, error=EGL_SUCCESS


Solution

  • **MY APP IS NOW WORKING IN BLUESTACKS!! :D ** I changed the resolution of the guest using regedit. link .

    I am using text files to read data in my project. It seemed that the Bluestacks emulator was not able to read certain textfiles. I thought this to be a bit strange due to the app displaying fine in elipcse AVD emulator?? However, after getting the app to run in bluestacks, all seems to be working like a charm.

    Thanks for the help guys.