Skip to content

Commit d56c96b

Browse files
authored
fix: release build crash with NoSuchMethodError for getNavInfoLiveData (#536)
1 parent 20117de commit d56c96b

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

android/build.gradle

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ android {
2626

2727
defaultConfig {
2828
minSdk safeExtGet('minSdkVersion', 24)
29+
consumerProguardFiles 'consumer-rules.pro'
2930
}
3031

3132
compileOptions {
@@ -37,12 +38,6 @@ android {
3738
buildConfig true
3839
}
3940

40-
buildTypes {
41-
release {
42-
minifyEnabled true
43-
}
44-
}
45-
4641
lintOptions {
4742
abortOnError false
4843
disable "GradleCompatible"

android/consumer-rules.pro

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# https://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Keep NavInfoReceivingService and its static methods - accessed from Android Auto at runtime
16+
-keep class com.google.android.react.navsdk.NavInfoReceivingService {
17+
public static *;
18+
}

0 commit comments

Comments
 (0)