
Problem 1.上傳App Store構(gòu)建版本,上傳成功,App Store Connect并不顯示構(gòu)建版本?
權(quán)限未配置齊全
升到iOS10之后,需要設(shè)置權(quán)限的有:
麥克風(fēng)權(quán)限:Privacy - Microphone Usage Description 是否允許此App使用你的麥克風(fēng)?
相機(jī)權(quán)限: Privacy - Camera Usage Description 是否允許此App使用你的相機(jī)?
相冊(cè)權(quán)限: Privacy - Photo Library Usage Description 是否允許此App訪問(wèn)你的媒體資料庫(kù)?
通訊錄權(quán)限: Privacy - Contacts Usage Description 是否允許此App訪問(wèn)你的通訊錄?
藍(lán)牙權(quán)限:Privacy - Bluetooth Peripheral Usage Description 是否許允此App使用藍(lán)牙?
語(yǔ)音轉(zhuǎn)文字權(quán)限:Privacy - Speech Recognition Usage Description 是否允許此App使用語(yǔ)音識(shí)別?
日歷權(quán)限:Privacy - Calendars Usage Description
定位權(quán)限:Privacy - Location When In Use Usage Description
定位權(quán)限: Privacy - Location Always Usage Description
位置權(quán)限:Privacy - Location Usage Description
媒體庫(kù)權(quán)限:Privacy - Media Library Usage Description
健康分享權(quán)限:Privacy - Health Share Usage Description
健康更新權(quán)限:Privacy - Health Update Usage Description
運(yùn)動(dòng)使用權(quán)限:Privacy - Motion Usage Description
音樂(lè)權(quán)限:Privacy - Music Usage Description
提醒使用權(quán)限:Privacy - Reminders Usage Description
Siri使用權(quán)限:Privacy - Siri Usage Description
電視供應(yīng)商使用權(quán)限:Privacy - TV Provider Usage Description
視頻用戶賬號(hào)使用權(quán)限:Privacy - Video Subscriber Account Usage Description
Problem 2.上傳App Store構(gòu)建版本,上傳成功,App Store Connect顯示正在處理中,過(guò)一會(huì)版消失?
工程中引用權(quán)限插件有問(wèn)題 預(yù)估為私有api訪問(wèn) 去除插件上傳成功
權(quán)限處理插件
permission_handler: 2.1.2
提交應(yīng)用到iTunes Connect時(shí)構(gòu)建版本“正在處理”后直接消失——此構(gòu)建版本無(wú)效
Problem 3.Flutter不在代碼中設(shè)置不能抓包?
Problem 4.Error: Expected an identifier, but got ''. const
flutter clean
Problem 5.Flutter雜癥( flutter packages pub run build_runner build )
--delete-conflicting-outputs
//清除之前生成的文件,如果直接運(yùn)行下面的不行??梢韵葒L試運(yùn)行這個(gè)
flutter packages pub run build_runner clean
//可以直接運(yùn)行這個(gè)
flutter packages pub run build_runner build --delete-conflicting-outputs
Flutter雜癥( flutter packages pub run build_runner build )
Problem 6.Flutter SocketException: Failed to create server socket (OS Error: Permission denied, errno = 13), address = 127.0.0.1, port = 0
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Built build\app\outputs\apk\debug\app-debug.apk.
I/flutter ( 7011): Observatory server failed to start after 1 tries
I/flutter ( 7011): Observatory server failed to start after 2 tries
I/flutter ( 7011): Observatory server failed to start after 3 tries
I/flutter ( 7011): Observatory server failed to start after 4 tries
I/flutter ( 7011): Observatory server failed to start after 5 tries
I/flutter ( 7011): Observatory server failed to start after 6 tries
I/flutter ( 7011): Observatory server failed to start after 7 tries
I/flutter ( 7011): Observatory server failed to start after 8 tries
I/flutter ( 7011): Observatory server failed to start after 9 tries
I/flutter ( 7011): Observatory server failed to start after 10 tries
I/flutter ( 7011): Observatory server failed to start after 11 tries
I/flutter ( 7011): Could not start Observatory HTTP server:
I/flutter ( 7011): SocketException: Failed to create server socket (OS Error: Permission denied, errno = 13), address = 127.0.0.1, port = 0
I/flutter ( 7011): #0 _NativeSocket.bind (dart:io/runtime/bin/socket_patch.dart:591:7)
I/flutter ( 7011): <asynchronous suspension>
I/flutter ( 7011): #1 _RawServerSocket.bind (dart:io/runtime/bin/socket_patch.dart:1206:26)
I/flutter ( 7011): #2 _ServerSocket.bind (dart:io/runtime/bin/socket_patch.dart:1466:29)
I/flutter ( 7011): #3 ServerSocket.bind (dart:io/runtime/bin/socket_patch.dart:1457:26)
I/flutter ( 7011): #4 _HttpServer.bind (dart:_http/http_impl.dart:2520:25)
I/flutter ( 7011): #5 HttpServer.bind (dart:_http/http.dart:227:19)
I/flutter ( 7011): #6 Server.startup.poll (dart:vmservice_io/server.dart:355:36)
I/flutter ( 7011): <asynchronous suspension>
I/flutter ( 7011): #7 Server.startup (dart:vmservice_io/server.dart:367:23)
I/flutter ( 7011): <asynchronous suspension>
I/flutter ( 7011): #8 main (dart:vmservice_io/vmservice_io.dart:253:12)
I/flutter ( 7011):
在android工程AndroidManifest.xml配置
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

