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

incompatible: @ionic-native/admob-pro cordova-generic-ad.jar does not exist. #1101

Closed
rahadur opened this issue Jan 5, 2019 · 3 comments
Closed

Comments

@rahadur
Copy link
Contributor

rahadur commented Jan 5, 2019

After install @ionic-native/admob-pro in my Ionic 4 & Capacitor app. Troubling with this
Android Build Error Transform output file C:\xx\xx\android\app\libs\cordova-generic-ad.jar does not exist.

Build Failed Error:

org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Could not resolve all files for configuration ':app:debugCompileClasspath'.
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:145)
	at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:115)
	at org.gradle.internal.invocation.GradleBuildController$1.call(GradleBuildController.java:78)

Caused by: org.gradle.internal.exceptions.LocationAwareException: Could not resolve all files for configuration ':app:debugCompileClasspath'.
	at org.gradle.initialization.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:74)
	at org.gradle.initialization.MultipleBuildFailuresExceptionAnalyser.transform(MultipleBuildFailuresExceptionAnalyser.java:47)


Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'cordova-generic-ad.jar' to match attributes {artifactType=processed-jar} using transform IdentityTransform
	at org.gradle.api.internal.artifacts.transform.UserCodeBackedTransformer.transform(UserCodeBackedTransformer.java:89)
	at org.gradle.api.internal.artifacts.transform.ChainedTransformer.transform(ChainedTransformer.java:36)
	at org.gradle.api.internal.artifacts.transform.TransformFileOperation.run(TransformFileOperation.java:40)


Caused by: org.gradle.api.InvalidUserDataException: Transform output file C:\XPlatform\grevocabulary\android\app\libs\cordova-generic-ad.jar does not exist.
	at org.gradle.api.internal.artifacts.transform.TransformArtifactsAction.apply(TransformArtifactsAction.java:52)
	at org.gradle.api.internal.artifacts.transform.TransformArtifactsAction.apply(TransformArtifactsAction.java:29)

Config.xml

.....
<plugin name="cordova-plugin-admobpro" spec="^2.35.3" />
.....

package.json

"dependencies": {
    .................
    "cordova-plugin-admobpro": "^2.35.3",
    .................
}

Environment Information

Ionic:

ionic (Ionic CLI)             : 4.6.0 (C:\Users\Rahadur\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework               : @ionic/angular 4.0.0-beta.17                                   
@angular-devkit/build-angular : 0.10.7                                                         
@angular-devkit/schematics    : 7.0.7                                                          
@angular/cli                  : 7.0.7                                                          
@ionic/angular-toolkit        : 1.2.2    

Cordova:

cordova (Cordova CLI) : 8.0.0                                                                  
Cordova Platforms     : none                                                                   
Cordova Plugins       : no whitelisted plugins (4 plugins total)   

System:

Android SDK Tools : 26.1.1 (C:\Android\android-sdk)                                            
NodeJS            : v10.5.0 (C:\Program Files\nodejs\node.exe)                                 
npm               : 6.5.0                                                                      
OS                : Windows 10
@jcesarmobile
Copy link
Member

Sadly we can't fix this.
The problem is the dependency plugin cordova-plugin-extension, it has a gradle file at src/android/rjfun-libs.gradle which indicates Cordova to compile the cordova-generic-ad.jar, but doing that makes it search in a relative place instead of in the right place.

Capacitor already compiles the .jar files that are on the right place, so what that gradle file does is not really needed, what you can do is to delete the content of node_modules/cordova-plugin-extension/src/android/rjfun-libs.gradle as workaround.

@RicardoElSabio
Copy link

@jcesarmobile what about admob free? The app is crashing when im running it.No logged errors.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 12, 2022

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants