So I'm getting a black screen whenever I try to run my code through android studio
07-06 22:58:42.480 7969-7969/? I/art: Late-enabling -Xcheck:jni
07-06 22:58:42.508 7969-7969/? D/TidaProvider: TidaProvider()
07-06 22:58:42.549 7969-7969/? W/System: ClassLoader referenced unknown path: /data/app/com.example.delma.ins-1/lib/arm64
07-06 22:58:42.551 7969-7969/? W/ResourceType: No package identifier when getting name for resource number 0x00000000
07-06 22:58:42.557 7969-7979/? I/art: Debugger is no longer active
07-06 22:58:42.557 7969-7979/? I/art: Starting a blocking GC Instrumentation
07-06 22:58:42.618 7969-8006/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
07-06 22:58:42.624 7969-8006/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
07-06 22:58:42.628 7969-7969/? D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
07-06 22:58:42.636 7969-7969/? I/FA: App measurement is starting up, version: 11020
07-06 22:58:42.636 7969-7969/? I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
07-06 22:58:42.642 7969-7969/? I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.example.delma.ins
07-06 22:58:42.642 7969-7969/? D/FA: Debug-level message logging enabled
07-06 22:58:42.651 7969-7969/? I/FirebaseInitProvider: FirebaseApp initialization successful
07-06 22:58:42.672 7969-7969/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
07-06 22:58:42.682 7969-7969/? D/AccessibilityManager: current package=com.example.delma.ins, accessibility manager mIsFinalEnabled=false, mOptimizeEnabled=false, mIsUiAutomationEnabled=false, mIsInterestedPackage=false
07-06 22:58:42.775 7969-7969/? I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:6
07-06 22:58:42.775 7969-7969/? I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 6
07-06 22:58:42.782 7969-7969/? W/System: ClassLoader referenced unknown path:
07-06 22:58:42.784 7969-7969/? W/ResourceType: No package identifier when getting name for resource number 0x00000000
07-06 22:58:42.800 7969-7969/? W/ChimeraDebugLogger: Singleton logger instance not set.
07-06 22:58:42.805 7969-7969/? W/System: ClassLoader referenced unknown path: /data/user_de/0/com.google.android.gms/app_chimera/m/00000070/n/arm64-v8a
07-06 22:58:42.818 7969-7969/? W/ResourceType: No package identifier when getting name for resource number 0x00000000
07-06 22:58:42.871 7969-8043/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
07-06 22:58:42.876 7969-7969/? W/ActionBarDrawerToggle: DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true);
07-06 22:58:43.049 7969-7969/? I/Timeline: Timeline: Activity_launch_request time:452779 intent:Intent { flg=0x10008000 cmp=com.example.delma.ins/.LoginActivity }
07-06 22:58:43.509 7969-7969/? I/Timeline: Timeline: Activity_launch_request time:453239 intent:Intent { flg=0x10008000 cmp=com.example.delma.ins/.MainActivity }
07-06 22:58:43.523 7969-8020/? D/FA: Connected to remote service
07-06 22:58:43.604 7969-7969/com.example.delma.ins W/ActionBarDrawerToggle: DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true);
07-06 22:58:43.609 7969-7969/com.example.delma.ins I/Timeline: Timeline: Activity_launch_request time:453339 intent:Intent { flg=0x10008000 cmp=com.example.delma.ins/.LoginActivity }
you have heavy work in the main thread, it will happen to ANR (android not responding), you should check your work, and a black screen is your application theme
Related
Good day,
My application was working for months now, but all of a sudden it is stuck on splash screen, when using both Android Studio and the live App on Google Play. And I haven't done any change to the app of resent.
Please, anyone help?
Below is the logcat debug result. Thank you
04-08 12:55:42.685 5650-5650/? I/art: Not late-enabling -Xcheck:jni (already on)
04-08 12:55:42.818 5650-5650/com.remmy.wisdomnuggets I/MultiDex: VM with version 2.1.0 has multidex support
04-08 12:55:42.819 5650-5650/com.remmy.wisdomnuggets I/MultiDex: Installing application
04-08 12:55:42.819 5650-5650/com.remmy.wisdomnuggets I/MultiDex: VM has multidex support, MultiDex support library is disabled.
04-08 12:55:42.875 5650-5665/com.remmy.wisdomnuggets W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
04-08 12:55:43.172 5650-5672/com.remmy.wisdomnuggets W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
04-08 12:55:43.175 5650-5650/com.remmy.wisdomnuggets D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
04-08 12:55:43.175 5650-5650/com.remmy.wisdomnuggets I/FirebaseInitProvider: FirebaseApp initialization successful
04-08 12:55:43.211 5650-5672/com.remmy.wisdomnuggets I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
04-08 12:55:43.212 5650-5672/com.remmy.wisdomnuggets I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
04-08 12:55:43.223 5650-5650/com.remmy.wisdomnuggets W/com.facebook.UserSettingsManager: Please set a value for AutoLogAppEventsEnabled. Set the flag to TRUE if you want to collect app install, app launch and in-app purchase events automatically. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-android#disable-auto-events.
04-08 12:55:43.223 5650-5650/com.remmy.wisdomnuggets W/com.facebook.UserSettingsManager: You haven't set a value for AdvertiserIDCollectionEnabled. Set the flag to TRUE if you want to collect Advertiser ID for better advertising and analytics results. To request user consent before collecting data, set the flag value to FALSE, then change to TRUE once user consent is received. Learn more: https://developers.facebook.com/docs/app-events/getting-started-app-events-android#disable-auto-events.
04-08 12:55:43.307 5650-5650/com.remmy.wisdomnuggets I/Hash: Generating for fb.....
04-08 12:55:43.310 5650-5650/com.remmy.wisdomnuggets I/Hashkey: WyU474QvS8TLhPp4Dfi/GTzGyOA=
04-08 12:55:43.355 5650-5679/com.remmy.wisdomnuggets I/FA: App measurement is starting up, version: 16250
04-08 12:55:43.355 5650-5679/com.remmy.wisdomnuggets I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
04-08 12:55:43.355 5650-5679/com.remmy.wisdomnuggets I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.remmy.wisdomnuggets
04-08 12:55:43.355 5650-5679/com.remmy.wisdomnuggets D/FA: Debug-level message logging enabled
04-08 12:55:44.748 5650-5650/com.remmy.wisdomnuggets W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
04-08 12:55:44.812 5650-5650/com.remmy.wisdomnuggets I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
04-08 12:55:44.812 5650-5650/com.remmy.wisdomnuggets I/art: Rejecting re-init on previously-failed class java.lang.Class<android.support.v4.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>
04-08 12:55:45.042 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.ManagementUtil.Management: Setting : Working
04-08 12:55:45.042 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.DbQuery: Setting : Working
04-08 12:55:45.042 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.FavouriteQueries: Setting : Working
04-08 12:55:45.042 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.FileQueries: Setting : Working
04-08 12:55:45.043 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.DownloadQueries: Setting : Working
04-08 12:55:45.043 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.Mp3Queries: Setting : Working
04-08 12:55:45.043 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.PurchaseQueries: Setting : Working
04-08 12:55:45.043 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.QueryFactory: Setting : Working
04-08 12:55:45.043 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.DatabaseUtil.QueryRunner: Setting : Working
04-08 12:55:45.058 5650-5650/com.remmy.wisdomnuggets E/JSON: {"functionality":"admob_configuration"}
04-08 12:55:45.060 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.ManagementUtil.Management: Setting : RequestObject{serverUrl='null', requestType='null', photoKeyword='null', perPage='60', page='1', pictureId='null', json='{"functionality":"admob_configuration"}', firstRequest=true, connectionType=UI, connection=ADMOB}
04-08 12:55:45.110 5650-5679/com.remmy.wisdomnuggets I/FA: Tag Manager is not found and thus will not be used
04-08 12:55:45.121 5650-5679/com.remmy.wisdomnuggets D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=Splash, firebase_screen_id(_si)=-9200293164657975561}]
04-08 12:55:45.129 5650-5718/com.remmy.wisdomnuggets D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: true
04-08 12:55:45.913 5650-5718/com.remmy.wisdomnuggets I/OpenGLRenderer: Initialized EGL, version 1.4
04-08 12:55:45.914 5650-5718/com.remmy.wisdomnuggets W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
04-08 12:55:45.942 5650-5718/com.remmy.wisdomnuggets D/EGL_emulation: eglCreateContext: 0xaa9d34c0: maj 2 min 0 rcv 2
04-08 12:55:45.989 5650-5718/com.remmy.wisdomnuggets D/EGL_emulation: eglMakeCurrent: 0xaa9d34c0: ver 2 0 (tinfo 0x9dd59780)
04-08 12:55:46.020 5650-5725/com.remmy.wisdomnuggets W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
04-08 12:55:46.021 5650-5672/com.remmy.wisdomnuggets W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
04-08 12:55:46.021 5650-5672/com.remmy.wisdomnuggets I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
04-08 12:55:46.021 5650-5672/com.remmy.wisdomnuggets I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
04-08 12:55:46.073 5650-5718/com.remmy.wisdomnuggets D/EGL_emulation: eglMakeCurrent: 0xaa9d34c0: ver 2 0 (tinfo 0x9dd59780)
04-08 12:55:46.629 5650-5650/com.remmy.wisdomnuggets I/Choreographer: Skipped 42 frames! The application may be doing too much work on its main thread.
04-08 12:55:49.141 5650-5712/com.remmy.wisdomnuggets E/MK Request 2: POST
04-08 12:55:50.189 5650-5712/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.ConnectionUtil.Connection: Working :
04-08 12:55:50.190 5650-5712/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.ConnectionUtil.Connection: POST 200 http://remmyhazzan.com.ng/wisdomnuggets/books4u_home.php {"functionality":"admob_configuration"}
04-08 12:55:50.197 5650-5650/com.remmy.wisdomnuggets E/com.remmy.wisdomnuggets.ConnectionUtil.ConnectionBuilder: Response =
if you didn't changed anything in your app (an we are talking even about app distributed by Google Play) then clearly there is a problem by server side
there is a chance that some network/server side response is just broken, I see you are requesting for something (RequestObject), but also see serverUrl='null', so app may not be configured properly. Also last words of this log is ConnectionBuilder: Response = and... what is the response?
there is no Exception word in block of text posted in question, so app hangs on splash because of wrong logic in code (maybe not aware of some null parameters)
there is also a chance that you are using 3rd party lib connecting to some services (I see Firebase in logs), which is currently deprecated
without line of code all this is guessing...
PS. learn how to post readable logs...
I'm working on an android app that uses firebase storage. The app basically uses a few gestures out of which one is used to open the camera. The clicked photo is then saved to firebase storage. The app runs fine on my end and the clicked photo gets stored into firebase. But the issue is that one of my friends is working with me on this app and we are using the same gradle and android version and I have given her the owner rights for this project on firebase console, but despite that, the app on her device doesn't store the image on the firebase. In all, the app opens the camera on her device, the photo is clicked and then the app stops. Can anyone suggest a fix that is missing here???
logs:
06-14 21:26:12.868 16911-16911/com.example.arshi.auxilio I/art: Late-enabling -Xcheck:jni
06-14 21:26:13.057 16911-16911/com.example.arshi.auxilio D/FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
06-14 21:26:13.059 16911-16911/com.example.arshi.auxilio D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
06-14 21:26:13.093 16911-16911/com.example.arshi.auxilio I/FirebaseInitProvider: FirebaseApp initialization successful
06-14 21:26:13.199 16911-16954/com.example.arshi.auxilio I/FA: App measurement is starting up, version: 12451
06-14 21:26:13.199 16911-16954/com.example.arshi.auxilio I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
06-14 21:26:13.200 16911-16954/com.example.arshi.auxilio I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.example.arshi.auxilio
06-14 21:26:13.360 16911-16911/com.example.arshi.auxilio D/ContextHelper: convertTheme. context->name=com.example.arshi.auxilio themeResourceId=2131362077
06-14 21:26:13.408 16911-16911/com.example.arshi.auxilio W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
06-14 21:26:13.434 16911-16911/com.example.arshi.auxilio I/PhoneWindow: [generateLayout] setColorNavigationBar => color=0x ff000001
06-14 21:26:13.443 16911-16911/com.example.arshi.auxilio D/PhoneWindowEx: [PWEx][generateLayout] setNavigationBarColor2 : colors=0xff000000
06-14 21:26:13.443 16911-16911/com.example.arshi.auxilio I/PhoneWindow: [setNavigationBarColor2] color=0x ff000000
06-14 21:26:13.537 16911-16911/com.example.arshi.auxilio I/Activity: Activity.onPostResume() called
06-14 21:26:13.537 16911-16954/com.example.arshi.auxilio I/FA: Tag Manager is not found and thus will not be used
06-14 21:26:13.551 16911-16981/com.example.arshi.auxilio D/OpenGLRenderer: Render dirty regions requested: true
06-14 21:26:13.553 16911-16981/com.example.arshi.auxilio I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: ()
OpenGL ES Shader Compiler Version: E031.25.03.00
Build Date: 03/02/15 Mon
Local Branch: LA.BF.1.1.2_RB1-AU017-20150302-1163306-1163307-1163308-1163309
Remote Branch:
Local Patches:
Reconstruct Branch:
06-14 21:26:13.555 16911-16981/com.example.arshi.auxilio I/OpenGLRenderer: Initialized EGL, version 1.4
06-14 21:26:13.572 16911-16981/com.example.arshi.auxilio D/OpenGLRenderer: Enabling debug mode 0
06-14 21:26:13.583 16911-16911/com.example.arshi.auxilio D/Atlas: Validating map...
06-14 21:26:13.623 16911-16911/com.example.arshi.auxilio I/art: Thread[1,tid=16911,WaitingForJniOnLoad,Thread*=0xb4827800,peer=0x759b61f8,"main"] recursive attempt to load library "/system/lib/libhook_jni.so"
06-14 21:26:13.634 16911-16911/com.example.arshi.auxilio E/MediaProfilesEx-JNI: register_com_lge_media_MediaProfilesEx
06-14 21:26:13.634 16911-16911/com.example.arshi.auxilio E/MediaRecorderEx-JNI: register_com_lge_media_MediaRecorderEx
06-14 21:26:13.634 16911-16911/com.example.arshi.auxilio D/AudioSystemEx: register_com_lge_media_LGAudioSystem
06-14 21:26:13.635 16911-16911/com.example.arshi.auxilio E/SurfaceControlEx: register_com_lge_view_SurfaceControlEx
06-14 21:26:13.636 16911-16911/com.example.arshi.auxilio I/art: Thread[1,tid=16911,WaitingForJniOnLoad,Thread*=0xb4827800,peer=0x759b61f8,"main"] recursive attempt to load library "/system/lib/libhook_jni.so"
06-14 21:26:13.636 16911-16911/com.example.arshi.auxilio D/LGMtpDatabaseJNI: register_android_mtp_LGMtpDatabase
06-14 21:26:13.637 16911-16911/com.example.arshi.auxilio I/art: Thread[1,tid=16911,WaitingForJniOnLoad,Thread*=0xb4827800,peer=0x759b61f8,"main"] recursive attempt to load library "/system/lib/libhook_jni.so"
06-14 21:26:13.638 16911-16911/com.example.arshi.auxilio D/LGMtpServerJNI: register_android_mtp_LGMtpServer
06-14 21:26:13.639 16911-16911/com.example.arshi.auxilio I/art: Thread[1,tid=16911,WaitingForJniOnLoad,Thread*=0xb4827800,peer=0x759b61f8,"main"] recursive attempt to load library "/system/lib/libhook_jni.so"
06-14 21:26:13.639 16911-16911/com.example.arshi.auxilio E/MediaPlayerEx-jni: register_com_lge_view_MediaPlayerEx
06-14 21:26:13.640 16911-16911/com.example.arshi.auxilio I/art: Thread[1,tid=16911,WaitingForJniOnLoad,Thread*=0xb4827800,peer=0x759b61f8,"main"] recursive attempt to load library "/system/lib/libhook_jni.so"
[ 06-14 21:26:13.640 16911:16911 D/ ]
register_com_lge_emoji_EmojiUtil
06-14 21:26:13.725 16911-16911/com.example.arshi.auxilio I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy#2d5a4469 time:103121285
This question already has an answer here:
NullPointerException when setting TextView via ButtonClick
(1 answer)
Closed 5 years ago.
I have one activity and a few fragments. My structure looks like this:
Main Activity ->
- Menu 1 Fragment-> Daily Fragment / Weekly Fragment / Monthly Fragment / Annual Fragment
- Menu 2 Fragment -> empty
- Menu 3 Fragment -> empty
All menus are fragments.
Now I want to add values to the database (Cloud Firebase), but I can not call the method (onClick).
I did OnClickListener, and Override onClick (View v). It still does not work. What else do I need?
Daily Fragment:
public class DailyFragment extends Fragment implements
View.OnClickListener{
private static final String QUOTE_KEY = "quote";
private static final String AUTHOR_KEY = "author";
private static final String TAG= "InspiringQuote";
private DocumentReference mDocRef = FirebaseFirestore.getInstance().document("sampleData/inspirations");
#Nullable
#Override
public View onCreateView(LayoutInflater inflater, #Nullable ViewGroup container, #Nullable Bundle savedInstanceState) {
//just change the fragment_weekly
//with the fragment you want to inflate
//like if the class is DailyFragment it should have R.layout.home_fragment
//if it is WeeklyFragment it should have R.layout.fragment_weekly
//return inflater.inflate(R.layout.fragment_daily, null);
View layout = inflater.inflate(R.layout.fragment_daily, container, false);
//Dołączamy do przycisku obiekt nasłuchujący
Button saveButton = (Button)layout.findViewById(R.id.bn_save);
saveButton.setOnClickListener(this);
return layout;
}
#Override
public void onClick(View v){
switch (v.getId()) {
case R.id.bn_save:
saveQuote(v);
break;
}
}
public void saveQuote (View view){
EditText quoteView = (EditText) view.findViewById(R.id.quote);
EditText authorView = (EditText) view.findViewById(R.id.author);
String quoteText = quoteView.getText().toString();
String authorText = authorView.getText().toString();
if (quoteText.isEmpty() || authorText.isEmpty()) { return; }
Map<String, Object> dataToSave = new HashMap<String, Object>();
dataToSave.put(QUOTE_KEY, quoteText);
dataToSave.put(AUTHOR_KEY, quoteText);
mDocRef.set(dataToSave).addOnSuccessListener(new OnSuccessListener<Void>() {
#Override
public void onSuccess(Void aVoid) {
Log.d(TAG, "Dokument został zapisany!");
}
}).addOnFailureListener(new OnFailureListener() {
#Override
public void onFailure(#NonNull Exception e) {
Log.w(TAG, "Błąd, dokument nie został zapisany.", e);
}
});
}}
XML:
<TextView
android:id="#+id/tv_dzienne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/quote"
android:layout_centerHorizontal="true"
android:layout_marginBottom="52dp"
android:text="Dzienne"
android:textAppearance="#style/Base.TextAppearance.AppCompat.Large" />
<EditText
android:id="#+id/quote"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="#+id/bn_save"
android:layout_alignParentStart="true"
android:layout_marginBottom="67dp"
android:ems="10"
android:hint="Podaj wartość"
android:inputType="textCapSentences"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="8dp" />
<EditText
android:id="#+id/author"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_alignTop="#+id/quote"
android:layout_marginTop="51dp"
android:ems="10"
android:hint="Nazwa"
android:inputType="textPersonName"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="8dp" />
<Button
android:id="#+id/bn_save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="8dp"
android:onClick="saveQuote" --> **cannot resolve symbol**
android:text="#string/save_quote" />
02-13 19:09:49.852 11587-11587/? I/zygote: Not late-enabling -Xcheck:jni (already on)
02-13 19:09:49.865 11587-11587/? W/zygote: Unexpected CPU variant for X86 using defaults: x86
02-13 19:09:50.864 11587-11587/? W/zygote: Skipping duplicate class check due to unrecognized classloader
02-13 19:09:50.867 11587-11587/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-13 19:09:50.871 11587-11587/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-13 19:09:50.875 11587-11587/? I/BiChannelGoogleApi: [FirebaseAuth: ] No Fallback module; NOT setting up for lazy initialization
02-13 19:09:50.879 11587-11607/? W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
02-13 19:09:50.892 11587-11610/? I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
02-13 19:09:50.892 11587-11610/? I/DynamiteModule: Selected local version of com.google.android.gms.flags
02-13 19:09:50.894 11587-11607/? I/FirebaseAuth: [FirebaseAuth:] Loading module via FirebaseOptions.
02-13 19:09:50.894 11587-11607/? I/FirebaseAuth: [FirebaseAuth:] Preparing to create service connection to gms implementation
02-13 19:09:50.894 11587-11587/? V/FA: Cancelling job. JobID: -386501406
02-13 19:09:50.895 11587-11587/? V/FA: Registered activity lifecycle callback
02-13 19:09:50.896 11587-11587/? I/FirebaseInitProvider: FirebaseApp initialization successful
02-13 19:09:50.917 11587-11613/? V/FA: Collection enabled
02-13 19:09:50.917 11587-11613/? V/FA: App package, google app id: com.example.xovin.organizerrozwojuosobistego, 1:922322846834:android:d173fbb977e9a87d
02-13 19:09:50.918 11587-11613/? I/FA: App measurement is starting up, version: 11910
02-13 19:09:50.918 11587-11613/? I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
02-13 19:09:50.918 11587-11610/? W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
02-13 19:09:50.919 11587-11613/? I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.example.xovin.organizerrozwojuosobistego
02-13 19:09:50.919 11587-11613/? D/FA: Debug-level message logging enabled
02-13 19:09:50.922 11587-11610/? I/DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:10
02-13 19:09:50.922 11587-11610/? I/DynamiteModule: Selected remote version of com.google.android.gms.crash, version >= 10
02-13 19:09:50.925 11587-11587/? V/FA: onActivityCreated
02-13 19:09:50.974 11587-11610/? W/zygote: Skipping duplicate class check due to unrecognized classloader
02-13 19:09:50.979 11587-11613/? V/FA: Connecting to remote service
02-13 19:09:50.992 11587-11613/? V/FA: Connection attempt already in progress
02-13 19:09:50.995 11587-11610/? I/FirebaseCrashApiImpl: FirebaseCrashApiImpl created by ClassLoader ae[DexPathList[[zip file "/system/priv-app/PrebuiltGmsCore/app_chimera/m/DynamiteModulesC.apk"],nativeLibraryDirectories=[/data/user_de/0/com.google.android.gms/app_chimera/m/00000003/n/x86, /system/lib, /vendor/lib]]]
02-13 19:09:50.995 11587-11610/? I/FirebaseCrash: FirebaseCrash reporting loaded - com.google.android.gms.internal.zzdzk#963bd28
02-13 19:09:51.006 11587-11611/? I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
02-13 19:09:51.006 11587-11611/? I/DynamiteModule: Selected local version of com.google.android.gms.flags
02-13 19:09:51.012 11587-11611/? W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
02-13 19:09:51.042 11587-11611/? I/FirebaseCrashApiImpl: FirebaseCrash reporting API initialized
02-13 19:09:51.042 11587-11611/? I/FirebaseCrash: FirebaseCrash reporting initialized com.google.android.gms.internal.zzdzk#963bd28
02-13 19:09:51.042 11587-11611/? D/FirebaseCrash: Firebase Analytics Listener for Firebase Crash is initialized
02-13 19:09:51.134 11587-11587/? W/linker: "/data/user_de/0/com.google.android.gms/app_extracted_libs/x86/libconscrypt_gmscore_jni.so" unused DT entry: type 0xf arg 0x91
02-13 19:09:51.135 11587-11587/? V/NativeCrypto: Registering com/google/android/gms/org/conscrypt/NativeCrypto's 276 native methods...
02-13 19:09:51.183 11587-11587/? D/NetworkSecurityConfig: No Network Security Config specified, using platform default
02-13 19:09:51.185 11587-11592/? I/zygote: Do partial code cache collection, code=28KB, data=30KB
02-13 19:09:51.185 11587-11587/? I/ProviderInstaller: Installed default security provider GmsCore_OpenSSL
02-13 19:09:51.186 11587-11592/? I/zygote: After code cache collection, code=27KB, data=30KB
02-13 19:09:51.186 11587-11592/? I/zygote: Increasing code cache capacity to 128KB
02-13 19:09:51.223 11587-11613/? V/FA: Connection attempt already in progress
02-13 19:09:51.224 11587-11613/? V/FA: Activity resumed, time: 79702594
02-13 19:09:51.239 11587-11613/? I/FA: Tag Manager is not found and thus will not be used
02-13 19:09:51.241 11587-11613/? D/FA: Logging event (FE): screen_view(_vs), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-3727998583761649633}]
02-13 19:09:51.243 11587-11618/? D/OpenGLRenderer: HWUI GL Pipeline
02-13 19:09:51.274 11587-11613/? V/FA: Connection attempt already in progress
02-13 19:09:51.307 11587-11592/? I/zygote: Do partial code cache collection, code=37KB, data=54KB
02-13 19:09:51.310 11587-11592/? I/zygote: After code cache collection, code=34KB, data=53KB
02-13 19:09:51.310 11587-11592/? I/zygote: Increasing code cache capacity to 256KB
02-13 19:09:51.312 11587-11592/? I/zygote: JIT allocated 71KB for compiled code of void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
02-13 19:09:51.312 11587-11592/? I/zygote: Compiler allocated 4MB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
02-13 19:09:53.367 11587-11618/com.example.xovin.organizerrozwojuosobistego I/OpenGLRenderer: Initialized EGL, version 1.4
02-13 19:09:53.367 11587-11618/com.example.xovin.organizerrozwojuosobistego D/OpenGLRenderer: Swap behavior 1
02-13 19:09:53.367 11587-11618/com.example.xovin.organizerrozwojuosobistego W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
02-13 19:09:53.367 11587-11618/com.example.xovin.organizerrozwojuosobistego D/OpenGLRenderer: Swap behavior 0
02-13 19:09:54.392 11587-11618/com.example.xovin.organizerrozwojuosobistego D/EGL_emulation: eglCreateContext: 0xa2f74f00: maj 2 min 0 rcv 2
02-13 19:09:55.204 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: Do full code cache collection, code=125KB, data=68KB
02-13 19:09:55.223 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: After code cache collection, code=102KB, data=39KB
02-13 19:09:55.400 11587-11618/com.example.xovin.organizerrozwojuosobistego D/EGL_emulation: eglMakeCurrent: 0xa2f74f00: ver 2 0 (tinfo 0x92495230)
02-13 19:09:55.428 11587-11587/com.example.xovin.organizerrozwojuosobistego I/Choreographer: Skipped 249 frames! The application may be doing too much work on its main thread.
02-13 19:09:57.664 11587-11618/com.example.xovin.organizerrozwojuosobistego D/EGL_emulation: eglMakeCurrent: 0xa2f74f00: ver 2 0 (tinfo 0x92495230)
02-13 19:09:59.755 11587-11587/com.example.xovin.organizerrozwojuosobistego I/Choreographer: Skipped 259 frames! The application may be doing too much work on its main thread.
02-13 19:09:59.755 11587-11613/com.example.xovin.organizerrozwojuosobistego D/FA: Connected to remote service
02-13 19:09:59.755 11587-11613/com.example.xovin.organizerrozwojuosobistego V/FA: Processing queued up service tasks: 4
02-13 19:09:59.922 11587-11587/com.example.xovin.organizerrozwojuosobistego W/View: dispatchProvideAutofillStructure(): not laid out, ignoring
02-13 19:09:59.928 11587-11587/com.example.xovin.organizerrozwojuosobistego I/chatty: uid=10089(u0_a89) com.example.xovin.organizerrozwojuosobistego identical 7 lines
02-13 19:09:59.928 11587-11587/com.example.xovin.organizerrozwojuosobistego W/View: dispatchProvideAutofillStructure(): not laid out, ignoring
02-13 19:09:59.935 11587-11587/com.example.xovin.organizerrozwojuosobistego I/AssistStructure: Flattened final assist data: 9104 bytes, containing 1 windows, 44 views
02-13 19:09:59.950 11587-11628/com.example.xovin.organizerrozwojuosobistego I/FirebaseCrash: Sending crashes
02-13 19:10:01.237 11587-11613/com.example.xovin.organizerrozwojuosobistego V/FA: Session started, time: 79712610
02-13 19:10:01.240 11587-11613/com.example.xovin.organizerrozwojuosobistego D/FA: Logging event (FE): session_start(_s), Bundle[{firebase_event_origin(_o)=auto, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-3727998583761649633}]
02-13 19:10:06.267 11587-11613/com.example.xovin.organizerrozwojuosobistego V/FA: Inactivity, disconnecting from the service
02-13 19:10:07.754 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: Do partial code cache collection, code=123KB, data=70KB
02-13 19:10:07.754 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: After code cache collection, code=123KB, data=70KB
02-13 19:10:07.754 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: Increasing code cache capacity to 512KB
02-13 19:10:26.008 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: Do full code cache collection, code=241KB, data=166KB
02-13 19:10:26.008 11587-11592/com.example.xovin.organizerrozwojuosobistego I/zygote: After code cache collection, code=162KB, data=105KB
02-13 19:10:31.670 11587-11587/com.example.xovin.organizerrozwojuosobistego D/AndroidRuntime: Shutting down VM
02-13 19:10:31.671 11587-11587/com.example.xovin.organizerrozwojuosobistego E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.xovin.organizerrozwojuosobistego, PID: 11587
java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference
at com.example.xovin.organizerrozwojuosobistego.DailyFragment.saveQuote(DailyFragment.java:61)
at com.example.xovin.organizerrozwojuosobistego.DailyFragment$1.onClick(DailyFragment.java:48)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24701)
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)
02-13 19:10:31.671 11587-11587/com.example.xovin.organizerrozwojuosobistego E/UncaughtException: java.lang.NullPointerException: Attempt to invoke virtual method 'android.text.Editable android.widget.EditText.getText()' on a null object reference
at com.example.xovin.organizerrozwojuosobistego.DailyFragment.saveQuote(DailyFragment.java:61)
at com.example.xovin.organizerrozwojuosobistego.DailyFragment$1.onClick(DailyFragment.java:48)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24701)
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)
02-13 19:10:31.675 11587-11613/com.example.xovin.organizerrozwojuosobistego D/FA: Logging event (FE): app_exception(_ae), Bundle[{firebase_event_origin(_o)=crash, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-3727998583761649633, timestamp=1518549031673, fatal=1}]
02-13 19:10:31.747 11587-11613/com.example.xovin.organizerrozwojuosobistego V/FA: Connecting to remote service
02-13 19:10:31.749 11587-11613/com.example.xovin.organizerrozwojuosobistego V/FA: Recording user engagement, ms: 40528
02-13 19:10:31.752 11587-11613/com.example.xovin.organizerrozwojuosobistego D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=40528, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-3727998583761649633}]
02-13 19:10:31.766 11587-11613/com.example.xovin.organizerrozwojuosobistego V/FA: Connection attempt already in progress
02-13 19:10:31.902 11587-11638/com.example.xovin.organizerrozwojuosobistego I/FirebaseCrash: Sending crashes
02-13 19:10:32.501 11587-11638/com.example.xovin.organizerrozwojuosobistego I/FirebaseCrash: Response code: 200
02-13 19:10:32.503 11587-11638/com.example.xovin.organizerrozwojuosobistego I/FirebaseCrash: Report sent with crash report id: 1794c89e94000000
Button saveButton = (Button)layout.findViewById(R.id.bn_save);
saveButton.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
// do something when the corky2 is clicked
}
});
try this way since i think when you go to your fragment it changes your view so basically you are not on the right view
I am developing an app using Android Studio.
The problem is that app gets crashed twice within few minutes of running it and besides Application terminated. and normal logs no error is shown in the logcat.
Here's complete logcat:
02/12 22:31:34: Launching app
Cold swapped changes.
$ adb shell am start -n "com.abc.xxx/com.abc.xxx.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 13399 on device micromax-micromax_aq4502-2864004C04884I2
I/art: Late-enabling -Xcheck:jni
W/System: ClassLoader referenced unknown path: /data/app/com.abc.xxx-2/lib/arm
I/InstantRun: Instant Run Runtime started. Android package is com.abc.xxx, real application class is null.
W/System: ClassLoader referenced unknown path: /data/app/com.abc.xxx-2/lib/arm
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/art: Background sticky concurrent mark sweep GC freed 11281(1218KB) AllocSpace objects, 22(696KB) LOS objects, 15% free, 5MB/6MB, paused 13.077ms total 70.659ms
I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
I/DynamiteModule: Selected local version of com.google.android.gms.flags
W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
I/DynamiteModule: Considering local module com.google.android.gms.crash:0 and remote module com.google.android.gms.crash:4
I/DynamiteModule: Selected remote version of com.google.android.gms.crash, version >= 4
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi-v7a
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi
I/FirebaseCrashApiImpl: FirebaseCrashApiImpl created by ClassLoader p[DexPathList[[zip file "/data/data/com.google.android.gms/app_chimera/m/00000012/DynamiteModulesC_GmsCore_prodmnc_hdpi_release.apk"],nativeLibraryDirectories=[/data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi-v7a, /data/user/0/com.google.android.gms/app_chimera/m/00000012/n/armeabi, /vendor/lib, /system/lib]]]
I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
I/DynamiteModule: Selected local version of com.google.android.gms.flags
W/DynamiteModule: Local module descriptor class for com.google.android.gms.crash not found.
I/FA: App measurement is starting up, version: 10084
I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
D/FA: Debug-level message logging enabled
D/FA: AppMeasurement singleton hash: 198168520
V/FA: Collection enabled
V/FA: App package, google app id: com.abc.xxx, 1:987905869088:android:e7f50263e7b8aa58
I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.getsportalapp.sportal
V/FA: Registered activity lifecycle callback
I/FirebaseCrash: FirebaseCrash reporting initialized com.google.android.gms.internal.zzbks#e551d72
I/FirebaseInitProvider: FirebaseApp initialization successful
V/FA: Using measurement service
V/FA: Connecting to remote service
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
I/GAC: Building GoogleApiClient
I/CrashlyticsCore: Initializing Crashlytics 2.3.15.167
V/FA: Connection attempt already in progress
V/FA: Activity resumed, time: 824779068
D/OpenGLRenderer: Use EGL_SWAP_BEHAVIOR_PRESERVED: false
D/signedIn: onAuthStateChanged:signed_in:ShXMXdc5kHUQZWG3lGudJtt2
I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:5
I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 5
I/OpenGLRenderer: Initialized EGL, version 1.4
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
E/RecyclerView: No adapter attached; skipping layout
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
E/RecyclerView: No adapter attached; skipping layout
D/getInvitation: getInvitation: no deep link found.
D/called: again
D/cLat: 2.8418744
D/cLng: 8.7791019
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/PersistentConnection: pc_0 - Using an unspecified index. Consider adding '".indexOn": "g"' at geofire to your security and Firebase Database rules for better performance
W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000010/n/armeabi
D/DynamitePackage: Instantiated singleton DynamitePackage.
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/DynamiteModule: Considering local module com.google.android.gms.piccard.dynamite:0 and remote module com.google.android.gms.piccard.dynamite:12
I/DynamiteModule: Selected remote version of com.google.android.gms.piccard.dynamite, version >= 12
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000010/n/armeabi
W/VideoCapabilities: Unrecognized profile/level 32768/2 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 8 for video/mp4v-es
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
I/Ads: Starting ad request.
I/WebViewFactory: Loading com.google.android.webview version 53.0.2785.124 (code 278512400)
D/diffAnother: -6283000
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/cr_LibraryLoader: Time to load native libraries: 6 ms (timestamps 5738-5744)
I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {611ead6}
I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
I/chromium: [INFO:library_loader_hooks.cc(151)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
W/cr_media: Requires BLUETOOTH permission
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13399
I/DynamiteModule: Considering local module com.google.android.gms.tagmanager:8 and remote module com.google.android.gms.tagmanager:9
I/DynamiteModule: Selected remote version of com.google.android.gms.tagmanager, version >= 9
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/GoogleTagManager: No container asset found in /assets/containers. Checking top level /assets directory for container assets.
W/GoogleTagManager: Tag Manager's event handler WILL NOT be installed (no container loaded)
I/GoogleTagManager: Tag Manager initilization took 213ms
V/FA: Using measurement service
V/FA: Connecting to remote service
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 1
I/Ads: Scheduling ad refresh 45000 milliseconds from now.
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
I/Ads: Ad finished loading.
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13399
I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40-loader.html (0)
D/diffAnother: 1129000
D/DynamitePackage: Instantiating com.google.android.gms.ads.ChimeraAdManagerCreatorImpl
I/Ads: Starting ad request.
D/diffAnother: -6300000
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 13399
I/Ads: Scheduling ad refresh 45000 milliseconds from now.
I/Ads: Ad finished loading.
V/FA: Using measurement service
V/FA: Connecting to remote service
D/FA: Logging event (FE): _e, Bundle[{_o=auto, _et=29568, _sc=MainActivity, _si=-6311178554893906199}]
V/FA: Using measurement service
V/FA: Connection attempt already in progress
V/FA: Activity paused, time: 824808635
D/FA: Connected to remote service
V/FA: Processing queued up service tasks: 2
W/com.facebook.appevents.AppEventsLogger: activateApp events are being logged automatically. There's no need to call activateApp explicitly, this is safe to remove.
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
D/call1: called
D/call2: called
D/call1: called
D/call2: called
D/error1: ERROR1
D/error1: ERROR1
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
V/RenderScript: 0xb8457a88 Launching thread(s), CPUs 4
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
V/FA: Inactivity, disconnecting from the service
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
I/MaliEGL: [Mali]window_type=1, is_framebuffer=0, errnum = 0
I/MaliEGL: [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
I/MaliEGL: [Mali]max_allowed_dequeued_buffers=3
I/Ads: Ad is not visible. Not refreshing ad.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
I/Ads: Ad is not visible. Not refreshing ad.
I/Ads: Scheduling ad refresh 60000 milliseconds from now.
Application terminated.
I tried integrating crashlytics but even it doesn't show any error when the app crashes in this manner.
The question is how will I be able to fix the error if I don't even know what the error is?
Please help me with this.
I think the issue is related to your ad view.
In last line it is showing that ad is not visible.
I'm trying to write a function to increment unread message count in a chatapp(android) using transaction in Firebase.
My database structure looks like:
The member list can in fact contain more than 2 users for a group chat which I intend to expand later.
Currently, messages can be added into the messageList but after adding to the messageList I want to increase the unreadCount for all other user except the sender as well. I realised that I need to make use of Transaction to make it atomic so this is my incrementUnreadCount code.
private static void incrementUnreadCount(String chatRoomId) {
DatabaseReference mDatabaseMemberList = mDatabaseChatRooms.child(chatRoomId).child("memberList");
mDatabaseMemberList.runTransaction(new Transaction.Handler() {
#Override
public Transaction.Result doTransaction(MutableData mutableData) {
Map<String, Map<String, Object>> tempMemberList = (Map<String, Map<String, Object>>) mutableData.getValue();
if (tempMemberList == null) {
return Transaction.abort();
}
for (String key : tempMemberList.keySet()) {
// if it is not a sender node
if (!key.equals(TutUserManager.getCurrentUid())) {
Map<String, Object> tempMap = tempMemberList.get(key);
long tempCount = (long) tempMap.get("unreadCount");
tempCount += 1;
tempMap.put("unreadCount", tempCount);
tempMemberList.put(key, tempMap);
}
}
mutableData.setValue(tempMemberList);
return Transaction.success(mutableData);
}
#Override
public void onComplete(DatabaseError databaseError, boolean b, DataSnapshot dataSnapshot) {
}
});
}
The following code works only when I send the second message. So the value of unreadCount is 1 less than what it is expected to be.
I read the doc and realised that for the null case it is supposed to be:
return Transaction.success(mutableData);
and not:
return Transaction.abort();
as abort() will make server abort the transaction instead of trying to make the transaction again.
I try to change the code above to use return ransaction.success(mutableData); but it causes the app to crash upon calling the function.
Did I miss something ?
This is what I get from the console:
11/14 23:19:25: Launching app
No apk changes detected since last installation, skipping installation of C:\Users\Potcharaphol\AndroidStudioProjects\Tut\app\build\outputs\apk\app-debug.apk
$ adb shell am force-stop com.pchatanan.tut
$ adb shell am start -n "com.pchatanan.tut/com.pchatanan.tut.MainActivities.GetStartedActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.pchatanan.tut.test | com.pchatanan.tut
Connecting to com.pchatanan.tut
E/HAL: load: id=gralloc != hmi->id=gralloc
I/System.out: Sending WAIT chunk
I/art: Debugger is active
I/System.out: Debugger has connected
I/System.out: waiting for debugger to settle...
Connected to the target VM, address: 'localhost:8600', transport: 'socket'
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1339)
I/InstantRun: Instant Run Runtime started. Android package is com.pchatanan.tut, real application class is null.
[ 11-14 23:19:29.241 2931: 2931 E/ ]
process stopped due to unexpected signal 13
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
[ 11-14 23:19:29.819 2931: 2931 E/ ]
process stopped due to unexpected signal 13
I/FA: App measurement is starting up, version: 9877
I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
I/FA: To enable faster debug mode event logging run:
adb shell setprop firebase.analytics.debug-mode com.pchatanan.tut
I/HwCust: Constructor found for class android.app.HwCustAlarmManagerImpl
I/FirebaseInitProvider: FirebaseApp initialization successful
I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
[ 11-14 23:19:30.422 2931: 2931 E/ ]
process stopped due to unexpected signal 13
I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
I/HwSecImmHelper: mSecurityInputMethodService is null
W/ActionBarDrawerToggle: DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true);
I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:4
I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 4
W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000018/n/arm64-v8a
[ 11-14 23:19:31.068 2931: 2931 E/ ]
process stopped due to unexpected signal 13
E/HAL: load: id=gralloc != hmi->id=gralloc
I/OpenGLRenderer: Initialized EGL, version 1.4
I/System: core_booster, getBoosterConfig = false
I/System: core_booster, getBoosterConfig = false
[ 11-14 23:19:33.493 2931: 2931 E/ ]
process stopped due to unexpected signal 13
W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
I/System: core_booster, getBoosterConfig = false
I/System: core_booster, getBoosterConfig = false
[ 11-14 23:19:35.396 2931: 2931 E/ ]
process stopped due to unexpected signal 13
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
W/art: Suspending all threads took: 14.466ms
I/FA: Tag Manager is not found and thus will not be used
I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
I/System: core_booster, getBoosterConfig = false
I/System: core_booster, getBoosterConfig = false
I/HwSecImmHelper: mSecurityInputMethodService is null
I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
E/RecyclerView: No adapter attached; skipping layout
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
E/RecyclerView: No adapter attached; skipping layout
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
I/HwSecImmHelper: mSecurityInputMethodService is null
W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
I/Process: Sending signal. PID: 20588 SIG: 9
Disconnected from the target VM, address: 'localhost:8600', transport: 'socket'
This is what I get from logcat, there seems to be no errors.
[ 11-14 23:21:49.129 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:49.321 21571-21571/com.pchatanan.tut I/System.out: waiting for debugger to settle...
11-14 23:21:49.522 21571-21571/com.pchatanan.tut I/System.out: waiting for debugger to settle...
11-14 23:21:49.723 21571-21571/com.pchatanan.tut I/System.out: waiting for debugger to settle...
[ 11-14 23:21:49.781 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:49.924 21571-21571/com.pchatanan.tut I/System.out: waiting for debugger to settle...
11-14 23:21:50.125 21571-21571/com.pchatanan.tut I/System.out: debugger has settled (1319)
11-14 23:21:50.149 21571-21571/com.pchatanan.tut I/InstantRun: Instant Run Runtime started. Android package is com.pchatanan.tut, real application class is null.
[ 11-14 23:21:50.364 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:50.842 21571-21633/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-14 23:21:50.863 21571-21633/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-14 23:21:50.973 21571-21571/com.pchatanan.tut I/FA: App measurement is starting up, version: 9877
11-14 23:21:50.973 21571-21571/com.pchatanan.tut I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
11-14 23:21:50.980 21571-21571/com.pchatanan.tut I/FA: To enable faster debug mode event logging run:
adb shell setprop firebase.analytics.debug-mode com.pchatanan.tut
[ 11-14 23:21:50.999 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:51.035 21571-21571/com.pchatanan.tut I/HwCust: Constructor found for class android.app.HwCustAlarmManagerImpl
11-14 23:21:51.043 21571-21571/com.pchatanan.tut I/FirebaseInitProvider: FirebaseApp initialization successful
11-14 23:21:51.140 21571-21571/com.pchatanan.tut I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
11-14 23:21:51.216 21571-21571/com.pchatanan.tut W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
11-14 23:21:51.601 21571-21571/com.pchatanan.tut I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
[ 11-14 23:21:51.609 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:51.875 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:21:51.925 21571-21571/com.pchatanan.tut W/ActionBarDrawerToggle: DrawerToggle may not show up because NavigationIcon is not visible. You may need to call actionbar.setDisplayHomeAsUpEnabled(true);
11-14 23:21:52.015 21571-21571/com.pchatanan.tut I/DynamiteModule: Considering local module com.google.android.gms.firebase_database:4 and remote module com.google.android.gms.firebase_database:4
11-14 23:21:52.015 21571-21571/com.pchatanan.tut I/DynamiteModule: Selected remote version of com.google.android.gms.firebase_database, version >= 4
11-14 23:21:52.030 21571-21571/com.pchatanan.tut W/System: ClassLoader referenced unknown path: /data/user/0/com.google.android.gms/app_chimera/m/00000018/n/arm64-v8a
11-14 23:21:52.192 21571-21651/com.pchatanan.tut E/HAL: load: id=gralloc != hmi->id=gralloc
11-14 23:21:52.193 21571-21651/com.pchatanan.tut I/OpenGLRenderer: Initialized EGL, version 1.4
11-14 23:21:52.194 21571-21666/com.pchatanan.tut I/System: core_booster, getBoosterConfig = false
[ 11-14 23:21:52.196 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:54.257 21571-21711/com.pchatanan.tut I/System: core_booster, getBoosterConfig = false
[ 11-14 23:21:54.586 2931: 2931 E/ ]
process stopped due to unexpected signal 13
[ 11-14 23:21:55.208 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:56.193 21571-21571/com.pchatanan.tut W/Settings: Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
11-14 23:21:56.248 21571-21743/com.pchatanan.tut I/System: core_booster, getBoosterConfig = false
11-14 23:21:56.279 21571-21743/com.pchatanan.tut I/System: core_booster, getBoosterConfig = false
[ 11-14 23:21:56.442 2931: 2931 E/ ]
process stopped due to unexpected signal 13
[ 11-14 23:21:57.081 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:21:57.204 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:21:57.206 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:01.561 21571-21633/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
[ 11-14 23:22:01.587 2931: 2931 E/ ]
process stopped due to unexpected signal 13
[ 11-14 23:22:02.195 2931: 2931 E/ ]
process stopped due to unexpected signal 13
[ 11-14 23:22:02.874 2931: 2931 E/ ]
process stopped due to unexpected signal 13
[ 11-14 23:22:03.487 2931: 2931 E/ ]
process stopped due to unexpected signal 13
11-14 23:22:07.605 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:07.720 21571-21641/com.pchatanan.tut I/FA: Tag Manager is not found and thus will not be used
11-14 23:22:07.775 21571-21571/com.pchatanan.tut I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
11-14 23:22:07.985 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:07.985 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:09.062 21571-21942/com.pchatanan.tut I/System: core_booster, getBoosterConfig = false
11-14 23:22:09.141 21571-21942/com.pchatanan.tut I/System: core_booster, getBoosterConfig = false
11-14 23:22:09.354 21571-21571/com.pchatanan.tut I/AppCompatViewInflater: app:theme is now deprecated. Please move to using android:theme instead.
11-14 23:22:09.454 21571-21571/com.pchatanan.tut E/RecyclerView: No adapter attached; skipping layout
11-14 23:22:09.471 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:09.472 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:09.476 21571-21571/com.pchatanan.tut E/RecyclerView: No adapter attached; skipping layout
11-14 23:22:10.246 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:10.308 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:10.309 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:10.313 21571-21571/com.pchatanan.tut I/HwSecImmHelper: mSecurityInputMethodService is null
11-14 23:22:13.747 21571-21571/com.pchatanan.tut I/Process: Sending signal. PID: 21571 SIG: 9
11-14 23:22:13.995 22048-22063/com.pchatanan.tut E/HAL: load: id=gralloc != hmi->id=gralloc
11-14 23:22:14.012 22048-22048/com.pchatanan.tut I/InstantRun: Instant Run Runtime started. Android package is com.pchatanan.tut, real application class is null.
11-14 23:22:14.575 22048-22083/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-14 23:22:14.659 22086-22100/com.pchatanan.tut E/HAL: load: id=gralloc != hmi->id=gralloc
11-14 23:22:14.679 22086-22086/com.pchatanan.tut I/InstantRun: Instant Run Runtime started. Android package is com.pchatanan.tut, real application class is null.
11-14 23:22:15.323 22086-22133/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-14 23:22:15.341 22086-22133/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-14 23:22:15.462 22086-22086/com.pchatanan.tut I/FA: App measurement is starting up, version: 9877
11-14 23:22:15.462 22086-22086/com.pchatanan.tut I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
11-14 23:22:15.471 22086-22086/com.pchatanan.tut I/FA: To enable faster debug mode event logging run:
adb shell setprop firebase.analytics.debug-mode com.pchatanan.tut
11-14 23:22:15.524 22086-22086/com.pchatanan.tut I/HwCust: Constructor found for class android.app.HwCustAlarmManagerImpl
11-14 23:22:15.532 22086-22086/com.pchatanan.tut I/FirebaseInitProvider: FirebaseApp initialization successful
11-14 23:22:25.611 22086-22133/com.pchatanan.tut W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
In stead of iterate through each node in the Transaction thread, I use .addListenerForSingleValueEvent and iterate through each node. Then for the one that needs to be updated, I run the transaction code. This method works fine.
This is illustrated in the following code:
private static void incrementUnreadCount(String chatRoomId) {
final DatabaseReference mDatabaseMemberList = mDatabaseChatRooms.child(chatRoomId).child("memberList");
mDatabaseMemberList.addListenerForSingleValueEvent(new ValueEventListener() {
#Override
public void onDataChange(DataSnapshot dataSnapshot) {
for(DataSnapshot child : dataSnapshot.getChildren()){
if(!child.getKey().equals(TutUserManager.getCurrentUid())){
mDatabaseMemberList.child(child.getKey()).runTransaction(new Transaction.Handler() {
#Override
public Transaction.Result doTransaction(MutableData mutableData) {
Map<String, Object> tempData = (Map<String, Object>) mutableData.getValue();
if(tempData == null){
return Transaction.success(mutableData);
}
long unreadCount = (long) tempData.get("unreadCount");
unreadCount += 1;
tempData.put("unreadCount", unreadCount);
mutableData.setValue(tempData);
return Transaction.success(mutableData);
}
#Override
public void onComplete(DatabaseError databaseError, boolean b, DataSnapshot dataSnapshot) {
}
});
}
}
}
#Override
public void onCancelled(DatabaseError databaseError) {
}
});
}