Netbeans Android - 编译和编译在真实设备上测试(Unix、OSX)
我读过几个有关在设备上测试 Android 应用程序的问题。
我知道可以将 APK 上传到网络存储、允许未签名的应用程序并运行它 我读过一些使用 Eclipse 的解决方案 我读过有关通过 adb
安装 apk
的内容 但没有任何关于 Netbeans 的信息。
那么是否有针对 OSX/UNIX 系统和 Netbeans 的自动化解决方案?
请注意,我目前正在使用带有 NBAndroid 插件的 OSX 1.7 和 Netbeans 7.0,但问题与 Unix/OSX 和 Netbeans 相关,因为6.5(如果支持则更低)
I've read several questions about testing android apps on device.
I know possibility to upload APK to web storage, allow unsigned apps and run it
I've read some solutions using Eclipse
I've read about installing apk
through adb
But nothing about Netbeans.
So Is there some automated solution for OSX/UNIX systems and Netbeans?
Note, I'm currently using OSX 1.7 and Netbeans 7.0 with NBAndroid plugin, but question is related to Unix/OSX in common and Netbeans since 6.5 (or lower if it supports)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会自己回答,因为没有人回答,我想出了答案:
根据本手册编辑你的 Android 清单:
http://developer.android.com/guide/developing/device.html
从您的应用程序运行
./adb start-server
或ddms
android sdk启用adb服务器在您的设备上将
USB 调试模式
设置为启用,并通过 USB 将设备连接到计算机运行
./adb devices 从内部
/platform-tools
文件夹要查看您的设备是否已正确启用并且对 adb 可见
,
在 Netbeans (F6) 中运行项目并在窗口上半部分选择您的设备(在
运行设备
部分中)您的应用程序应该在您的真实设备上正常运行,要查看日志,您可以使用
./platform-tools/adb logcat
->控制台中的调试消息./tools/ddms
-> gui 调试消息I will lay down answer myself, since nobody answered and I fugured it out:
Edit your Android manifest due to this manual:
http://developer.android.com/guide/developing/device.html
<application android:debuggable="true" ... >
run
./adb start-server
orddms
from your android sdk to enable adb serverOn your device set
USB Debugging mode
to enabled, and connect your device to computer via USBrun
./adb devices
from within/platform-tools
folderto view if your device is enabled correctly and visible to adb
run project in Netbeans (F6) and select your device in top half of window (in section
running devices
)your app should be running properly on your real device, to see logs, you can use
./platform-tools/adb logcat
-> debug messages in console./tools/ddms
-> gui to debug messages