Android Question Error on startup, incomprehensible log : Unable to start activity

SDFP Studio

Member
Licensed User
Hello,

I don't know if Google has implemented a new app validation system but my app was rejected because it crashes on startup on Pixel 5 / Android 13 (Google Play automatic test)

Here is the error log, which doesn't help me at all, can someone give me a clue?
Thanks :)

Error log:
Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.apps.docs/com.google.android.apps.docs.common.shareitem.UploadMenuActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3676)
  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3813)
  at android.app.servertransaction.LaunchActivityItem.execute (LaunchActivityItem.java:101)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:135)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:95)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:2308)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loopOnce (Looper.java:201)
  at android.os.Looper.loop (Looper.java:288)
  at android.app.ActivityThread.main (ActivityThread.java:7898)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:548)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:936)
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference
  at kym.o (PG:7)
  at dcs.a (PG:8)
  at com.google.android.apps.docs.common.shareitem.UploadMenuActivity.onCreate (PG:43)
  at android.app.Activity.performCreate (Activity.java:8290)
  at android.app.Activity.performCreate (Activity.java:8269)
  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1384)
  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3657)
 

DonManfred

Expert
Licensed User
Longtime User
Not enough information to help.
Upload a small project showing the problem.
 
Upvote 0

SDFP Studio

Member
Licensed User
Hello and thanks for the quick response but it seems complicated to me to isolate a part of the startup code.
My app was accepted until now and without me changing anything in the startup code, it is no longer.
Important thing, I have switched to the latest version Google Play Billing v7.00, can the log indicate a link?
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
At least show the code from the following activity / functions

Do you have an activity called performCreate or UploadMenuActivity?

at com.google.android.apps.docs.common.shareitem.UploadMenuActivity.onCreate
at android.app.Activity.performCreate (Activity.java:8290)
 
Upvote 0

SDFP Studio

Member
Licensed User
The app has been on the store for several years and it was refused for the first time because Google tells me it crashes on startup on Nexus 5. They sent me a screenshot surrounding a button that I display on startup so that the user can leave a review.
Not seeing how this button could be annoying, it has been there for several months, and it works very well for everyone but I still removed it from the screen.
Without this button, my app was accepted.

Here is the code for creating the button, I only made it invisible to solve the problem

B4X:
    Private btAccueilReview As Button
    Private lblAccueilLeaveReview As Label

    Private cdActif As ColorDrawable
    cdActif.Initialize(Theme.CouleurTexte,4dip)
    
    ' Boutons Review / eMail
    btAccueilReview.TextSize = TaillePoliceNormal*2.5
    btAccueilReview.Background = cdActif
    btAccueilReview.color = Colors.Transparent
    btAccueilReview.TextColor = Colors.White
    btAccueilReview.Padding = Array As Int (0,0,0,0)
    btAccueilReview.Typeface = Typeface.MATERIALICONS
    btAccueilReview.text = Chr(0xE560)
    btAccueilReview.Gravity = Gravity.CENTER

    lblAccueilLeaveReview.Text = "Review"
    lblAccueilLeaveReview.TextSize = TaillePoliceSmall
    lblAccueilLeaveReview.TextColor = Colors.White
    lblAccueilLeaveReview.Padding = Array As Int (0,0,0,0)
    lblAccueilLeaveReview.Typeface = Typeface.DEFAULT
    lblAccueilLeaveReview.Gravity = Gravity.TOP + Gravity.CENTER_HORIZONTAL

' Désactivation temporaire
btAccueilReview.Visible = False
lblAccueilLeaveReview.Visible = False
    
    btAccueilReview.SetLayout(MargeG+100dip,(PanelAccueil.height*0.3)+70dip,70dip,50dip)
    lblAccueilLeaveReview.SetLayout(btAccueilReview.left,btAccueilReview.Top+btAccueilReview.height,btAccueilReview.width,30dip)
 
Upvote 0
Top