android - 带有 compileSdkVersion 23 的 APK,无法在带有 APK 22 的 Android 手机中打开主要 Activity

标签 android apk android-6.0-marshmallow

我有一个为目标 sdk 版本 23 构建的应用程序,它在 apk 版本 23 的 android 中安装并运行良好。当我尝试在 apk 22 的手机中安装它时,应用程序没有安装。我认为这可能是一个 gradle 问题。 当我的目标 apk 为 22 时,该应用程序运行良好。但是,后来我不得不根据 android 运行时权限对应用程序进行更改。

这是 gradle 文件的样子:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    defaultConfig {
        applicationId 'io.newfaces'
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 19
        versionName "1.1.1_dev3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    signingConfigs {
        release {
            def console = System.console()
            if (console != null) {
                storeFile file("../newfaces_release.keystore")
                storePassword = new String(console.readPassword("\nKeystore password: "))
                keyAlias "newfaces"
                keyPassword = new String(console.readPassword("\nKey password: "))
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
    }
    productFlavors {
    }
    packagingOptions {
        exclude 'LICENSE.txt'
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile('com.android.support:support-v4:23.2.0') {
        force = true
    }
    compile 'com.google.android.gms:play-services:7.5.0'

    compile 'com.android.support:appcompat-v7:23.2.0'
    compile project(':ParseLoginUI')
    compile project(':viewpagerindicator')
    compile 'com.github.castorflex.smoothprogressbar:library:0.5.2'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
    compile 'de.hdodenhof:circleimageview:1.2.2'
    compile ('org.apmem.tools:layouts:1.9@aar')
    compile('com.crashlytics.sdk.android:crashlytics:2.3.1@aar') {
        transitive = true;
    }

    //Support annotations
    androidTestCompile 'com.android.support:support-annotations:23.2.0'
    //Automated Tests
    androidTestCompile 'com.android.support.test:runner:0.3'
    // Set this dependency to use JUnit 4 rules
    androidTestCompile 'com.android.support.test:rules:0.3'
    // Set this dependency to build and run Espresso tests
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2'


}

这是错误文件的样子:

03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate: Exception while inflating <vector>
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17<vector> tag requires viewportWidth > 0
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.graphics.drawable.VectorDrawableCompat.updateStateFromTypedArray(VectorDrawableCompat.java:535)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.graphics.drawable.VectorDrawableCompat.inflate(VectorDrawableCompat.java:472)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.graphics.drawable.VectorDrawableCompat.createFromXmlInner(VectorDrawableCompat.java:436)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.AppCompatDrawableManager$VdcInflateDelegate.createFromXmlInner(AppCompatDrawableManager.java:829)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:303)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:178)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.Toolbar.<init>(Toolbar.java:254)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.widget.Toolbar.<init>(Toolbar.java:196)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at java.lang.reflect.Constructor.constructNative(Native Method)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.createView(LayoutInflater.java:594)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at io.newfaces.activity.MainActivity.onCreate(MainActivity.java:105)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.Activity.performCreate(Activity.java:5231)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.ActivityThread.access$800(ActivityThread.java:135)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.os.Handler.dispatchMessage(Handler.java:102)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.os.Looper.loop(Looper.java:136)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at android.app.ActivityThread.main(ActivityThread.java:5001)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at java.lang.reflect.Method.invoke(Method.java:515)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
03-23 15:39:32.572 3585-3585/io.newfaces E/VdcInflateDelegate:     at dalvik.system.NativeStart.main(Native Method)
03-23 15:39:32.572 3585-3585/io.newfaces D/AndroidRuntime: Shutting down VM
03-23 15:39:32.572 3585-3585/io.newfaces W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41a74ba8)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime: FATAL EXCEPTION: main
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime: Process: io.newfaces, PID: 3585
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{io.newfaces/io.newfaces.activity.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.v7.widget.Toolbar
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:135)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:136)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5001)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:  Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class android.support.v7.widget.Toolbar
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:620)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at io.newfaces.activity.MainActivity.onCreate(MainActivity.java:105)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5231)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:135) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:136) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5001) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:  Caused by: java.lang.reflect.InvocationTargetException
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Constructor.constructNative(Native Method)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:594)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:745) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at io.newfaces.activity.MainActivity.onCreate(MainActivity.java:105) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5231) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:135) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:136) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5001) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:  Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v19/abc_ic_ab_back_material.xml from drawable resource ID #0x7f020016
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.content.res.Resources.loadDrawable(Resources.java:2096)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.content.res.Resources.getDrawable(Resources.java:700)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.TintResources.superGetDrawable(TintResources.java:48)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.AppCompatDrawableManager.onDrawableLoadedFromResources(AppCompatDrawableManager.java:374)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.TintResources.getDrawable(TintResources.java:44)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:323)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.Toolbar.<init>(Toolbar.java:254)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.Toolbar.<init>(Toolbar.java:196)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Constructor.constructNative(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:594) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:745) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at io.newfaces.activity.MainActivity.onCreate(MainActivity.java:105) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5231) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:135) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:136) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5001) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:  Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.content.res.Resources.loadDrawable(Resources.java:2092)
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.content.res.Resources.getDrawable(Resources.java:700) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.TintResources.superGetDrawable(TintResources.java:48) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.AppCompatDrawableManager.onDrawableLoadedFromResources(AppCompatDrawableManager.java:374) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.TintResources.getDrawable(TintResources.java:44) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:323) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:180) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:173) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.TintTypedArray.getDrawable(TintTypedArray.java:60) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.Toolbar.<init>(Toolbar.java:254) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.widget.Toolbar.<init>(Toolbar.java:196) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Constructor.constructNative(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createView(LayoutInflater.java:594) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.rInflate(LayoutInflater.java:745) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:267) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:129) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at io.newfaces.activity.MainActivity.onCreate(MainActivity.java:105) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Activity.performCreate(Activity.java:5231) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.access$800(ActivityThread.java:135) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:102) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:136) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5001) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invokeNative(Native Method) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Method.java:515) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
03-23 15:39:32.582 3585-3585/io.newfaces E/AndroidRuntime:     at dalvik.system.NativeStart.main(Native Method) 
03-23 15:39:37.507 3585-3890/io.newfaces E/GAv4: Successfully bound to service but never got onServiceConnected callback

最佳答案

将 appCompat 和注释从 23.2.0 更改为 23.0.1 使其工作。 我仍然不确定为什么 23.2.0 不能工作,而它在 android 6 的手机上没有问题。

关于android - 带有 compileSdkVersion 23 的 APK,无法在带有 APK 22 的 Android 手机中打开主要 Activity ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36181410/

相关文章:

java - Android 6.0 发布时应用程序崩溃,包括 Logcat,新开发人员

android - 在计时器后启动 Activity

android - 如何将ImageButton的前景图片设置为空

安卓防止apk

android - PackageInfo.signatures 返回什么?

android - 即使使用 InputStream,如何获得可靠且有效的 APK 文件 list 内容?

android - float 操作按钮android更改图标

安卓棉花糖 : How to avoid Wi-Fi drop if No Internet access

java - 平板电脑可以打电话吗? (电话)

android - PopupWindow 中的 Horizo​​ntalScrollView