Necessity to compile for VERSION_1_8
See original GitHub issueIt might be worth adding to the instructions to use this, the need for adding
+    compileOptions {
+        targetCompatibility JavaVersion.VERSION_1_8
+        sourceCompatibility JavaVersion.VERSION_1_8
+    }
to the gradle files for all the modules that include this. I was getting a fairly cryptic error
code com.android.dx.cf.code.SimException: invalid opcode ba (invokedynamic requires --min-sdk-version >= 26)
that I eventually tracked down to this. Alternatively, I’m not sure how necessary the lambda
expression in BleManager is since without that this restriction might not be required.
Issue Analytics
- State:
 - Created 6 years ago
 - Reactions:1
 - Comments:5 (4 by maintainers)
 
Top Results From Across the Web
How do I compile a .java with support for older versions of Java?
Yes, you can set the version of compiler at compile time. And compile your java code into old versions of java.
Read more >Setting the -source and -target of the Java Compiler
Sometimes when you may need to compile a certain project to a different version than what you are currently using. The javac can...
Read more >javac - Java programming language compiler
DESCRIPTION. The javac tool reads class and interface definitions, written in the Java programming language, and compiles them into bytecode class files. It ......
Read more >Meaning of common message when install a package "There ...
When installing packages, the message There are binary versions available but ... Do you want to install from sources the package which needs...
Read more >Go 1.18 Release Notes - The Go Programming Language
As a result of this change, (possibly incorrect) programs may not compile anymore. The necessary fix is straightforward: fix the program if it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Whaaaaat? No one reads readme?! I’ll rename it to Pleasereadme or Youdbetterreadme 😉
PS. Ok, I’ll put it higher in the TL;DR section.
I think it’s still worth mentioning somewhere in the readme.
I’ve bumped into it on latest Android Studio (3.5.2 on Win10) with fresh project straight from the wizard (though AS install is pretty old, maybe it has default somewhere to not use 1.8, IDK).
Simply adding the library to gradle.build was causing quite cryptic crash:
ClassNotFoundException: Didn't find class "com.test.MainActivity" on path: DexPathListTook a while to discover it was the lib in first place, as it wasn’t crashing on API 28, only few commits later when running on API 26 it started crashing…
Edit: Now I see it’s a last point in readme under
Changes in version 2.0, super easy to miss. It’d really be better if it would be more like “Remember to add”:placed directly under
implementation 'no.nordicsemi.android:ble:2.1.1', as I’m pretty sure no one reads the whole readme 😃