Closed sebastiansinsin closed 4 years ago
@sebastiansinsin Can you provide a repo ?
@NikolaPeevski okay I will try to give you a repo.
Sorry for waiting too long @NikolaPeevski https://github.com/sebastiansinsin/ionic3-cordova9-android8 Please ignore the readme, haha..
It looks like Cordova isn't building your app, which would explain why the apk is missing. See the command output:
> cordova.cmd build android
[cordova] The "path" argument must be of type string. Received type undefined
@dwieeb I have been debugging this for the past 3 hours there are tons of configuration issues, but surprisingly path isn't one of them
@sebastiansinsin do the following
cordova platform rm android
cordova platfoorm add android@8
ionic cordova build android --verbose --info
and then start fixing the configuration
@dwieeb OPS, actually I fixed the path by mistake.. @sebastiansinsin to fix the path
ionic integration disable cordova
rm ./config.xml
ionic integration enable cordova --add
derp Onwards there are issues with dependencies, at least on my part and then there are some issues with the image picker not being compatible
@sebastiansinsin It builds now, you can see package json of the plugins I have removed https://github.com/NikolaPeevski/ionic3-cordova9-android8
Also I had to add '/sdk' to the gradle build config, if you have issues with that you can remove it and try to build again
@NikolaPeevski @dwieeb thank you for your help. I will try it first based on your solution and see which plugin that make it breaks, I can't remove them because my project needs them.
@sebastiansinsin I suggest adding them back one by one and trying to fix the compability, --verbose and --info helps a lot. If you need any help ping me.
@NikolaPeevski use --verbose and --info for command ionic build right? When adding plugin 1 by 1 like Cordova plugin add some_plugin --verbose --info, it can't right? Since as far as I know there is no option --verbose and --info on Cordova plugin.
@sebastiansinsin When you build use ionic cordova build android --verbose --info
only.
@NikolaPeevski oke thank you and I want to ask about --no-native-run. I've read on closed issued from @dwieeb, he said that use --no-native-run for Android 6,if you are Android 7+ you don't need use it. However, if I try --no-native-run there is no error like what I've posted but It didn't install on emulator. What is native-run? If we use command --no-native-run, does it tells ionic to not run native components or plugin native?
@sebastiansinsin From my understanding it's a deployment tool, that copies binaries (your apk/ios package) to the simulator or active device
@NikolaPeevski I see.. That what it said on docs too. Maybe I was thinking too much and off the topics haha.. If we use --no-native-run it tells ionic to build an app using Cordova. Maybe, it doesn't relate to not running the native plugin. Thanks for your help. I'll get back soon to update if I could finally solve this.
Any updates @sebastiansinsin ?
@NikolaPeevski Hi Nikola, I'm sorry for late updates, I'm still trying to solve it, I'vent got a chance to solve this issues as soon as possible because I've some project that I need to finish today.
@NikolaPeevski I'll try my best to update you today. I'm so sorry.
@NikolaPeevski I've try to run the android app in the emulator from your forked repo and it's work but there is an error plugin is not installed because I used firebase analytics which you removed it because of dependency problems. So what I need to do is finding plugin google services and firebase and also image picker which would work with cordova android 8 and cordova cli 9.
@sebastiansinsin That's cool. I'm glad it's not an ionic related issue :) Hmu if you need more help.
@NikolaPeevski I don't know if it's considered ionic related issue or not, because in ionic documentation I've followed all the instruction on native section firebase-analytics and the problem is still the same, `FAILURE: Build failed with an exception.
What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[17.0. 4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:17.3.4 -> com.google.firebase:firebase-iid@[17.0.4], but fire base-iid version was 20.0.2.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.3.4 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.3 -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@17.2.3 -- Project 'app' depends onto com.google.firebase:firebase-iid@20.0.2 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.+
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.
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 10s
Task :app:preDebugBuild FAILED Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.firebase, artifactId=firebase-messaging, version=17.3.4), toArtifact=Artifact(groupId=com.google.firebase, artifactId=firebase-iid), toArtifactVersionString=[17.0.4]) 3 actionable tasks: 1 executed, 2 up-to-date
C:\Users\sebastian\paperid\ionic3-cordova9-android8>if "1" == "0" goto mainEnd
C:\Users\sebastian\paperid\ionic3-cordova9-android8>rem Set variable GRADLE_EXIT_CONSOLE if you need the script return code instead of
C:\Users\sebastian\paperid\ionic3-cordova9-android8>rem the cmd.exe /c return code!
C:\Users\sebastian\paperid\ionic3-cordova9-android8>if not "" == "" exit 1
C:\Users\sebastian\paperid\ionic3-cordova9-android8>exit /b 1 Command finished with error code 1: C:\Users\sebastian\paperid\ionic3-cordova9-android8\platforms\android\gradlew cdvBuildDebug,-b,C:\Users\sebastian\paperid\ionic3-cordova9-android8\platforms\android\build.gradle C:\Users\sebastian\paperid\ionic3-cordova9-android8\platforms\android\gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[17.0. 4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:17.3.4 -> com.google.firebase:firebase-iid@[17.0.4], but fire base-iid version was 20.0.2.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.3.4 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.3 -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@17.2.3 -- Project 'app' depends onto com.google.firebase:firebase-iid@20.0.2 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.+
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.
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 10s Error: C:\Users\sebastian\paperid\ionic3-cordova9-android8\platforms\android\gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[17.0. 4]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.firebase:firebase-messaging:17.3.4 -> com.google.firebase:firebase-iid@[17.0.4], but fire base-iid version was 20.0.2.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.3.4 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.3 -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@17.2.3 -- Project 'app' depends onto com.google.firebase:firebase-iid@20.0.2 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.+
For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.
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`
I'vent found any solution to this yet haha.. still searching for it
Hi @NikolaPeevski , I hope you're doing great.
@sebastiansinsin It builds now, you can see package json of the plugins I have removed https://github.com/NikolaPeevski/ionic3-cordova9-android8
Also I had to add '/sdk' to the gradle build config, if you have issues with that you can remove it and try to build again
I dont know how to add '/sdk' in gradle build config. I can't find it.
Also the first step is fixing the path first then adding platform right?
@dwieeb OPS, actually I fixed the path by mistake.. @sebastiansinsin to fix the path
ionic integration disable cordova rm ./config.xml ionic integration enable cordova --add
derp Onwards there are issues with dependencies, at least on my part and then there are some issues with the image picker not being compatible
This is Step 1
@dwieeb I have been debugging this for the past 3 hours there are tons of configuration issues, but surprisingly path isn't one of them
@sebastiansinsin do the following
cordova platform rm android
cordova platfoorm add android@8
ionic cordova build android --verbose --info
and then start fixing the configuration
this is step 2
@NikolaPeevski Hi Nikola, I wanna tell you some updates that I've succeeded run android on emulator and fix the dependency related to firebase analytics. However, I got an error.
I haven't found solution to fix this. It would be great to hear your solution or how to fix this. thanks! have a nice day.
@sebastiansinsin Can you push to the repo and I can take a look at it ?
@NikolaPeevski okay Nikola, I'll create a repo
@NikolaPeevski https://github.com/sebastiansinsin/ionic3-cordova9-android8 here is the repo
@NikolaPeevski thanks Nikola for helping me.
Description:
Still get the same error when running android with emulator even I have upgrade the ionic CLI @dwieeb
Steps to Reproduce:
I use command
set my_env=dev&&ionic cordova run android -l -c
if you need to know about my_env its in webpack config.I put this webpack config on package.json
Output:
My
ionic info
:Another possibility issues that related to this error @dwieeb if you see the output when copy plugin there is an error
config file undefined requested for changes not found at \platforms\android\undefined, ignoring
. I've searched online that new cordova has config-file tag on config.xml and I don't know if I need to define that or not and how to define it. when I try to remove platform and adding it back, I get output like thisThank you for want to help solving this issues @dwieeb , you're rock! Have a good day.