Dreamweaver + Phonegap startup

2019-07-22 11:28发布

I am trying to get Phonegap to work for the first time using Dreamweaver CS5.5. I'm able to configure the application framework and the application settings. When I build and emulate for the android, the emulator launches but goes to the home page instead of my application.

My application is nowhere to be found.

Edit: Here's the most recent Buildlog.log:

__________ set ANT_HOME=C:\PROGRA~2\Adobe\ADOBED~2.5\CONFIG~1\NATIVE~1\APACHE~1 set ANDROID_HOME=C:\AndroidSDK set JAVA_HOME=C:\PROGRA~2\Adobe\ADOBED~2.5\JDK set PATH=%JAVA_HOME%\bin;%PATH% cd C:\ANDROI~1\PLATFO~2 C:\AndroidSDK\platform-tools\adb.exe devices __________ * daemon not running. starting it now on port 5037 * * daemon started successfully * List of devices attached emulator-5554 device WARNING: no icon was specified in app settings. using default. WARNING: no splash screen was specified in app settings. using default.

__________ set ANT_HOME=C:\PROGRA~2\Adobe\ADOBED~2.5\CONFIG~1\NATIVE~1\APACHE~1 set ANDROID_HOME=C:\AndroidSDK set JAVA_HOME=C:\PROGRA~2\Adobe\ADOBED~2.5\JDK set PATH=%JAVA_HOME%\bin;%PATH% cd C:\Users\Phillip\Desktop\COMCOM~1.AND C:\Windows\SysWOW64\cmd.exe /u /c C:\PROGRA~2\Adobe\ADOBED~2.5\CONFIG~1\NATIVE~1\APACHE~1\bin\ant.bat debug __________ Buildfile: C:\Users\Phillip\Desktop\COMCOM~1.AND\build.xml [setup] Android SDK Tools Revision 12 [setup] Project Target: Android 2.2
[setup] API level: 8 [setup] [setup] ------------------
[setup] Resolving library dependencies: [setup] No library dependencies. [setup] [setup] ------------------ [setup] [setup] WARNING: Attribute minSdkVersion in AndroidManifest.xml (2) is lower than the project target API level (8) [setup] [setup] Importing rules file: tools\ant\main_rules.xml -debug-obfuscation-check: -set-debug-mode: -compile-tested-if-test: -pre-build: -dirs: [echo] Creating output directories if needed... -aidl: [echo] Compiling aidl files into Java classes... -renderscript: [echo] Compiling RenderScript files into Java classes and RenderScript bytecode... -resource-src:
[echo] Generating R.java / Manifest.java from the resources... -pre-compile: compile: [javac] C:\AndroidSDK\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 1 source file to C:\Users\Phillip\Desktop\COMCOM~1.AND\bin\classes -post-compile: -obfuscate: -dex: [echo] Converting compiled files and external libraries into C:\Users\Phillip\Desktop\COMCOM~1.AND\bin\classes.dex... -package-resources: [echo] Packaging resources [aapt] Creating full resource package... [aapt.exe] libpng error: Not a PNG file [aapt.exe] ERROR: Failure processing PNG image C:\Users\Phillip\Desktop\COMCOM~1.AND\res\drawable-hdpi\icon.png [aapt.exe] libpng error: Not a PNG file [aapt.exe] ERROR: Failure processing PNG image C:\Users\Phillip\Desktop\COMCOM~1.AND\res\drawable-ldpi\icon.png [aapt.exe] libpng error: Not a PNG file [aapt.exe] ERROR: Failure processing PNG image C:\Users\Phillip\Desktop\COMCOM~1.AND\res\drawable-mdpi\icon.png [aapt.exe] libpng error: Not a PNG file [aapt.exe] ERROR: Failure processing PNG image C:\Users\Phillip\Desktop\COMCOM~1.AND\res\drawable-hdpi\splash.png [aapt.exe] libpng error: Not a PNG file [aapt.exe] ERROR: Failure processing PNG image C:\Users\Phillip\Desktop\COMCOM~1.AND\res\drawable-ldpi\splash.png [aapt.exe] libpng error: Not a PNG file [aapt.exe] ERROR: Failure processing PNG image C:\Users\Phillip\Desktop\COMCOM~1.AND\res\drawable-mdpi\splash.png BUILD FAILED C:\AndroidSDK\tools\ant\main_rules.xml:510: null returned: 1 Total time: 3 seconds OPERATION CANCELED __________ set ANT_HOME=C:\PROGRA~2\Adobe\ADOBED~2.5\CONFIG~1\NATIVE~1\APACHE~1 set ANDROID_HOME=C:\AndroidSDK set JAVA_HOME=C:\PROGRA~2\Adobe\ADOBED~2.5\JDK set PATH=%JAVA_HOME%\bin;%PATH% cd C:\ANDROI~1\PLATFO~2 C:\AndroidSDK\platform-tools\adb.exe kill-server __________

2条回答
该账号已被封号
2楼-- · 2019-07-22 11:59

Got it running successfully on Win7:

Here's are some tips that I've rummaged around finding on the web.

Getting this going was a lot more complicated than advertised. Makes me wonder if I should just be using Eclipse instead.

Download the full install of the Android SDK manually. Use the executable. The Easy install was a complete fail even after downloading the upgrade patch and restarting. I understand you can download something else and fix the js. I wouldn't bother. It's not that hard. Download and install the Java SDK. Run it before installing the Android SDK. Android SDK needs it running. You can do this by going to the Start Menu and searching for Java and clicking it. Install the Android SDK in something like c:\android not the default directory under Program Files. This avoids possible permissions problems. Update your Android packages. I did all of them but you can choose what you'd like I suppose. It took me a few hours. Restart your computer. Create an icon.png that's 72x72 and a splash.png that's 320x480 and put them in an img directory in your app site folder. Not necessary but nice. You'll get some error messages. ignore them. Restart Java after restarting the computer. Not sure if this is necessary but I'd do it. Start the emulator from the command line not in Dreamweaver 5.5. Calling it from there is buggy. go to Start and enter cmd. From the command line enter this:

type in:

cd c:\whateverfoldeyouinstalledadndroidsdk\tools\

then:

emulator -avd DW_AVD

This starts it up. You could use another avd if you've created one in the avdManager.exe in the Android SDK.

Then go through the process to emulate and build. This won't work either. Find the build.xml under whatever folder you published to.

Follow the advice at the end of this post:

http://www.tricedesigns.com/2011/11/01/building-phonegap-applications-with-dreamweaver/

Build and Emulate again.

It should work now.

To transfer the file, take the whatever-your-app-is-called-debug.apk from the bin folder in the published folder and transfer it to your SD card on the phone or wherever you can put it.

This is an unsigned app so it won't be deployable to the Android Marketplace as is. You'll need to go through the process. Here are the guidelines:

http://developer.android.com/guide/publishing/app-signing.html

You may need to take the project back into Eclipse anyway to go through the final steps. I haven't gotten this far yet.

Use a file manager app like Astro to open it up and try to install it. You may need to change the install permission to allow unknown apps to be installed. I'd of course set it back later.

Find your app in the app menu. enjoy! Whew. I just thought I'd share the info to save others pain.

查看更多
\"骚年 ilove
3楼-- · 2019-07-22 12:13

It seems to be a problem with processing the application icon. Is it your icon a true png?

Try to replace it or leave it blank (don't worry, Dreamweaver will put a default icon for you) to test if that is the problem.

Hope that helps. Martin

查看更多
登录 后发表回答