question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected indendation is reporting non-existent issues (Android project)

See original GitHub issue

Lint error > src/main/java/com/MyClass.kt:24:9: Unexpected indentation (expected 4, actual 8)

// Class names obfuscated
class MyClass internal constructor(
        private val sharedPreferences: SharedPreferences // there are 8 spaces here
) : IMyClass {

The 8 spaces are required for continuation indents by the Android Kotlin Style Guide.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
MyDogTomcommented, Mar 16, 2018

@autonomousapps Please take a look at my setup for Kotlin plugin. Pay attention that “use continuation indent” is checked only for: “Method call arguments”, “Chained method calls” and “expression body functions”. @jeremymailen continuation indent for android is still 8, not 4. (source)

screen shot 2018-03-16 at 09 10 05

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conflict with Android Studio: Unexpected indentation (x) ...
Observed Behavior. Multiple violations reported by ktlint, even after reformatting the whole project from Android Studio. It seems that ktlint ...
Read more >
What should I do with "Unexpected indent" in Python?
The issue I'm describing is caused by the Sublime Text editor. The same issue could be caused by other editors as well. Essentially,...
Read more >
How do i resolve the unexpected indent error in python
Whenever you have a situation with code inside of a statement, that inside code must be indented, and must be indented consistently.
Read more >
Android Studio 2021.2.1 Closed Issues
Record video: Unexpected error while copying video recording from device: Remote object doesn't exist! Memory. Optimize the slowdown to the app ...
Read more >
Blog - Apache Cordova
This patch release fixes some bugs on Android, including an issue with the "backbutton" event reported by some users.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found