Compatibility Issues from Pie to Nougat and Oreo

北城以北 提交于 2020-02-06 07:51:05

问题


I created an app initially using Pie sdk And it worked on Pie devices Now I want it to run on Nougat and Oreo as well How to do it I am attaching the log as well as the app level Gradle after changing the sdk version to 26

APP LEVEL GRADLE

apply plugin: 'com.android.application'

apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.divyateja.waviour"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.firebase:firebase-core:16.0.4'
    implementation 'com.google.firebase:firebase-database:16.0.3'
    implementation 'com.google.firebase:firebase-auth:16.0.4'
    implementation 'com.google.firebase:firebase-firestore:17.1.1'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:design:26.1.0'
}

repositories {
    mavenCentral()
}

MANIFEST

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.divyateja.waviour">

    <!-- Permissions -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        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">
        <uses-library
            android:name="org.apache.http.legacy"
            android:required="false" />

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />

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

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

        <meta-data
            android:name="preloaded_fonts"
            android:resource="@array/preloaded_fonts" />

        <activity
            android:name=".MapsActivity"
            android:label="@string/title_activity_maps"></activity>
    </application>

</manifest>

Log when changing the sdk version to 26 in APP LEVEL GRADLE and running

018-10-13 12:23:58.974 2133-3528/? E/NetworkScheduler: Invalid component specified.
2018-10-13 12:23:59.026 2133-3540/? E/NetworkScheduler: Invalid component specified.
2018-10-13 12:23:59.132 2176-2725/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded
2018-10-13 12:24:00.793 1648-1755/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).
2018-10-13 12:24:00.957 2176-2628/? E/ContentStoreEUAS: Failed to commit the deferred actions
2018-10-13 12:24:01.505 1648-1665/? E/memtrack: Couldn't load memtrack module
2018-10-13 12:24:02.011 1402-2340/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property
2018-10-13 12:24:02.072 4054-4090/com.divyateja.waviour E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
2018-10-13 12:24:02.072 4054-4090/com.divyateja.waviour E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
2018-10-13 12:24:02.072 4054-4090/com.divyateja.waviour E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
2018-10-13 12:24:02.072 4054-4090/com.divyateja.waviour E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
2018-10-13 12:24:02.122 4054-4054/com.divyateja.waviour E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.divyateja.waviour, PID: 4054
    java.lang.RuntimeException: Canvas: trying to draw too large(219469824bytes) bitmap.
        at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:229)
        at android.view.RecordingCanvas.drawBitmap(RecordingCanvas.java:97)
        at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:529)
        at android.view.View.getDrawableRenderNode(View.java:19381)
        at android.view.View.drawBackground(View.java:19317)
        at android.view.View.draw(View.java:19114)
        at android.view.View.updateDisplayListIfDirty(View.java:18073)
        at android.view.View.draw(View.java:18851)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
        at android.view.View.updateDisplayListIfDirty(View.java:18064)
        at android.view.View.draw(View.java:18851)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
        at android.view.View.updateDisplayListIfDirty(View.java:18064)
        at android.view.View.draw(View.java:18851)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
        at android.view.View.updateDisplayListIfDirty(View.java:18064)
        at android.view.View.draw(View.java:18851)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
        at android.view.View.updateDisplayListIfDirty(View.java:18064)
        at android.view.View.draw(View.java:18851)
        at android.view.ViewGroup.drawChild(ViewGroup.java:4214)
        at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4000)
        at android.view.View.draw(View.java:19126)
        at com.android.internal.policy.DecorView.draw(DecorView.java:785)
        at android.view.View.updateDisplayListIfDirty(View.java:18073)
        at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:643)
        at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:649)
        at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:757)
        at android.view.ViewRootImpl.draw(ViewRootImpl.java:2980)
        at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2794)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2347)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1386)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6733)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
        at android.view.Choreographer.doFrame(Choreographer.java:658)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6541)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
2018-10-13 12:24:02.179 1648-3969/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
2018-10-13 12:24:02.180 1648-3969/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008cdf
2018-10-13 12:24:02.181 1648-3969/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
2018-10-13 12:24:02.181 1648-3969/? E/eglCodecCommon: glUtilsParamSize: unknow param 0x00008824
2018-10-13 12:24:02.218 2133-3528/? E/NetworkScheduler: Invalid component specified.
2018-10-13 12:24:02.269 2133-4030/? E/NetworkScheduler: Invalid component specified.
2018-10-13 12:24:02.872 2176-2725/? E/ActivityThread: Failed to find provider info for com.google.android.apps.gsa.testing.ui.audio.recorded

回答1:


After lots of research I just had to decrease the size of some images



来源:https://stackoverflow.com/questions/52790348/compatibility-issues-from-pie-to-nougat-and-oreo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!