Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(*): can't start on some devices #66

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@ flutter {
source = "../.."
}
dependencies {
implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.9'
implementation 'com.github.gzu-liyujiang:Android_CN_OAID:4.2.11'
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import io.flutter.plugin.common.MethodChannel
import java.lang.Exception

class HandleGetOAID(private var resultCallback: MethodChannel.Result) : IGetter {
override fun onOAIDGetComplete(result: String?) {
resultCallback.success(result);
override fun onOAIDGetComplete(result: String) {
resultCallback.success(result)
}

override fun onOAIDGetError(error: Exception?) {

resultCallback.error("100", "error", error);
resultCallback.success(null)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ class MainActivity : FlutterFragmentActivity() {
private fun getOAID(resultCallback: MethodChannel.Result) {
if (DeviceID.supportedOAID(application)) {
DeviceID.getOAID(application, HandleGetOAID(resultCallback));
} else {
resultCallback.success(null)
}
}

Expand Down
6 changes: 4 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ void main() async {
if (details.exceptionAsString().contains('Render')) {
Utils().noticeUtil.showBug(message: '布局异常!');
} else {
Utils().noticeUtil.showBug(message: '出错了,请联系开发者!');
//Utils().noticeUtil.showBug(message: 'error:${details.exception.toString()}\nstack:${details.stack?.toString()}');
Utils().noticeUtil.showBug(message: '出错了,请联系开发者处理!');
}
};
PlatformDispatcher.instance.onError = (error, stack) {
Utils().logUtil.printWTF('Error', error: error, stackTrace: stack);
Utils().noticeUtil.showBug(message: '出错了,请联系开发者!');
Utils().noticeUtil.showBug(message: '出错了,请联系开发者处理!');
//Utils().noticeUtil.showBug(message: 'error:${error.toString()}\nstack:${stack.toString()}');
return true;
};
runApp(GetMaterialApp(
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1566,10 +1566,10 @@ packages:
dependency: transitive
description:
name: package_config
sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.0"
version: "2.1.1"
package_info_plus:
dependency: "direct main"
description:
Expand Down Expand Up @@ -1782,10 +1782,10 @@ packages:
dependency: transitive
description:
name: pub_semver
sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
sha256: "7b3cfbf654f3edd0c6298ecd5be782ce997ddf0e00531b9464b55245185bbbbd"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.4"
version: "2.1.5"
pubspec_parse:
dependency: transitive
description:
Expand Down