greybax / cordova-plugin-proguard Goto Github PK
View Code? Open in Web Editor NEW:white_square_button: Cordova Plugin for ProGuard
License: MIT License
:white_square_button: Cordova Plugin for ProGuard
License: MIT License
when i add custom rules under plugin->cordova-plugin-proguard ->proguard-custom.txt but the changes not available under->platforms->android->app->src->proguard-custom.txt .
kindly lets us know where i have to add more rules in cordova project
🚨 You need to enable Continuous Integration on all branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.
Since we did not receive a CI status on the greenkeeper/initial
branch, we assume that you still need to configure it.
If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/
.
We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
Hi.
Im getting next error:
FATAL EXCEPTION: main
Process: com.maksytech.fishermantest_germany, PID: 30746
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.maksytech.fishermantest_germany/com.maksytech.fishermantest_germany.MainActivity}: java.lang.RuntimeException: Failed to create webview.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3742)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3890)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2393)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loopOnce(Looper.java:238)
at android.os.Looper.loop(Looper.java:357)
at android.app.ActivityThread.main(ActivityThread.java:8088)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957)
Caused by: java.lang.RuntimeException: Failed to create webview.
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:84)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:216)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:212)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:153)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:234)
at com.maksytech.fishermantest_germany.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:8479)
at android.app.Activity.performCreate(Activity.java:8458)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1386)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3723)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3890)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2393)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loopOnce(Looper.java:238)
at android.os.Looper.loop(Looper.java:357)
at android.app.ActivityThread.main(ActivityThread.java:8088)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957)
Caused by: java.lang.NoSuchMethodException: org.apache.cordova.engine.SystemWebViewEngine. [class android.content.Context, class org.apache.cordova.CordovaPreferences]
at java.lang.Class.getConstructor0(Class.java:2363)
at java.lang.Class.getConstructor(Class.java:1759)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:81)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:216)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:212)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:153)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:234)
at com.maksytech.fishermantest_germany.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:8479)
at android.app.Activity.performCreate(Activity.java:8458)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1386)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3723)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3890)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2393)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loopOnce(Looper.java:238)
at android.os.Looper.loop(Looper.java:357)
at android.app.ActivityThread.main(ActivityThread.java:8088)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:957) ``
I wonder, which rule should I add to make it working with cordova 12?
I have successfully installed proguard plugin but when i generate signed APK my Camera is not working and throwing error "Attempt to invoke virtual method 'android.content.res.XmlResourcePars
android.content.pm.Providerinfo.loadXmlMetaData(android.content.pm
java.lang. String)' on a null object reference"
The latest version of the android platform for Cordova, when used in combination with this plugin, cases any app to crash on startup.
Hi, when I install this plugin on my app with last version of cordova Android (7.1.4) it crashes on start.
Previously with version 1.0 of the plugin and cordova android 6.4.4 it works correctly. Now with version 2.0 of the plugin and cordova Android 7.1.4 crashes at startup with this logcat:
--------- beginning of crash
2018-12-14 09:52:43.125 21666-21666/es.gva.mobilendo.aire E/AndroidRuntime: FATAL EXCEPTION: main
Process: es.gva.mobilendo.aire, PID: 21666
java.lang.RuntimeException: Unable to start activity ComponentInfo{es.gva.mobilendo.aire/es.gva.mobilendo.aire.MainActivity}: java.lang.RuntimeException: Failed to create webview.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2984)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
Caused by: java.lang.RuntimeException: Failed to create webview.
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:206)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:202)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:146)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
at es.gva.mobilendo.aire.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:6955)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, class org.apache.cordova.CordovaPreferences]
at java.lang.Class.getConstructor0(Class.java:2204)
at java.lang.Class.getConstructor(Class.java:1683)
at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:79)
at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:206)
at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:202)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:146)
at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:224)
at es.gva.mobilendo.aire.MainActivity.onCreate(MainActivity.java:39)
at android.app.Activity.performCreate(Activity.java:6955)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
at android.app.ActivityThread.-wrap14(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)
2018-12-14 09:52:43.127 4152-4775/? D/Debug: !@DumpState : SHIP
2018-12-14 09:52:43.127 4152-4775/? D/Debug: !@DumpState : debug level:0x4f4c
2018-12-14 09:52:43.127 4152-4775/? D/Debug: !@Dumpstate : Finally, system will skip dumpstate
--------- beginning of system
2018-12-14 09:52:43.127 4152-4775/? W/ActivityManager: Force finishing activity es.gva.mobilendo.aire/.MainActivity
This is my Cordova Plugin List:
cordova-fabric-plugin 1.1.14-dev "cordova-fabric-plugin"
cordova-plugin-advanced-http 2.0.1 "Advanced HTTP plugin"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-googlemaps 2.4.6 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.2.5 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-proguard 2.0.0 "Cordova plugin ProGuard"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.3 "SocialSharing"
cordova-sqlite-storage 2.5.2 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
This is my Ionic Info:
Ionic:
ionic (Ionic CLI) : 4.0.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.9
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.1.4, ios 4.5.5
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.2
ios-sim : 6.1.2
NodeJS : v9.9.0 (/usr/local/bin/node)
npm : 5.7.1
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61
Environment:
ANDROID_HOME : /Users/juanramos/Library/Android/sdk
What would be happening?
I think it might be a good idea to add something like:
-keep class com.android.vending.billing.** { *; }
to the proguard-custom.txt.
Because obfuscation is probably used when the app has subscriptions/inapppurchases etc.
Maybe there's a way of making it optional when installing the plugin?
Hello,
I have added this plugin to my ionic project. After building the app, the source code still looks same! What all should I need to add proguard-custom.txt inorder to obfuscate all js files in my project?
When I run cordova build android
the build fails with this error:
Warning: Exception while processing task java.io.FileNotFoundException: /home/user/project/platforms/android/src/main/assets/www/proguard-custom.txt (No such file or directory)
Hi,
I'm currently working on a Cordova android app and I think your plugin can help me.
Unfortunately when I'm trying to remove logs (verbose and debug) in my release build. It seems doesn't work at all.
The issue is in build.gradle. The usage of "proguard-android.txt" instead of "proguard-android-optimze.txt".
In android sdk you can found difference between them here :
proguard-android-optimze.txt
proguard-android.txt
As writing in proguard-android.txt in commentary :
|# Optimization is turned off by default. Dex does not like code run |# through the ProGuard optimize and preverify steps (and performs some |# of these optimizations on its own). |# Note that if you want to enable optimization, you cannot just | # include optimization flags in your own project configuration file; | # instead you will need to point to the | # "proguard-android-optimize.txt" file instead of this one from your | # project.properties file.
and in ProGuard documentation :
-assumenosideeffects : Only applicable when optimizing. In general, making assumptions can be dangerous; you can easily break the processed code. Only use this option if you know what you're doing!
So three possibilities are available for this project :
Thanks in advance for your return, I can create a PR if needed
i am facing this issue when i am trying to generate release build of android application.and i am check lot of things after then i got the issue there is a conflict between firebase-x plugin and cordova plugin.so please help me how can i resolved this issue
both plugin important for me here
What went wrong:
A problem was found with the configuration of task ':app:uploadCrashlyticsMappingFileRelease' (type 'UploadMappingFileTask').
In plugin 'com.google.firebase.crashlytics.buildtools.gradle.CrashlyticsPlugin' type 'com.google.firebase.crashlytics.buildtools.gradle.tasks.UploadMappingFileTask' property 'googleServicesResourceRoot' doesn't have a configured value.
Reason: This property isn't marked as optional and no value has been configured.
Possible solutions:
Assign a value to 'googleServicesResourceRoot'.
Mark property 'googleServicesResourceRoot' as optional.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.