Status Update
Comments
ch...@gmail.com <ch...@gmail.com> #2
Fix (pending) is I2c2dc7b600603ee430fd0d91b23d52ea8aa29ca9.
sg...@google.com <sg...@google.com> #3
ch...@gmail.com <ch...@gmail.com> #4
#sdkmanager --package_file=${PATH_WORKSPACE}/packages
while read p; do echo "y" | sdkmanager "${p}"; done <${PATH_WORKSPACE}/packages
ch...@gmail.com <ch...@gmail.com> #5
ch...@gmail.com <ch...@gmail.com> #6
sg...@google.com <sg...@google.com>
ch...@google.com <ch...@google.com> #7
ap...@google.com <ap...@google.com> #9
ap...@google.com <ap...@google.com> #10
```
(15:58:11) C02W513SHTD8:files aso$ /opt/android-sdk-macosx/tools/bin/sdkmanager --version
26.1.1
(15:58:17) C02W513SHTD8:files aso$ /opt/android-sdk-macosx/tools/bin/sdkmanager --install --package_file=package_file
Warning: Unknown argument --package_file=package_file
```
ap...@google.com <ap...@google.com> #11
ap...@google.com <ap...@google.com> #12
ap...@google.com <ap...@google.com> #13
ap...@google.com <ap...@google.com> #14
ap...@google.com <ap...@google.com> #15
ch...@gmail.com <ch...@gmail.com> #16
Has anyone re-tried it?
We switched back to RUN sdkmanager --package_file=$ANDROID_HOME/packages.txt
in our Dockerfile back in March of 2021.
ch...@google.com <ch...@google.com> #17
For what it's worth, I did a quick test with the latest CLI: 11076708 (
./sdkmanager --sdk_root="../sdk" --package_file=deps.txt
Deps.txt:
platform-tools
extras;google;instantapps
build-tools;35.0.0-rc3
So perhaps this is now resolved? I haven't tried it with more packages
an...@google.com <an...@google.com> #18
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Iguana | 2023.2.1 Beta 1
- Android Gradle Plugin 8.3.0-beta01
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
an...@google.com <an...@google.com> #19
The fixes for this issue are now also available in:
- Android Studio Hedgehog | 2023.1.1 Patch 1
- Android Gradle Plugin 8.2.1
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Description
Problem and Stack Trace
If I subclass LinearLayoutManager and run it thru R8, I get an exception when I run my app.
12-03 14:53:28.210 7267 7267 I System.out: ----------- [BusinessListActivity 1] [DEBUG] line: 1 buildContent() exited successfully.
12-03 14:53:28.210 7267 7267 I System.out: ----------- [BusinessListActivity 1] [DEBUG] line: 1 onCreate() exited successfully
Point of Breakage
12-03 14:53:28.221 7267 7336 W Parcel : Expecting binder but got null!
12-03 14:53:28.222 1946 4862 D CompatibilityChangeReporter: Compat change id reported: 168419799; UID 10429; state: DISABLED
12-03 14:53:28.222 1946 4862 D CompatibilityChangeReporter: Compat change id reported: 273564678; UID 10429; state: DISABLED
12-03 14:53:28.227 1946 4862 D CoreBackPreview: Window{10efe5a u0 com.spillikinaerospace.ourhangoutsapp/com.spillikinaerospace.ourhangoutsapp.ui.businesslistactivity.BusinessListActivity}: Setting back callback OnBackInvokedCallbackInfo{mCallback=android.window.IOnBackInvokedCallback$Stub$Proxy@f88d68, mPriority=0, mIsAnimationCallback=false}
12-03 14:53:28.228 7267 7267 D AndroidRuntime: Shutting down VM
12-03 14:53:28.228 7267 7267 E AndroidRuntime: FATAL EXCEPTION: main
12-03 14:53:28.228 7267 7267 E AndroidRuntime: Process: com.spillikinaerospace.ourhangoutsapp, PID: 7267
12-03 14:53:28.228 7267 7267 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void androidx.recyclerview.widget.RecyclerView.n(int, int)' on a null object reference
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView$m.onMeasure(Unknown Source:2)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at androidx.recyclerview.widget.RecyclerView.onMeasure(Unknown Source:29)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:1031)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at androidx.appcompat.widget.ContentFrameLayout.onMeasure(Unknown Source:159)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1608)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.measureVertical(LinearLayout.java:878)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7008)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at com.android.internal.policy.DecorView.onMeasure(DecorView.java:750)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.View.measure(View.java:27122)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:4182)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2759)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3086)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2465)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9305)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1339)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1348)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:952)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:882)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1322)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:958)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:205)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.os.Looper.loop(Looper.java:294)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:8177)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
12-03 14:53:28.228 7267 7267 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
12-03 14:53:28.230 1946 7663 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
12-03 14:53:28.231 1946 4862 W ActivityTaskManager: Force finishing activity com.spillikinaerospace.ourhangoutsapp/.ui.businesslistactivity.BusinessListActivity
------------------------------------------------------
Experiments.
1. Minimal subclass to demonstrate issue.
I created this minimal subclass which causes the app to crash when the activity that uses it is run.
When I remove the single method and keep only the constructors, the app runs just fine. If I add the method back in, the app crashes. I do not even need to call the method. (I'm thinking the JVM is doing some sort of optimization when it only sees constructors in the subclass.)
class SAOverscrollLLManagerTest : LinearLayoutManager {
constructor (context: Context) : super(context) {
}
constructor (context: Context, attributeSet: AttributeSet, int1: Int, int2: Int) :
super(context, attributeSet, int1, int2) {
}
constructor (context: Context, int: Int, boolean: Boolean) :
super(context, int, boolean) {
}
// Comment out this method and the app does not crash.
fun setRecyclerView(recyclerView: RecyclerView) {
// use this setting to improve performance if changes in content do not change
// layout size of RecyclerView
recyclerView.setHasFixedSize(true)
recyclerView.layoutManager = this
// recyclerView.overScrollMode = View.OVER_SCROLL_ALWAYS
// recyclerView.edgeEffectFactory = BounceEdgeEffectFactory()
}
}
2. R8 Keep settings
2.1 I tried this. App crashed under above conditions (subclass LinearLayoutManager)
Keep my app
-keep class com.spillikinaerospace.** { *; }
Keep RecyclerView (turned out not to be the issue)
-keep class androidx.recyclerview.widget.LinearLayoutManager { *; }
-keep class androidx.recyclerview.widget.GridLayoutManager { *; }
-keep class androidx.recyclerview.widget.RecyclerView { *; }
2.2 I tried this. App crashed under above conditions (subclass LinearLayoutManager)
Keep everything!
-keep class ** { *; }
------------------------------------------------------
Configuration Details.
1. proguard-rules.pro
In additino to Keep, I have these warning suppressions.
See
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE
2. build.gradle Module
defaultConfig {
applicationId "com.spillikinaerospace.ourhangoutsapp"
minSdkVersion 33
targetSdkVersion 34
...
}
release {
debuggable false
shrinkResources false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
3. gradle.properties
Generate as many Keeps as I can.
android.enableR8.fullMode=false
4. build.gradle Project
ext.kotlin_version = '1.8.20'
dependencies {
classpath 'com.android.tools.build:gradle:8.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.10"
...
}
------------------------------------------------------
Android Studio Version
Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.5
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
ide.text.editor.with.preview.show.floating.toolbar=false