[resolu]Probléme lors de l'export

Toutes les questions sur le développement Mobile, y compris la partie script.
Avatar de l’utilisateur
poupoule_h5n1
Messages : 48
Inscription : 28 Nov 2022 20:24

[resolu]Probléme lors de l'export

Message par poupoule_h5n1 » 09 Mars 2023 18:46

Bonjour, j'aimerais tester mon projet sur mon telephone mais lors que je lance le build and run 4 erreur surviennent :
la 1er :
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)



la 2er :
FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Flo\Desktop\Cantine de pmc\tentative d'exporte\export android\launcher\build.gradle' line: 34

* What went wrong:
A problem occurred evaluating project ':launcher'.
> path may not be null or empty string. path=''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)



la 3er :
CommandInvokationFailure: Gradle build failed.
C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "bundleRelease"

Environment Variables:
USERDOMAIN = HOME-D02
ProgramFiles = C:\Program Files
TMP = C:\Users\Flo\AppData\Local\Temp
PROCESSOR_ARCHITECTURE = AMD64
PROCESSOR_REVISION = a701
OS = Windows_NT
CHROME_CRASHPAD_PIPE_NAME = \\.\pipe\crashpad_3032_NTSXNIFTFILLJADG
PROCESSOR_IDENTIFIER = Intel64 Family 6 Model 167 Stepping 1, GenuineIntel
ProgramW6432 = C:\Program Files
USERPROFILE = C:\Users\Flo
JAVA_HOME = C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK
CommonProgramFiles = C:\Program Files\Common Files
DriverData = C:\Windows\System32\Drivers\DriverData
ComSpec = C:\Windows\system32\cmd.exe
PSModulePath = C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files\Intel\Wired Networking\
ANDROID_NDK_ROOT = C:\Program Files\Unity\Hub\Editor\2021.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK
USERNAME = Flo
NUMBER_OF_PROCESSORS = 16
JAVA_TOOL_OPTIONS = -Dfile.encoding=UTF-8
BURST_ANDROID_MIN_API_LEVEL = 22
FPS_BROWSER_APP_PROFILE_STRING = Internet Explorer
TEMP = C:\Users\Flo\AppData\Local\Temp
Path = C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\ProgramData\chocolatey\bin;;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Windows\system32\config\systemprofile\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\dotnet\;C:\Users\Flo\AppData\Local\Microsoft\WindowsApps;C:\Users\Flo\AppData\Local\GitHubDesktop\bin
COMPUTERNAME = HOME-D02
PATHEXT = .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
ALLUSERSPROFILE = C:\ProgramData
SystemDrive = C:
ChocolateyInstall = C:\ProgramData\chocolatey
FPS_BROWSER_USER_PROFILE_STRING = Default
windir = C:\Windows
ChocolateyLastPathUpdate = 132855330821396627
PUBLIC = C:\Users\Public
CommonProgramFiles(x86) = C:\Program Files (x86)\Common Files
APPDATA = C:\Users\Flo\AppData\Roaming
OneDrive = C:\Users\Flo\OneDrive
PROCESSOR_LEVEL = 6
CommonProgramW6432 = C:\Program Files\Common Files
ProgramFiles(x86) = C:\Program Files (x86)
SystemRoot = C:\Windows
SESSIONNAME = Console
LOGONSERVER = \\HOME-D02
LOCALAPPDATA = C:\Users\Flo\AppData\Local
HOMEPATH = \Users\Flo
HOMEDRIVE = C:
USERDOMAIN_ROAMINGPROFILE = HOME-D02
ProgramData = C:\ProgramData
ORIGINAL_XDG_CURRENT_DESKTOP = undefined


