- This topic has 9 replies, 3 voices, and was last updated 10 years, 2 months ago by support-michael.
-
AuthorPosts
-
karen3235Member0) version of GapDebug installed, e.g., 2014EA1, 2014, 2014SR1…
2014EA31) Mobile device and OS version, e.g., iPhone5s/iOS 7.1.1, Nexus5/Android 4.4.3…
Android 4.4.22) Workstation OS version (Win7, Mac OSX Yosemite, …) if a GapDebug software problem
Mac OSX3) Description of the problem and if you can reproduce it consistently. Include a step by step description for how we can reproduce it is always appreciated
1. Add the following snappet to my config.xml. I am using cordova 3.5
<gap:config-file platform=”android” parent=”/manifest”>
<application android:debuggable=”true” />
</gap:config-file>
2. Run cordova build android. It failed with the following error message:-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files…
[aidl] No AIDL files to compile.
[echo] ———-
[echo] Handling RenderScript files…
[echo] ———-
[echo] Handling Resources…
[aapt] Found modified input file
[aapt] Generating resource IDs…
[aapt] /Users/tenx/learning/hello/platforms/android/res/xml/config.xml:22: error: Error parsing XML: unbound prefixBUILD FAILED
/Users/tenx/java/adt/adt-bundle-mac-x86_64-20131030/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/Users/tenx/java/adt/adt-bundle-mac-x86_64-20131030/sdk/tools/ant/build.xml:698: null returned: 1Total time: 2 seconds
Error code 1 for command: ant with args: debug,-f,/Users/tenx/learning/hello/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /Users/tenx/learning/hello/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)4) screenshot(s) if the problem can be observed through the UI or your app
5) GapDebug log file, located at <user-home>/.gapdebug/runtime/.metadata/.log if GapDebug software problem
6) Any other info that you feel will be helpful in resolving your problem quickly
support-michaelKeymasterInvestigating. Will follow up asap
support-michaelKeymasterI believe the issue is caused by the android namespace being undefined in the config.xml. See line #3 below and this doc for more info. Let us know how this turns out.
1 <widget xmlns="http://www.w3.org/ns/widgets" 2 xmlns:gap="http://phonegap.com/ns/1.0" 3 xmlns:android = "http://schemas.android.com/apk/res/android" 4 ...
If you still have an issue then rollback your config.xml by removing your changes. Then in your AndroidManifest.xml add the android:debuggable attribute as shown below.
<application android:debuggable="true" ...
karen3235MemberThanks for your reply. Adding ” xmlns:android = “http://schemas.android.com/apk/res/android” to config.xml will not fix the problem. The following snappet can not be recognized.
<gap:config-file platform=”android” parent=”/manifest”>
<application android:debuggable=”true” />
</gap:config-file>I tried to android:debuggable=”true” to my AndroidManifest.xml to make the app debuggable. The GapDebug could detect the app but just can not load the inspector
karen3235MemberSorry I could not upload the screenshot.
It just waiting from localhost… A white screen.
support-michaelKeymasterApologies on the slow follow up; I needed to setup a cordova 3.5 env to investigate. Try rolling back to the original config.xml and androidmanifest.xml. I don’t think the debug setting is required with the latest cordova android platform.
Once I completed the cordova 3.5 update I built the helloworld example (I named mine project chello because I already had a similar project named hello). I did not include any special debug settings. I simply built the project straight away. Notice in the screenshot below a debug version of my app was created by default. I drag-dropped this CHelloWorld-debug.apk onto my nexus 5 device in the gapdebug UI to install it. Then I launched it on my nexus 5 and began debugging it. See attachment android-debug.png
The gapdebug android documentation was written earlier in the summer. It was required at that time to enable debugging. I don’t believe it is required now but need to do some additional investigation. I’ll update the docs to asap.
Let us know if removing all debug config settings works for you.
Attachments:
You must be logged in to view attached files.
karen3235MemberIt does not work either.
support-michaelKeymaster>It does not work either.
Since I can’t see your screen please clarify what “does not work either” mean. Do you get the same compilation error reported earlier or something else? If something else please describe in detail or attach a screenshot (keep screenshots as small as possible).
If you still experience a compilation error when building your project then do exactly what I did last Friday – that is start with the simplest possible project you can create and get it compiling. Create a new hello world project configured with the android platform. I installed cordova and phonegap 3.5 versions and android 19 api and dev tools on a new windows7 workstation for this support case. Build the project without making any modifications to the project, e.g., do not set any debug settings, do not mess with any plugins, etc. – go for simplest setup. The screenshot above are the apks generated by my super simple project.
Are you able to build the app for android? If yes, then look at the apk file(s) that were created.
johnwargoMemberI’m having the same problem. When I add the:
<gap:config-file platform=”android” parent=”/manifest”>
<application android:debuggable=”true” />
</gap:config-file>to the Cordova project’s config.xml, the project won’t compile:
/Users/jwargo/dev/firstapp/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: ant with args: debug,-f,/Users/jwargo/dev/firstapp/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /Users/jwargo/dev/firstapp/platforms/android/cordova/run: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
jwargo@mini:~/dev/firstapp$When I remove it, it will build and run on the device, but GapDebug won’t see it.
Do we have any new suggestions? This is on OS X and I’m running Cordova 3.5.0-0.2.7
support-michaelKeymaster@johnwargo
I reviewed the GapDebug configuration doc and determined the following snippet is only valid for when using the PhoneGap Build cloud service. The doc needs to be updated and better clarification. I’m working on that now. The following snippetFOR USE WITH PHONEGAP BUILD ONLY - Add the following snippet to the project config.xml <gap:config-file platform="android" parent="/manifest"> <application android:debuggable="true" /> </gap:config-file>
Here are the details for configuring debug mode for local cordova and phonegap android builds.
In <project>/platforms/android/AndroidManifest.xml add the android:debuggable attribute to the <application> element. See the snippet below. Don’t forget to set the android:debuggable attribute to false or remove it completely for a production release.USE ONLY WITH CORDOVA OR PHONEGAP LOCAL BUILDS. Modify the the application element in AndroidManifest.xml <manifest> .... <application [b]android:debuggable="true"[/b] .... > ... </manifest>
-
AuthorPosts