应用程序一直停在kitkat

问题描述:

我已经在studio中创建了一个简单的android项目。但它不会在kitkat和以下版本中运行。但它适用于棒棒糖+版本。我创建的每个项目都不会在kitkat中运行。当我打开我的活动时,它仅停留在真实设备上,但在模拟器上正常运行。我无法将手机连接到PC。所以我无法在logcat中显示错误。我尝试了很多东西。应用程序一直停在kitkat

摇篮文件:

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 25 
buildToolsVersion "25.0.3" 
defaultConfig { 
    applicationId "com.example.demotoruninpos" 
    minSdkVersion 16 
    targetSdkVersion 25 
    versionCode 1 
    versionName "1.0" 

    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', 
{ 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'com.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support:support-v4:25.3.1' 
testCompile 'junit:junit:4.12' 
} 

清单文件:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.example.demotoruninpos"> 


<application 
    android:allowBackup="true" 
    android:icon="@mipmap/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> 
</application> 

</manifest> 
+0

没有错误日志,没有什么可以做。你的代码在这方面看起来很好。 –

+0

在这里发布你的错误记录@Shuchi – UltimateDevil

+0

@匿名此链接你提到。它完全不同的情况。它的multidex问题。这与这个问题无关。 –

你有瞬间的运行的这个问题是能够在你的Android工作室。你必须做的事情....

File > Setting > Build,Execution,Dev > Instant run > Turn it OFF. 

现在你是好go..Happy作弄

+0

thanku这么多..它的工作。 –