stderr[

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Flo\Desktop\Cantine de pmc\tentative d'exporte\export android\launcher\build.gradle' line: 34

* What went wrong:
A problem occurred evaluating project ':launcher'.
> path may not be null or empty string. path=''

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
Rethrow as GradleInvokationException: Gradle build failed
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, Unity.Android.Gradle.AndroidGradle androidGradle, System.String workingdir, System.String task, System.Action`1[T] progress) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, AndroidPlayerBuildProgram.Data.AndroidPlayerBuildProgramOutput buildProgramOutput) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <b8958c706cdd4a7fa97745ad82493d62>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

et la 4em
Build completed with a result of 'Failed' in 17 seconds (16684 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


normalement j'ai correctement instaler le sdk et le gradle
Image

j'utilise un oppo A74 5G avec android version 12

j'avoue, étant débutante, que je suis perdue. Les tutos que j'ai suivit n'on rien changer.
S'il vous plait ne me répondez pas "vas te former" je cherche a progresser mais je ne trouve pas la bonne question a poser pour trouver une réponse.
Dernière édition par poupoule_h5n1 le 10 Mars 2023 15:51, édité 1 fois.

Avatar de l’utilisateur
boubouk50
ModoGenereux
ModoGenereux
Messages : 6208
Inscription : 28 Avr 2014 11:57
Localisation : Saint-Didier-en-Bresse (71)

Re: Probléme lors de l'export

Message par boubouk50 » 10 Mars 2023 09:55

Bonjour,

C'est un rapport très complet, et c'est déjà une bonne chose :super:

Je ne connais pas l'export Android par Gradle mais ton chemin pourrait poser problème:
C:\Users\Flo\Desktop\Cantine de pmc\tentative d'exporte\export android\launcher\build.gradle
l'apostrophe dans le nom de dossier est risqué, ne mets que des lettres et des chiffres dans tes noms de dossier et de fichier.
En informatique, il faut bannir tous les caractères spéciaux: éèàù^¨"#{}ç@ etc. Ils posent problème lors des encodages de textes. (C'est pour ça que tu vois des %20 ou des Äe dans des urls, ils sont remplacés). J'évite aussi les espaces mais ils ne devraient pas poser problème je pense.

Aussi, as-tu essayé de Build sans Run ? Pour savoir si le pb se situe à la compilation ou à l'installation sur le téléphone.
"Ce n'est pas en améliorant la bougie, que l'on a inventé l'ampoule, c'est en marchant longtemps."
Nétiquette du forum
Savoir faire une recherche
Apprendre la programmation

Avatar de l’utilisateur
poupoule_h5n1
Messages : 48
Inscription : 28 Nov 2022 20:24

Re: Probléme lors de l'export

Message par poupoule_h5n1 » 10 Mars 2023 11:39

j'ai enlever l'apostrophe et lancer une export sans run,
le build a été construit avec succes malgrés 3 warning :
le 1er :
[ServicesCore]: To use Unity's dashboard services, you need to link your Unity project to a project ID. To do this, go to Project Settings to select your organization, select your project and then link a project ID. You also need to make sure your organization has access to the required products. Visit https://dashboard.unity3d.com to sign up.
UnityEngine.Logger:LogWarning (string,object)
Unity.Services.Core.Internal.CoreLogger:LogWarning (object) (at Library/PackageCache/com.unity.services.core@1.5.2/Runtime/Core.Internal/Logging/CoreLogger.cs:15)
Unity.Services.Core.Editor.ProjectUnlinkBuildWarning:OnPreprocessBuild (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.services.core@1.5.2/Editor/Core/Build/ProjectUnlinkBuildWarning.cs:29)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

le 2em :
File C:\Users\Flo\.android\repositories.cfg could not be loaded.
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

et le 3em :
Unable to find player assembly: C:\Users\Flo\My project (7)\Temp\StagingArea\Data\Managed\UnityEngine.TestRunner.dll
UnityEngine.Debug:LogWarning (object)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLsImpl (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:350)
Unity.Burst.Editor.BurstAotCompiler:OnPostBuildPlayerScriptDLLs (UnityEditor.Build.Reporting.BuildReport) (at Library/PackageCache/com.unity.burst@1.6.6/Editor/BurstAotCompiler.cs:208)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)


du coup je ne sais pas si le fichier en lui même est exécutable et que le problème vient de la construction sur le téléphone, ou si l'export n'est pas utilisable.

j'avais tester avant ça avec un vieux huawei avec androide version 8, ça n'a pas mieux marcher mais je me suis dis que ça venais d'une incompatibilité avec la version ancienne.

Avatar de l’utilisateur
boubouk50
ModoGenereux
ModoGenereux
Messages : 6208
Inscription : 28 Avr 2014 11:57
Localisation : Saint-Didier-en-Bresse (71)

Re: Probléme lors de l'export

Message par boubouk50 » 10 Mars 2023 12:01

poupoule_h5n1 a écrit :
10 Mars 2023 11:39
du coup je ne sais pas si le fichier en lui même est exécutable et que le problème vient de la construction sur le téléphone, ou si l'export n'est pas utilisable.
Si la compilation a réussin, tu dois avoir un .apk ou .aab.
L'APK peut-être directement installé sur ton téléphone, mais de mémoire il faut autoriser l'installation de package externe. Il faut débloquer le mode développeur sur ton téléphone pour l'autoriser.
Pour l'AAB, je ne sais pas. Mes connaissances se limitent à Android 9, on n'utilisait pas encore Gradle à cette époque là... :-D
"Ce n'est pas en améliorant la bougie, que l'on a inventé l'ampoule, c'est en marchant longtemps."
Nétiquette du forum
Savoir faire une recherche
Apprendre la programmation

Avatar de l’utilisateur
poupoule_h5n1
Messages : 48
Inscription : 28 Nov 2022 20:24

Re: Probléme lors de l'export

Message par poupoule_h5n1 » 10 Mars 2023 12:52

le dossier d'export comporte plusieurs sous dossier, j'ai explorer tout ces sous dossier et je n'ai pas trouver de fichier en .apk ou en .aab.
Image
j'ai mis mon téléphone en mode développeur, j'ai autoriser le débogage usb. j'ai mis le fichier dans le téléphone mais je n'ai pus que explorer les fichiers, je n'ai encore une fois trouver aucun exécutable.

Avatar de l’utilisateur
boubouk50
ModoGenereux
ModoGenereux
Messages : 6208
Inscription : 28 Avr 2014 11:57
Localisation : Saint-Didier-en-Bresse (71)

Re: Probléme lors de l'export

Message par boubouk50 » 10 Mars 2023 13:59

Donc je suis allé sur la documentation :
https://docs.unity3d.com/2018.4/Documen ... rview.html
To export a Gradle project, follow the instructions above, but tick the Export Project option in the Build window before you click Build. When you click Build Unity generates a Gradle project in the specified directory rather than building the APK
. Import this project into Android Studio to make additional modifications or to get full control of the build process.

See Android Studio’s documentation on configuring your build for more information about building an output package (APK).
Si je comprends bien, si la case Export Project est cochée, tu as un projet Gradle qu'il faudra compiler avec Android Studio, sinon un APK.
"Ce n'est pas en améliorant la bougie, que l'on a inventé l'ampoule, c'est en marchant longtemps."
Nétiquette du forum
Savoir faire une recherche
Apprendre la programmation

Avatar de l’utilisateur
poupoule_h5n1
Messages : 48
Inscription : 28 Nov 2022 20:24

Re: Probléme lors de l'export

Message par poupoule_h5n1 » 10 Mars 2023 14:29

en effet j'ai décocher la case "export project" et les erreurs sont devenuent complétement différentes
heu ... on avance ^^'
Image

la 1ere
UnityException: Can not sign the application
Unable to sign the application; please provide passwords!
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

la 2em
DirectoryNotFoundException: Could not find a part of the path "C:\Users\Flo\My project (7)\Library\Bee\buildreport.json".
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) (at <c9d3ffd4b98649ee9989e1908eaca019>:0)
System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options) (at <c9d3ffd4b98649ee9989e1908eaca019>:0)
(wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions)
System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) (at <c9d3ffd4b98649ee9989e1908eaca019>:0)
System.IO.StreamWriter..ctor (System.String path, System.Boolean append) (at <c9d3ffd4b98649ee9989e1908eaca019>:0)
(wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool)
System.IO.File.CreateText (System.String path) (at <c9d3ffd4b98649ee9989e1908eaca019>:0)
Unity.TinyProfiling.TinyProfiler.WriteReport (System.String processName, System.Int32 sortIndex, System.Collections.Generic.IEnumerable`1[T] externalTraceEventFiles) (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
Unity.TinyProfiling.TinyProfiler.Finish () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
Unity.TinyProfiling.TinyProfiler.CloseSection (System.Int32 index) (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
Unity.TinyProfiling.TinyProfiler+TimedSectionHandle.Dispose () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.Scripting.ScriptCompilation.UnityBeeDriverProfilerSession.EndSection () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)
UnityEditor.Modules.BeeBuildPostprocessor.EndBuildSection () (at <dc1a47a5816e4be7bc6817ee4d339e75>:0)

la 3em
Build completed with a result of 'Failed' in 131 seconds (130726 ms)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

du coup je vais chercher comment "signer une application" ... quoi que ça veuille dire

Avatar de l’utilisateur
boubouk50
ModoGenereux
ModoGenereux
Messages : 6208
Inscription : 28 Avr 2014 11:57
Localisation : Saint-Didier-en-Bresse (71)

Re: Probléme lors de l'export

Message par boubouk50 » 10 Mars 2023 15:08

Dans les players settings, tu as une partie dédiée (Publishing Settings > keyStore Manager) à la certification Android. C'est ici que tu signes l'application. Il te faudra définir une clé et un password (ou deux) que tu sauvegarderas localement. Elle permet d'identifier l'application, notamment pour le store.

1) Publishing Settings > keyStore Manager
2) Crée un nouveau keystore en indiquant un nom et un password (confirmer le password)
3) Sélectionne "Create a new key" > Key Alias
4) Une pop-up apparaît > entre les informations nécessaires (de mémoire, pas besoin de tout remplir).
5) Sélectionne la clé que tu viens de créer.
6) Build > ton application est maintenant certifiée.

https://docs.unity3d.com/Manual/class-P ... Publishing
https://docs.unity3d.com/Manual/android ... nager.html
"Ce n'est pas en améliorant la bougie, que l'on a inventé l'ampoule, c'est en marchant longtemps."
Nétiquette du forum
Savoir faire une recherche
Apprendre la programmation

Avatar de l’utilisateur
poupoule_h5n1
Messages : 48
Inscription : 28 Nov 2022 20:24

Re: Probléme lors de l'export

Message par poupoule_h5n1 » 10 Mars 2023 15:51

hourrrrrraaaa !
merci beaucoup grâce a toi, j'ai pu test sur mon téléphone !
(il y a quelques soucis d'affichage mais je vais vite régler ça)
Merci encore ! :)

Répondre

Revenir vers « Développement plateformes mobile Iphone et Android »