应用程序类之前的Android应用程序白屏冻结

时间:2016-06-02 14:02:42

标签: android freeze

应用程序/活动类调用之前,应用程序会在每个设备上不时地使用白屏(每次启动1次)冻结。迫切需要一些帮助。 摇篮:

 apply plugin: 'com.android.application'

    android {
        signingConfigs {
            config {
                storeFile file('somejks')
            }
        }
        compileSdkVersion 23
        buildToolsVersion "23.0.3"
        dexOptions {
            javaMaxHeapSize "4g"
        }
        defaultConfig {
            applicationId "some.package.ddd"
            minSdkVersion 15
            targetSdkVersion 23
            versionCode 11
            versionName "2.1"
            renderscriptTargetApi 20
            renderscriptSupportModeEnabled true
            multiDexEnabled true
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
        productFlavors {
        }
        sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/sounds'] } }
    }
    buildscript {
        repositories {
            maven { url 'https://maven.fabric.io/public' }
        }

        dependencies {
            // The Fabric Gradle plugin uses an open ended version to react
            // quickly to Android tooling updates
            classpath 'io.fabric.tools:gradle:1.+'
        }
    }
    apply plugin: 'io.fabric'
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        compile 'com.android.support:appcompat-v7:23.2.0'
        compile 'com.android.support:design:23.1.1'
        compile 'com.android.support:recyclerview-v7:23.2.0'
        compile 'com.android.support:cardview-v7:23.2.0'
        compile 'com.google.android.gms:play-services:8.4.0'
        compile 'com.facebook.rebound:rebound:0.3.8'
        compile 'com.daimajia.swipelayout:library:1.2.0@aar'
        compile 'com.facebook.fresco:fresco:0.10.0'
        compile('io.socket:socket.io-client:0.7.0') {
            exclude group: 'org.json', module: 'json'
        }
        compile 'io.pristine:libjingle:8871@aar'
        compile 'com.squareup:seismic:1.0.2'
        compile 'org.greenrobot:eventbus:3.0.0'
        compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
            transitive = true;
        }
        compile 'com.google.code.gson:gson:2.6.2'
        compile 'com.android.support:multidex:1.0.1'
    }

清单部分:

 <application
        android:name=".ApplicationClass"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".ui.activity.SplashActivity"
            android:launchMode="singleTop"
            android:screenOrientation="portrait"
            android:theme="@style/AppTheme"
            android:windowSoftInputMode="adjustPan">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

也可以提供其他信息,感谢任何帮助

1 个答案:

答案 0 :(得分:1)

它也发生在我身上,我删除 方法并且工作正常,

        try
        {
            Process[] processes = Process.GetProcessesByName("php");
            foreach (var process in processes)
            {
                MessageBox.Show(process.ToString());
                process.Kill();
            }
        }
        catch
        {
            MessageBox.Show("No");
        }