Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

How to indicate JAVA_HOME variable [error]



Watch video tutorial or check the written tutorial below the video.


1. Navigate to C:/Program Files/Java
Look for any JDK folders and find the last version if you don't have any of them then Download and install from Java official website HERE

2. On your Desktop, right-click on My Computer and open Properties
From the left side choose Advanced system settings

3. At the bottom of the window, press the Environment variables button.
Now we got to add the variable in the both: User and System variable

[Solved] java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity

Recently Android SDK released a new update, and when you create a new application it automaticaly imports a library named Appcompat, when you try to compile and run the App you get this error in LogCat

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.txt2lrn.www/com.txt2lrn.www.LandingActivity}:
 java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
 at android.app.ActivityThread.access$1500(ActivityThread.java:117)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:130)
 at android.app.ActivityThread.main(ActivityThread.java:3687)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:507)