Сбой приложения на Android версии 9 - PullRequest
0 голосов
/ 18 октября 2018

При нажатии на кнопку происходит сбой приложения и при этом отсутствует текст для редактирования.

Logcats:

E/FA: Task exception on worker thread: java.lang.IllegalArgumentException: Given String is empty or null: com.google.android.gms.measurement.internal.zzcs.zza(Unknown Source:83)
    E/AndroidRuntime: FATAL EXCEPTION: main
        Process: ai.gramboard.app, PID: 10425
        java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
            at android.graphics.Canvas.checkValidClipOp(Canvas.java:779)
            at android.graphics.Canvas.clipPath(Canvas.java:1007)
            at co.lujun.androidtagview.TagView.drawRipple(TagView.java:375)
            at co.lujun.androidtagview.TagView.onDraw(TagView.java:214)
            at android.view.View.draw(View.java:20366)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.widget.ScrollView.draw(ScrollView.java:1757)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.support.v4.view.ViewPager.draw(ViewPager.java:2426)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1246)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at com.android.internal.policy.DecorView.draw(DecorView.java:781)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:690)
            at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:696)
            at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:805)
            at android.view.ViewRootImpl.draw(ViewRootImpl.java:3515)
            at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3312)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2681)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1633)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7786)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1004)
            at android.view.Choreographer.doCallbacks(Choreographer.java:816)
            at android.view.Choreographer.doFrame(Choreographer.java:751)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:990)
            at android.os.Handler.handleCallback(Handler.java:873)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:193)
            at android.app.ActivityThread.main(ActivityThread.java:6863)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
    D/FA: Logging event (FE): view_item, Bundle[{item_name=TargetFragment, firebase_event_origin(_o)=app, firebase_screen_class(_sc)=ViewCampaignActivity, firebase_screen_id(_si)=3204139031014835775, item_category=screen}]
    E/AndroidRuntime: FATAL EXCEPTION: main
        Process: ai.gramboard.app, PID: 10425
        java.lang.IllegalArgumentException: Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed
            at android.graphics.Canvas.checkValidClipOp(Canvas.java:779)
            at android.graphics.Canvas.clipPath(Canvas.java:1007)
            at co.lujun.androidtagview.TagView.drawRipple(TagView.java:375)
            at co.lujun.androidtagview.TagView.onDraw(TagView.java:214)
            at android.view.View.draw(View.java:20366)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.widget.ScrollView.draw(ScrollView.java:1757)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.support.v4.view.ViewPager.draw(ViewPager.java:2426)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.support.design.widget.CoordinatorLayout.drawChild(CoordinatorLayout.java:1246)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.updateDisplayListIfDirty(View.java:19232)
            at android.view.View.draw(View.java:20094)
            at android.view.ViewGroup.drawChild(ViewGroup.java:4337)
            at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4116)
            at android.view.View.draw(View.java:20369)
            at com.android.internal.policy.DecorView.draw(DecorView.java:781)
            at android.view.View.updateDisplayListIfDirty(View.java:19241)
            at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:690)
            at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:696)
            at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:805)
    E/AndroidRuntime:     at android.view.ViewRootImpl.draw(ViewRootImpl.java:3515)
            at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3312)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2681)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1633)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7786)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1004)
            at android.view.Choreographer.doCallbacks(Choreographer.java:816)
            at android.view.Choreographer.doFrame(Choreographer.java:751)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:990)
            at android.os.Handler.handleCallback(Handler.java:873)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:193)
            at android.app.ActivityThread.main(ActivityThread.java:6863)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

EDIT

Файл Gradle:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "ai.gramboard.app"
        minSdkVersion 18
        targetSdkVersion 28
        versionCode 6
        versionName "1.5"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        packagingOptions {
            exclude 'org/apache/commons/codec/language/bm/gen_approx_hungarian.txt'
        }
    }


    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-v4:28.0.0-rc02'
    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.android.volley:volley:1.1.0'
    implementation 'com.android.support:support-v13:28.0.0-rc02'
    implementation 'com.android.support:design:28.0.0-rc02'
    implementation 'com.android.support:recyclerview-v7:28.0.0-rc02'
    implementation 'com.android.support:cardview-v7:28.0.0-rc02'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.inthecheesefactory.thecheeselibrary:adjustable-imageview:1.0.0'
    implementation 'com.github.Cutta:TagView:1.3'
    implementation 'co.lujun:androidtagview:1.1.4'
    implementation 'com.robertlevonyan.view:MaterialChipView:1.2.4'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'net.gotev:uploadservice:3.4.2'
    implementation files('libs/commons-codec-1.11.jar')
    implementation 'com.google.firebase:firebase-core:16.0.4'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
    implementation 'com.google.android.gms:play-services-analytics:16.0.4'
}

Ответы [ 2 ]

0 голосов
/ 18 октября 2018

Кажется, вы используете библиотеку AndroidTagView, которая, вероятно, не обновляется для Android P.

Реальная проблема описана здесь - https://stackoverflow.com/a/50247323, поэтому вы можете связаться с автором, чтобы обновитьбиблиотека, или используйте альтернативное решение.

0 голосов
/ 18 октября 2018
  1. попробуйте обновить

    implementation"com.google.android.gms:play-services-gcm:16.0.0"
    

    до последней версии 16.0.0.

  2. убедитесь, что вы не смешиваете версии в своемgradle

  3. используйте implementation вместо compile

  4. и убедитесь, что вы не используете deprecated методы.Android Studio выделит его, заменив его новой функцией.

  5. , в вашем случае вы используете устаревшую библиотеку AndroidTagView , поэтому вам нужно заменить эту библиотеку, подождите, пока оничтобы обновить его, ИЛИ раскрутить собственную версию и заменить устаревшие методы. Или попробуйте другую библиотеку, подобную этой library
...