我创建了一个Xamarin表单应用程序,当它构建在我的计算机上时,它会生成一个AAB。当我启用签名时,Google Play商店就会接受AAB文件,并且可以发布。
当我查看构建日志时,它似乎确实构建了Android应用程序包:
...
##[section]Finishing: Build Xamarin.Android project
##[section]Starting: Sign Android App Bundle
==============================================================================
Task : Android Signing
Description : Sign and align Android APK files
Version : 1.122.0
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613717)
==============================================================================
(node:1767) Warning: Use Cipheriv for counter mode of aes-256-ctr (repeated 11 times)
[command]/usr/bin/jarsigner -keystore /Users/runner/runners/2.170.0/work/1/s/.certs/keystore.jks -storepass *** -keypass *** -verbose -sigalg SHA256withRSA -digestalg SHA-256 -signedjar /Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/bin/Release/com.example.test-Signed.aab /Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/bin/Release/com.example.test-Signed.aab.unsigned ***
adding: META-INF/CPANDROI.SF
adding: META-INF/CPANDROI.RSA
signing: BundleConfig.pb
... (removed a lot of files from the logging)
signing: base/manifest/AndroidManifest.xml
signing: base/native.pb
signing: base/resources.pb
>>> Signer
X.509, CN="REMOVED, O=REMOVED, L=REMOVED, S=REMOVED, C=NL"
[trusted certificate]
jar signed.
Warning:
The signer's certificate is self-signed.
[command]/Users/runner/Library/Android/sdk/build-tools/24.0.0/zipalign -v 4 /Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/bin/Release/com.example.test-Signed.aab.unaligned /Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/bin/Release/com.example.test-Signed.aab
Verifying alignment of /Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/bin/Release/com.example.test-Signed.aab (4)...
50 META-INF/MANIFEST.MF (OK - compressed)
27883 META-INF/CPANDROI.SF (OK - compressed)
56907 META-INF/CPANDROI.RSA (OK - compressed)
... (removed a lot of files from the logging)
13130472 base/manifest/AndroidManifest.xml (OK - compressed)
13132552 base/native.pb (OK - compressed)
13132664 base/resources.pb (OK - compressed)
Verification succesful
##[section]Finishing: Sign Android App Bundle
##[section]Starting: Sign APK
我猜构建和签署都很好,但我猜在复制捆绑文件到登台阶段的过程中出了问题。在此之前,运行“将生成文件复制到分段”阶段,并显示以下输出:
##[section]Starting: Copy build files to staging
==============================================================================
Task : Command Line
Description : Run a command line with arguments
Version : 1.1.3
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
==============================================================================
[command]/bin/bash -c /usr/bin/find . -path '*/bin/*' ! -path '*/obj/*' -type f ! -name '*-Signed.apk' ! -name '*-armeabi-v7a.apk' ! -name '*-arm64-v8a.apk' ! -name '*-x86.apk' ! -name '*-x86_64.apk' -name '*.apk' -print0 | xargs -0 stat -f "%m %N" | sort -rn | head -1 | cut -f2- -d" " | xargs -L 1 -I{} cp -R -v {} /Users/runner/runners/2.170.0/work/1/a/build
(node:1777) Warning: Use Cipheriv for counter mode of aes-256-ctr (11 times)
./CrossPoint.Xpact.Android/bin/Release/com.example.test.apk -> /Users/runner/runners/2.170.0/work/1/a/build/com.example.test.apk
##[section]Finishing: Copy build files to staging
它似乎将APK复制到staging文件夹,然后尝试对Android应用程序包(AAB)执行同样的操作:
##[section]Starting: Copy bundle files to staging
==============================================================================
Task : Command Line
Description : Run a command line with arguments
Version : 1.1.3
Author : Microsoft Corporation
Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613735)
==============================================================================
[command]/bin/bash -c mkdir -p /Users/runner/runners/2.170.0/work/1/a/bundle && ls -LR && /usr/bin/find . -path '*/obj/*' -type f -name '*.aab' -print0 | xargs -0 stat -f "%m %N" | sort -rn | head -1 | cut -f2- -d" " | xargs -L 1 -I{} cp -R -v {} /Users/runner/runners/2.170.0/work/1/a/bundle
(node:1787) Warning: Use Cipheriv for counter mode of aes-256-ctr (11 times)
Example.Common.DataTypes
Example.Identity.Common
Example.Test
Example.Test.Android
Example.Test.UWP
Example.Test.iOS
Example.Test.sln
Example.ruleset
./Example.Common.DataTypes:
ExampleType.cs
Example.Common.DataTypes.csproj
AnotherType.cs
bin
obj
... (whole lot of files removed from this logging)
./Example.Test.iOS/obj:
Example.Test.iOS.csproj.nuget.dgspec.json
Example.Test.iOS.csproj.nuget.g.props
Example.Test.iOS.csproj.nuget.g.targets
project.assets.json
project.nuget.cache
##[section]Finishing: Copy bundle files to staging
它似乎转储了所有的文件,但并不复制实际的AAB文件。我不确定它为什么找不到AAB文件,因为它似乎确实在obj文件夹中创建了AAB文件。这是在Xamarin.android项目阶段的Build bundle中显示的:
_BuildApkEmbed:
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java -Xmx1G -jar /Library/Frameworks/Xamarin.Android.framework/Libraries/xbuild/Xamarin/Android/bundletool.jar build-bundle --modules obj/Release/android/bin/base.zip --output obj/Release/android/bin/com.example.test.aab --config /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpb29e9af.tmp
_CopyPackage:
Copying file from "/Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/obj/Release/android/bin/com.example.test.aab" to "/Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/bin/Release/com.example.test.aab".
_CreateAndroidDebugSigningKey:
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/keytool -genkeypair -alias androiddebugkey -storepass android -keypass android -keystore "/Users/runner/.local/share/Xamarin/Mono for Android/debug.keystore" -dname "CN=Android Debug,O=Android,C=US" -keyalg RSA -validity 10950 -storetype pkcs12
_ResolveAndroidSigningKey:
Creating "obj/Release/android_debug_keystore.flag" because "AlwaysCreate" was specified.
_Sign:
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/jarsigner -keystore "/Users/runner/.local/share/Xamarin/Mono for Android/debug.keystore" -storepass android -keypass android -digestalg SHA-256 -sigalg SHA256withRSA -signedjar bin/Release/com.example.test-Signed.aab /Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/obj/Release/android/bin/com.example.test.aab androiddebugkey
jar signed.
The signer's certificate is self-signed.
Signed android package ''
Done Building Project "/Users/runner/runners/2.170.0/work/1/s/Example.Test.Android/Example.Test.Android.csproj" (PackageForAndroid;SignAndroidPackage target(s)).
Build succeeded.
我不知道有什么可能会出错,以及为什么最后一步会转储我所有的文件,而不是将AAB复制到staging文件夹。
因为我不能在评论中分享图片,所以我把这个贴出来作为一个回答。
如果是这样,只需下载该包,这就是您的AAB文件。
Flatter buid appbundle成功,但有一些警告: 注:/Users/mateus/Developer/flatter/.pub cache/hosted/pub.dartlang.org/firebase_analytics-9.1.0/android/src/main/java/io/flatter/plugins/firebase/analytics/flatterfireba
在gradle attemp构建项目后有一个日志(使用Pro buf) :app:GeneratedBugProto失败 失败:生成失败,出现异常。 > 错误:任务“:app:generateDebugProto”的执行失败。 协议:标准输出:。stderr:/Users//app/build/extracted protos/main:警告:目录不存在/用户//app/src/debug/pro
C:\Users\Tuladhar\WebStormProject\myproject cordova build android运行命令:“C:\Program Files\nodejs\node.exe”C:\Users\Tuladhar\WebstormProjects\myproject\hooks\after\u prepare\010\u add\u platform\u类。js C:
一个普通的应用程序由以下文件组成: 二进制文件 这个安装在 /usr/bin。 一个桌面文件 这个桌面文件向shell提供关于这个程序的重要信息,例如名称、图标、D-Bus名称,启动的命令行。安装在 /usr/share/applications. 一个图标 这个图标安装在 /usr/share/icons/hicolor/48x48/apps, 无论当前背景是什么系统都会到这里查找图标。 一个设
最终目标是从在Play Store中发布评论的用户的有问题的设备中收集应用程序日志。这是通过向这些用户发送支持构建(带有日志的发布构建)并要求他们重现问题并发送日志来实现的。 APK签名(OK) 当使用经典签名方案(没有android应用程序包)时,步骤如下 生成发布和支持APK,并使用相同的密钥对其进行签名 用户现在可以通过链接下载一个支持版本,并通过市场发布的版本进行安装。当新版本在Play
我将我的应用程序更新为引用兼容性库的v23(xamarin.android.support.v7.appCompat version=“23.3.0”),并且不能再构建应用程序了。我得到以下错误: 检索项的父项时出错:找不到与给定名称“theme.appcompat.light.noactionbar”匹配的资源。 找不到与给定名称:attr“window actionbar”匹配的资源。 找不到