raelmax / android-webview

A simple Android App generator to WebView based apps.
21 stars 5 forks source link

creating the app #2

Open staminna opened 10 years ago

staminna commented 10 years ago

After setting the app name and url,

What's your app name? [myapp]

Project_Name What's your app url?
http://localhost/project

What's your java package name? [com.myapp.mobile]

com.jorge.mobile

Error: Target id is not valid. Use 'android list targets' to get the target ids. Traceback (most recent call last): File "/usr/local/bin/android-webview", line 8, in load_entry_point('android-webview==0.1.3', 'console_scripts', 'android-webview')() File "/Library/Python/2.7/site-packages/awebview/android_webview.py", line 92, in main replace_templates() File "/Library/Python/2.7/site-packages/awebview/android_webview.py", line 45, in replace_templates new_main_activity = open('{0}/src/{1}/MainActivity.java'.format(PARAMS['app_name'], PARAMS['package_dir']), 'w') IOError: [Errno 2] No such file or directory: 'Project_Name/src/com/jorge/mobile/MainActivity.java'

I have copied the template/* files into ../Project_Name to avoid previous errors but then I'm stuck here.

When I try to $ android list targets Available Android targets:

Is empty.

Thanks. Jorge

teolemon commented 8 years ago

It's because you haven't installed the targets on your system. Install the android sdk, and type "android" into a terminal to launch the installer.