Could not get unknown property 'source' for generate-proto-generateDebugProto of type
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- kotlin
- Domain
- build-system
Research direction
Reproduce the codelab's Proto DataStore setup from the linked step using Gradle 8.11.1 and the Kotlin Gradle plugin. Inspect the app build.gradle and project-level build.gradle entries shown in the issue, then verify that Gradle sync and the proto generation task complete without the reported errors.
Written by the indexing model from the issue text.
Description
These are 2 errors that I've faced on Working with Proto DataStore:
Could not get unknown property 'source' for generate-proto-generateDebugProto of type
and
error: Unresolved reference: protoc
On gradle-8.11.1 and kotlin-gradle.
Here is the resolve:
In build.gradle instead of previous protobuf version:
protobuf {
protoc {
//the version here should be the same as what you have in your app build.gradle
artifact = "com.google.protobuf:protoc:3.18.0"
}
generateProtoTasks {
all().configureEach {
builtins {
create("java") {
option("lite")
}
}
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
And in build.gradle project level:
plugins {
//...
id("com.google.protobuf") version "0.9.5" apply false
}
The rest remains the same.
- Dominant language
- Kotlin
- Stars
- 240
- Forks
- 113
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/codelab-android-datastore
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
android/codelab-android-datastore#83 · 1 comment · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 1/5 Under an hour Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
android/codelab-android-datastore#76 · 5 comments ·
All issues in android/codelab-android-datastore
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
helsemelding-json-schema json-schema-core
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
contributor: external needs review
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100