为什么我的应用程序立即关闭?

时间:2019-12-07 00:04:36

标签: java android compiler-errors

我的应用程序运行顺利。我只是添加了一个xml文件来更改主屏幕颜色。当我按下该应用程序时立即关闭。当我删除该xml文件并再次运行该应用程序时,发生了同样的事情。以前是水平应用程序。我正在将应用程序垂直放置。我的应用程序的垂直版本正在运行。我刚刚在android:background =“ @ drawable / samecolorr.xml” xml文件中添加了android:background =“ @ drawable / back” 。即使我回来了,它再次停止工作,我的应用程序立即关闭,我要做的就是添加xml文件。     这是我的代码:     manifest.xml          

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <uses-permission android:name="com.android.vending.BILLING" />

    <application android:largeHeap="true"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <meta-data android:name="com.google.android.gms.games.APP_ID"
            android:value="@string/app_id" />
        <activity android:name=".MainActivity"/>
        <activity android:name=".AnaSayfaActivity"/>

        <activity android:name=".SplashActivity">

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

        <activity
            android:name="com.google.android.gms.ads.AdActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
            android:theme="@android:style/Theme.Translucent" />

    </application>

</manifest>

   main screen xml

      <?xml version="1.0" encoding="utf-8"?>
      <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context="com.ugur.bilgiyarismasi.AnaSayfaActivity"
    android:orientation="vertical">

    <ImageView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/back
        />
    </RelativeLayout>

我刚刚将android:background =“ @ drawable / back”添加到了android:background =“ @ drawable / samecolorr.xml” xml文件中。即使我回来了,它又停止工作,我的应用程序立即关闭

0 个答案:

没有答案
相关问题