Problem 6.Flutter在安卓部分真機(jī)上不顯示圖標(biāo)(顯示為flutter icon)
安卓系統(tǒng)圖標(biāo)緩存問(wèn)題 切換主題即可 (究極大法:出廠重置)
Problem 7.Flutter項(xiàng)目中在代碼端判斷當(dāng)前運(yùn)行模式并取不同的url地址
static String initHost() {
const String inProduction = const String.fromEnvironment("dart.vm.product");
if (inProduction == "true") {
// 線上地址
} else if (inProduction == "false") {
// 線下地址
} else {
// 測(cè)試地址
}
}
Problem 8.如何將Flutter應(yīng)用程序遷移到AndroidX
Flutter應(yīng)用程序遷移到AndroidX
https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
Problem 9.
Building App.framework for arm64...
Building AOT snapshot in release mode (ios-release)... 33.2s
Built to build/aot/.
Snapshotting (IOSArch.armv7) exited with non-zero exit code: 1
Snapshotting (IOSArch.arm64) exited with non-zero exit code: 0
cp: build/aot/App.framework: No such file or directory
error: cannot parse the debug map for 'build/aot/App.framework/App': No such file or directory
Failed to generate debug symbols (dSYM) file for build/aot/App.framework/App.
在之前版本構(gòu)建flutter是成功的,但是我在升級(jí)Xcode11-beta macOS10.15時(shí)構(gòu)建發(fā)生過(guò)以上錯(cuò)誤
解決:Xcode-Architectures-Valid Architectures- armv7
Problem 10.Flutter打包iOS上傳App Store報(bào)錯(cuò)是因?yàn)閒ramework 包含了x86_64, i386 架構(gòu),這個(gè)是蘋果不允許的
App Store Connect Operation Error
Communication error. Please use diagnostic mode to check connectivity. You need to have outbound access to TCP port 443.
App Store Connect Operation Error
ERROR ITMS-90087: "Unsupported Architectures. The executable for Runner.app/Frameworks/Flutter.framework contains unsupported architectures '[x86_64]'."
App Store Connect Operation Error
ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'Runner.app/Frameworks/Flutter.framework/Flutter' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."
App Store Connect Operation Error
ERROR ITMS-90125: "The binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's linker."
App Store Connect Operation Warning
WARNING ITMS-90080: "The executable 'Payload/Runner.app/Frameworks/Flutter.framework' is not a Position Independent Executable. Please ensure that your build settings are configured to create PIE executables. For more information refer to Technical Q&A QA1788 - Building a Position Independent Executable in the iOS Developer Library."

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
EXTRACTED_ARCHS=()
for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done
echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"
echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done
Problem 11.如果Flutter檢測(cè)到您的項(xiàng)目不支持Xcode 11.4及其以上,則可能會(huì)轉(zhuǎn)到此。
https://flutter.dev/docs/development/ios-project-migration
Building for iOS, but the linked and embedded framework 'App.framework' was built for iOS Simulator.
Building for iOS Simulator, but the linked and embedded framework 'App.framework' was built for iOS.
根據(jù)文檔提示進(jìn)行就可以,在這里我要提醒注意兩點(diǎn),
1.刪除App.framework 和Flutter.framework 不要徹底刪除,刪除引用即可
2.第五步,如果已經(jīng)存在Flutter 或者 "Flutter" 不需要執(zhí)行這一步
Problem 12. Flutter升級(jí)v2.0
<pre style="margin: 0px; tab-size: 4; white-space: pre-wrap;"> Undefined symbols for architecture x86_64:
"___gxx_personality_v0", referenced from:
+[FlutterSound registerWithRegistrar:] in flutter_sound_lite(FlutterSound.o)
+[FlutterSoundPlayerManager registerWithRegistrar:] in flutter_sound_lite(FlutterSoundPlayerManager.o)
-[FlutterSoundPlayerManager init] in flutter_sound_lite(FlutterSoundPlayerManager.o)
FlutterSoundPlayerReg(NSObject<FlutterPluginRegistrar>*) in flutter_sound_lite(FlutterSoundPlayerManager.o)
-[FlutterSoundPlayerManager handleMethodCall:result:] in flutter_sound_lite(FlutterSoundPlayerManager.o)
-[FlutterSoundPlayer startPlayerCompleted:duration:] in flutter_sound_lite(FlutterSoundPlayer.o)
-[FlutterSoundPlayer needSomeFood:] in flutter_sound_lite(FlutterSoundPlayer.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Analyzing workspace
note: Constructing build description
note: Build preparation complete
</pre>
|
解決:因?yàn)槔锩嬗杏玫紺++ 的一些東西。Xcode中Build Phases->link Binary with Libraries中添加libc++.tbd
Problem 13.Android復(fù)制手機(jī)號(hào)失敗、點(diǎn)擊電話失敗**
機(jī)型:華為 P30 pro Harmony OS 2.0.0 吳艷軍
解決:Android原生調(diào)用
|
<pre style="margin: 0px; tab-size: 4; white-space: pre-wrap;">/**
- 打電話
*/
public void linkTelephone(MethodCall call, MethodChannel.Result result) {
String telephone = (String) call.arguments;
Intent intent = new Intent(Intent.ACTION_DIAL);
Uri data = Uri.parse("tel:" + telephone);
intent.setData(data);
startActivity(intent);
result.success(true);
}</pre>
|
Problem 14.Android拍照無(wú)反應(yīng)**
機(jī)型:vivoi S6、vivo iQOO Z1、OPPO A93s(Color OS V11.1 Android 11)、一加8T
解決:Android原生調(diào)用
|
<pre style="margin: 0px; tab-size: 4; white-space: pre-wrap;">/**
- 拍照功能
*/
public void takePhoto(MethodCall call, MethodChannel.Result result) {
Intent intent = new Intent();
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
mPhoneUri = getPhotoName();
intent.putExtra(MediaStore.EXTRA_OUTPUT, mPhoneUri);
startActivityForResult(intent, CAMERA_PHOTO);
currentResult = result;
}</pre>
|
Problem 15 .Android點(diǎn)擊導(dǎo)航,沒(méi)有自動(dòng)打開(kāi)地圖**
機(jī)型:努比亞nx659j
解決:適配Android11系統(tǒng),配置相關(guān)地圖包名
|
<pre style="margin: 0px; tab-size: 4; white-space: pre-wrap;">
<queries>
<package android:name="com.autonavi.minimap" />
<package android:name="com.baidu.BaiduMap" />
<package android:name="com.tencent.map" />
</queries></pre>
|
Problem 16.百度地圖獲取定位失敗、超時(shí)**
解決:百度地圖定位多次后失效,每次定位重新初始化定位對(duì)象。建議使用最新3.0空安全版本
12.Andorid百度地圖搜索位置失效
解決:退出App時(shí),殺死App進(jìn)程。
|
<pre style="margin: 0px; tab-size: 4; white-space: pre-wrap;"> @Override
protected void onDestroy() {
super.onDestroy();
// 退出App
android.os.Process.killProcess(android.os.Process.myPid());
System.exit(1);
}</pre>
|
Problem 18.Andorid百度地圖搜索位置失效,錯(cuò)誤信息如下。**
|
<pre style="margin: 0px; tab-size: 4; white-space: pre-wrap;">E/baidumapsdk(22666): Authentication Error
E/baidumapsdk(22666): =============================================
E/baidumapsdk(22666): ----------------- 鑒權(quán)錯(cuò)誤信息 ------------
E/baidumapsdk(22666): sha1;package:9A:B9:A8:3F:79:BD:0F:F9:85:4C:06:45:46:7B:6B:3D:3F:78:F9:BF;com.huimin.crm
E/baidumapsdk(22666): key:gRhkr8VG2hdseXufqfPGuNyRMGGtkKcI
E/baidumapsdk(22666): errorcode: -11 uid: -1 appid -1 msg: httpsPost failed,IOException:java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
E/baidumapsdk(22666): 請(qǐng)仔細(xì)核查 SHA1、package與key申請(qǐng)信息是否對(duì)應(yīng),key是否刪除,平臺(tái)是否匹配
E/baidumapsdk(22666): errorcode為230時(shí),請(qǐng)參考論壇鏈接:
E/baidumapsdk(22666): http://bbs.lbsyun.baidu.com/forum.php?mod=viewthread&tid=106461
E/baidumapsdk(22666): =============================================</pre>
|
原因:開(kāi)代理,百度地圖接口不允許抓包
解決:使用百度API關(guān)閉手機(jī)代理
15.iOS企業(yè)包安裝無(wú)法驗(yàn)證App。
一:證書或者配置文件過(guò)期
解決方案:
打開(kāi)蘋果開(kāi)發(fā)者后臺(tái),登錄企業(yè)賬號(hào),檢查證書與配置文件是否過(guò)期。
二:網(wǎng)絡(luò)問(wèn)題(無(wú)網(wǎng)絡(luò)連接或網(wǎng)絡(luò)信號(hào)弱)
解決方案:
1.檢查設(shè)備是否有網(wǎng)絡(luò)連接(打開(kāi)瀏覽器,隨便打開(kāi)一個(gè)網(wǎng)頁(yè),能正常打開(kāi)即網(wǎng)絡(luò)正常)
2.查看app是否允許網(wǎng)絡(luò)連接(設(shè)置->蜂窩網(wǎng)絡(luò)->找到不app→WLAN與蜂窩網(wǎng)絡(luò))
3.切換網(wǎng)絡(luò)運(yùn)營(yíng)商(比如:如果是電信4G無(wú)法驗(yàn)證app,那么使用移動(dòng)的網(wǎng)或者聯(lián)動(dòng)的網(wǎng)再進(jìn)行嘗試)
4.移動(dòng)位置
三:設(shè)備問(wèn)題(確保不是越獄設(shè)備)
解決方案:使用非越獄設(shè)備安裝app
四:系統(tǒng)問(wèn)題(某些系統(tǒng)版本不穩(wěn)定)
解決方案: 升級(jí)系統(tǒng)至最新版本(請(qǐng)確保系統(tǒng)是正式版本,而不是beta版本)
五.其他問(wèn)題(優(yōu)先)
解決方案:
(1)關(guān)閉網(wǎng)絡(luò);重啟手機(jī);重新開(kāi)啟網(wǎng)絡(luò)。
(2 ) 關(guān)閉網(wǎng)絡(luò);打開(kāi)設(shè)置->下滑找到Safari瀏覽器->點(diǎn)擊進(jìn)去,找到清除歷史記錄與網(wǎng)站數(shù)據(jù)->點(diǎn)擊后等待一段時(shí)間,等文本重新變成藍(lán)色就是清除好了;重新開(kāi)啟網(wǎng)絡(luò)