Operating system: Mac OS X
13.2.1 22D68
CPU: arm64
12 CPUs
GPU: UNKNOWN
Crash reason: EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
Crash address: 0x202922776f646e51
Process uptime: 6125 seconds
Thread 0 (crashed)
0 libc++.1.dylib + 0x1f40c
Run Code Online (Sandbox Code Playgroud)
Android 模拟器(不是我的应用程序)在 M2 芯片上随机崩溃,并出现上述错误,无论是颤动应用程序还是本机应用程序。
我试过
这也没有帮助OSX:Android 模拟器崩溃
使用 M1 芯片的其他开发人员没有出现此问题,但我不确定是否相关。
完整的崩溃日志:https://mclo.gs/7Dx06Ym(很长)
我在用着
macOS Ventura 13.2.1 (22D68)
Android Studio Flamingo | 2022.2.1
Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
Runtime …Run Code Online (Sandbox Code Playgroud) 我是约束布局的新手。
我在滚动视图中有约束布局。当我设计屏幕底部时(所以我看不到屏幕顶部),每次更改(移动图像视图)时,滚动视图都会滚动到顶部。
所以我回到屏幕底部继续一次又一次的设计。
也许工作室渲染视图并重置,但这会使设计变得困难。
这是视频:https : //www.youtube.com/watch?v=9zZQBqPmMew&feature=youtu.be
我必须将 SVG 图像保留在背景中并将文本保留在顶部。当我保留 Flutter_SVG 包中的 SVG 图像时,出现了这样的错误。
I/flutter (24437): Unsupported operation: Could not resolve image href: Component%206%20-%201-image.png
Picture provider: ExactAssetPicture(name: "assets/images/login_header.svg", bundle: null,
I/flutter (24437): colorFilter: ColorFilter.mode(MaterialColor(primary value: Color(0xfff44336)), BlendMode.srcIn))
I/flutter (24437): Picture key: AssetBundlePictureKey(bundle: PlatformAssetBundle#32e52(), name:
I/flutter (24437): "assets/images/xxx.svg", colorFilter: ColorFilter.mode(MaterialColor(primary value:
I/flutter (24437): Color(0xfff44336)), BlendMode.srcIn))
Run Code Online (Sandbox Code Playgroud) 我正在使用 Firebase Crashlytics 来捕获我的 ndk 崩溃,我遵循了本教程,因此使用完全相同的设置。https://firebase.google.com/docs/crashlytics/ndk-reports
implementation 'com.google.firebase:firebase-crashlytics-ndk:17.0.0'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
Run Code Online (Sandbox Code Playgroud)
和
firebaseCrashlytics {
nativeSymbolUploadEnabled true
strippedNativeLibsDir "build/intermediates/stripped_native_libs/path/out/lib"
unstrippedNativeLibsDir "build/intermediates/unstripped_native_libs/path/out/lib"
}
Run Code Online (Sandbox Code Playgroud)
因为它是堆错误我试过
org.gradle.jvmargs=-Xmx14096m
dexOptions.with {
javaMaxHeapSize = "14g"
}
Run Code Online (Sandbox Code Playgroud)
当我运行 uploadCrashlyticsSymbolFileMyAppName
脚本失败于 app:generateCrashlyticsSymbolFileMyAppDebug
我未剥离和剥离的库超过 80mb,我确定这就是原因。
完整的堆栈跟踪
* What went wrong:
Execution failed for task ':app:generateCrashlyticsSymbolFileMyAppName'.
> Java heap space
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:generateCrashlyticsSymbolFileMyAppName'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:205) …Run Code Online (Sandbox Code Playgroud) 我有这些课程.
public class Flight {
public List<FlightOffer> flightOffers;
}
public class Hotel<T> {
public List<HotelOffer> hotelOffers;
public T address
}
public class FlightOffer extends BaseOffer{
}
public class HotelOffer extends BaseOffer{
}
public class BaseOffer{
public String id;
}
Run Code Online (Sandbox Code Playgroud)
flightOffers和hotelOffers返回一个列表.
Flight flightObject = new Flight();
flightObject.flightOffers.add(new BaseOffer()); // not working
//(add (FlightOffer) List cannot be applied to (BaseOffer))
Hotel hotelObject = new Hotel<String>();
hotelObject.hotelOffers.add(new BaseOffer()); // working
Run Code Online (Sandbox Code Playgroud)
但如果我转换Flight为Flight<T>它的工作,为什么?
我正在尝试将子模块导入到我的项目中,但它总是给出该错误。
Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve project :sanservicelibrary.
Open File
Show Details
Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve project :sanservicelibrary.
Open File
Show Details
Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve project :sanservicelibrary.
Open File
Show Details
Unable to resolve dependency for ':app@release/compileClasspath': Could not resolve project :sanservicelibrary.
Open File
Show Details
Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not resolve project :sanservicelibrary.
Open File
Show Details
Run Code Online (Sandbox Code Playgroud)
这些没有帮助
无法解析“:app@debugUnitTest/compileClasspath”、:app@debugAndroidTest/compileClasspath 的依赖关系 …
我只是试图与约束布局进行这种对齐,但我不确定这是否可能。
我该怎么做 ?
示例 xml
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
android:layout_width="match_parent"
android:layout_height="320dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/com_facebook_profile_picture_blank_portrait" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
app:srcCompat="@android:color/holo_green_light" />
Run Code Online (Sandbox Code Playgroud)
我的解决方法。
我正在尝试使用此github 存储库发布一个空的 jitpack 库用于测试目的
但我有
* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
Run Code Online (Sandbox Code Playgroud)
完整错误:https://jitpack.io/com/github/emreakcan/android-lib-jitpack-test/2.0.0/build.log
我的 IDE 设置为版本 11,我的 Mac 上甚至没有安装 Java 1.8。
emre@Emres-MacBook-Pro / % java -version
openjdk version …Run Code Online (Sandbox Code Playgroud) 目前我正在测试 200 个响应,如下所示
final dio = Dio();
final dioAdapter = DioAdapter();
dio.httpClientAdapter = dioAdapter;
const path = 'https://endpoint.com';
test('Loading shows when user taps set up trading account', () async {
dioAdapter
..onPost(
path,
(request) => request.reply(204, {}),
);
final onGetResponse = await dio.post(path);
when(_tradingAccountService.setUpTradingAccount())
.thenAnswer((realInvocation) => Stream.value(HttpResponse(onGetResponse.data, onGetResponse)));
await signUpViewModel.setUpTradingAccount();
expect(signUpViewModel.isSettingUpTradingAccount, true);
});
Run Code Online (Sandbox Code Playgroud)
但是当我尝试测试 401 或 500 时,dio 抛出HttpStatusError
final dioError = DioError(
error: {'message': 'Some beautiful error!'},
requestOptions: RequestOptions(path: '/foo'),
response: Response(
statusCode: 500,
requestOptions: RequestOptions(path: '/foo'),
), …Run Code Online (Sandbox Code Playgroud)