- This topic has 15 replies, 2 voices, and was last updated 9 years, 9 months ago by Caliman Victor.
-
AuthorPosts
-
Caliman VictorMemberHello,
We are developing a HTML 5 mobile application.
I updated myeclipse 2014 to myeclipse 2015 yesterday.
In our project we have a functionality to upload pictures to our server from the mobile application, so we need the following cordova plugins:1) org.apache.cordova.camera
2) org.apache.cordova.file
3) org.apache.cordova.file-transferAfter I added the 3 plugins to the project the application is not working anymore.
If I build the application locally it wont start. I get the following message in logcat:D/CordovaWebView(26242): >>> loadUrl(file:///android_asset/www/index.html) D/PluginManager(26242): init() W/System.err(26242): java.lang.ClassNotFoundException: org.apache.cordova.file.FileUtils W/System.err(26242): at java.lang.Class.classForName(Native Method) W/System.err(26242): at java.lang.Class.forName(Class.java:204) W/System.err(26242): at java.lang.Class.forName(Class.java:169) W/System.err(26242): at org.apache.cordova.PluginManager.instantiatePlugin(PluginManager.java:345) W/System.err(26242): at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:189) W/System.err(26242): at org.apache.cordova.PluginManager.startupPlugins(PluginManager.java:114) W/System.err(26242): at org.apache.cordova.PluginManager.init(PluginManager.java:92) W/System.err(26242): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:383) W/System.err(26242): at org.apache.cordova.CordovaWebView.loadUrlIntoView(CordovaWebView.java:368) W/System.err(26242): at org.apache.cordova.CordovaWebView.loadUrl(CordovaWebView.java:363) W/System.err(26242): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:372) W/System.err(26242): at qweqwe.id.aaaa.onCreate(aaaa.java:32) W/System.err(26242): at android.app.Activity.performCreate(Activity.java:5133)
If I build the application remotely it starts but it can not access the internet. I don’t get any errors in logcat.
This is my config.xml file:
<?xml version="1.0" encoding="UTF-8"?> <!-- config.xml reference: https://build.phonegap.com/docs/config-xml --> <widget xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0" id="qweqwe.id" version="1.0.0"> <name>aaaa</name> <description>Blank Application</description> <author href="http://myeclipseide.com" email="support@genuitec.com"> MyEclipse Phonegap Tools </author> <content src="index.html" /> <!-- If you do not want any permissions to be added to your app, add the following tag to your config.xml; you will still have the INTERNET permission on your app, which PhoneGap requires. --> <preference name="permissions" value="none" /> <!-- all: current version of PhoneGap --> <preference name="orientation" value="default" /> <!-- all: default means both landscape and portrait are enabled --> <preference name="target-device" value="universal" /> <!-- all: possible values handset, tablet, or universal --> <preference name="fullscreen" value="true" /> <!-- all: hides the status bar at the top of the screen --> <preference name="webviewbounce" value="true" /> <!-- ios: control whether the screen 'bounces' when scrolled beyond the top --> <preference name="prerendered-icon" value="true" /> <!-- ios: if icon is prerendered, iOS will not apply it's gloss to the app's icon on the user's home screen --> <preference name="stay-in-webview" value="false" /> <!-- ios: external links should open in the default browser, 'true' would use the webview the app lives in --> <preference name="ios-statusbarstyle" value="black-opaque" /> <!-- ios: black-translucent will appear black because the PhoneGap webview doesn't go beneath the status bar --> <preference name="detect-data-types" value="true" /> <!-- ios: controls whether data types (such as phone no. and dates) are automatically turned into links by the system --> <preference name="exit-on-suspend" value="false" /> <!-- ios: if set to true, app will terminate when home button is pressed --> <preference name="show-splash-screen-spinner" value="true" /> <!-- ios: if set to false, the spinner won't appear on the splash screen during app loading --> <preference name="auto-hide-splash-screen" value="true" /> <!-- ios: if set to false, the splash screen must be hidden using a JavaScript API --> <preference name="android-minSdkVersion" value="7" /> <!-- android: MIN SDK version supported on the target device. MAX version is blank by default. --> <preference name="android-installLocation" value="auto" /> <!-- android: app install location. 'auto' will choose. 'internalOnly' is device memory. 'preferExternal' is SDCard. --> <!-- Define app icon for each platform. --> <icon src="www/icon.png" /> <icon src="www/res/icon/android/icon-36-ldpi.png" gap:platform="android" gap:qualifier="ldpi" /> <icon src="www/res/icon/android/icon-48-mdpi.png" gap:platform="android" gap:qualifier="mdpi" /> <icon src="www/res/icon/android/icon-72-hdpi.png" gap:platform="android" gap:qualifier="hdpi" /> <icon src="www/res/icon/android/icon-96-xhdpi.png" gap:platform="android" gap:qualifier="xhdpi" /> <icon src="www/res/icon/ios/icon-57.png" gap:platform="ios" width="57" height="57" /> <icon src="www/res/icon/ios/icon-72.png" gap:platform="ios" width="72" height="72" /> <icon src="www/res/icon/ios/icon-57-2x.png" gap:platform="ios" width="114" height="114" /> <icon src="www/res/icon/ios/icon-72-2x.png" gap:platform="ios" width="144" height="144" /> <!-- Define app splash screen for each platform. --> <gap:splash src="www/splash.png" /> <gap:splash src="www/res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" /> <gap:splash src="www/res/screen/android/screen-mdpi-portrait.png" gap:platform="android" gap:qualifier="port-mdpi" /> <gap:splash src="www/res/screen/android/screen-hdpi-portrait.png" gap:platform="android" gap:qualifier="port-hdpi" /> <gap:splash src="www/res/screen/android/screen-xhdpi-portrait.png" gap:platform="android" gap:qualifier="port-xhdpi" /> <gap:splash src="www/res/screen/ios/screen-iphone-portrait.png" gap:platform="ios" width="320" height="480" /> <gap:splash src="www/res/screen/ios/screen-iphone-portrait-2x.png" gap:platform="ios" width="640" height="960" /> <gap:splash src="www/res/screen/ios/screen-iphone-portrait-568h-2x.png" gap:platform="ios" width="640" height="1136" /> <gap:splash src="www/res/screen/ios/screen-ipad-portrait.png" gap:platform="ios" width="768" height="1024" /> <gap:splash src="www/res/screen/ios/screen-ipad-landscape.png" gap:platform="ios" width="1024" height="768" /> <!-- Define access to external domains. <access /> - a blank access tag denies access to all external resources. <access origin="*" /> - a wildcard access tag allows access to all external resource. Otherwise, you can specify specific domains: --> <access origin="*" /> <!-- <access origin="http://phonegap.com" /> - allow any secure requests to http://phonegap.com/ <access origin="http://phonegap.com" subdomains="true" /> - same as above, but including subdomains, such as http://build.phonegap.com/ <access origin="http://phonegap.com" browserOnly="true" /> - only allows http://phonegap.com to be opened by the child browser. --> <!-- enable PhoneGap Build to create a remotely debuggable app --> <!-- remove the following segment for production ver of app --> <gap:config-file parent="/manifest" platform="android" xmlns:android="http://schemas.android.com/apk/res/android"> <application android:debuggable="true" /> <uses-permission android:name="android.permission.INTERNET"></uses-permission> <uses-permission android:name="android.permission.CAMERA"></uses-permission> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"> </uses-permission> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"> </uses-permission> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"> </uses-permission> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"> </uses-permission> <uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"> </uses-permission> <uses-permission android:name="android.permission.BATTERY_STATS"> </uses-permission> <uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> </uses-permission> <uses-permission android:name="android.permission.CALL_PHONE"></uses-permission> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"> </uses-permission> <uses-permission android:name="android.permission.READ_CONTACTS"> </uses-permission> <uses-permission android:name="android.permission.READ_PHONE_STATE"> </uses-permission> <uses-permission android:name="android.permission.WRITE_CALL_LOG"> </uses-permission> <uses-permission android:name="android.permission.WRITE_CONTACTS"> </uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"> </uses-permission> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"> </uses-permission> </gap:config-file> <!-- Plugins --> <!-- <gap:plugin name="Example" /> A list of available plugins are available at https://build.phonegap.com/docs/plugins --> <gap:config-file platform="ios" parent="NSLocationAlwaysUsageDescription" mode="merge"> <array> <string>Allow GPS</string> </array> </gap:config-file> <preference name="SplashScreen" value="screen" /> <gap:plugin name="org.apache.cordova.camera" version="0.3.4" source="plugins.cordova.io"> </gap:plugin> <gap:plugin name="org.apache.cordova.file" version="1.3.2" source="plugins.cordova.io"> </gap:plugin> <gap:plugin name="org.apache.cordova.file-transfer" version="0.4.8" source="plugins.cordova.io"> </gap:plugin> <gap:platform name="android"/></widget>
The application was tested only on android devices.
Am I doing something wrong?
Caliman VictorMemberI have decompiled both apks with apktool_2.0.0rc3.
The apk build on local doesn’t contain the plugins in org.apache.cordova folder.
The apk build in cloud doesn’t contain the internet permission in androidmanifest.xml. It contains ACCESS_NETWORK_STATE in stead of INTERNET permission.
Brandon BatieMemberHi,
The MyEclipse 2014 HTML5 and and MyEclipse 2015 Phonegap projects are quite different from each other. So I need to know how you got the ME 2014 project into ME 2015. We do have a tutorial on migrating them located here:
https://www.genuitec.com/products/myeclipse/learning-center/mobile/html5-to-phonegap/If you did something different than that it may cause issues. Let me know and Ill help get this figured out.
Thanks,
Caliman VictorMemberHi,
I followed the tutorial you mentioned above. I created an empty phonegap project with myeclipse 2015 and then I copied my files in the www folder.
After that I deleted the RTE folder and changed cordova import from “rte/cordova.js” to “cordova.js”.Anyway this also happened with an empty phonegap project. I have tested this yesterday. I don’t think the migration is the problem.
If you want more information I will be happy to help.
Caliman VictorMemberI have made some new tests with local builds and I think I found a bug.
I started a new project and I didn’t make any changes. I build it a few times and everything was ok. Then I build it with “Clean build” option checked. After that the build didn’t copy the plugins in the apk.
I think that’s the problem. Clean build deletes more then it should.
Brandon BatieMemberHi,
Very interesting, I will pass this to the dev team to have them look into it further. I will post a reply if we need any further info.Also, you said this happens on a new phone gap project as well, or is it only on the one you converted from the 2014 version?
Thanks.
Caliman VictorMemberHi,
This happens with any phone gap project.
Thanks for helping!
Brandon BatieMemberHi,
Quick question, can you verify the plugins are listed in the plugins directory of your project? If they are can you uninstall and reinstall them and see if that helps. You can do that by right clicking on the project structure, goto PhoneGap then remove plugin. Then do the same to add them using Add Plugin.
Thanks
Caliman VictorMemberHi,
The plugins are there, the android.json is also there.
I already tried reinstalling them and it doesn’t work.The plugins js files also are in the apk. The problem is the required java classes are not copied in the apk.
Brandon BatieMemberThanks, I expected that but was hoping. I have passed this to the development team for further investigation. Would it be possible for you to send a debuggable file that I could look at? you can send it to support at genuitec dot com attn:Brandon
Thanks
Caliman VictorMemberHi,
Sorry for the late response, I had a vacation finally.
What do you mean by debuggable file?
Can you be more specific please?
Brandon BatieMemberHi,
when you build the file, just make sure the Debug is selected and not the Release, if its in Release mode I won’t be able to check the error logsThanks,
Caliman VictorMemberHi,
Unfortunately i had to uninstall myeclipse 2015 today to make some modifications on my application but i have installed it on another computer with a trial version.
I have made 3 builds with debug mode selected. After that i updated myeclipse 2015, since there were some updates available. I have made another 2 builds after that and the problem is still there.
Please confirm that you have the logs you wanted and tell me if you need any other help.
Thanks.
Brandon BatieMemberHi,
I don’t see anything attached or new. Did you send the apk file to support at genuitec dot com with Attn: Brandon in the subject line?
Caliman VictorMemberSorry, i have sent it to the wrong address.
Please check again. -
AuthorPosts