Java Question class file for android.arch.lifecycle.LifecycleOwner not found

Johan Schoeman

Expert
Licensed User
Longtime User
Have never seen this one and cannot find anything on the forum. Any ideas?

B4X:
Starting step: Compiling Java code.
javac 1.8.0_66
C:\Users\----------2\Documents\Basic 4 Android\AndroidScannerDemo\AndroidScannerDemo\ScanDemoExample\scanlibrary\src\com\scanner\demo\MainActivity.java:24: error: cannot access LifecycleOwner
public class MainActivity extends ActionBarActivity {
       ^
  class file for android.arch.lifecycle.LifecycleOwner not found
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
Picked up _JAVA_OPTIONS: -Xmx512M


Error.

My SDK manager shows that all android.arch.lifecycle.xxxx are up to date (Version 1.1.1)
 

JordiCP

Expert
Licensed User
Longtime User
May be related... it seems that ActionBarActivity is long-ago deprecated and "they" recommend extending AppCompatActivity or directly Activity instead of ActionBarActivity, since both already implement an ActionBar and dependencies are simplified.
 
Top