donaldp24 / CanvasCameraPlugin

Phonegap CanvasCameraPlugin
107 stars 119 forks source link

R.java #16

Open mm108 opened 9 years ago

mm108 commented 9 years ago

hi,

I am a little new to mobile app development and I am trying to use your plugin in one of my mobile app projects on Appery io. When I try to generate an APK i get this error many times

src/com/keith/canvascameraplugin/CanvasCameraView.java:[87,24] error: package R does not exist

I was wondering could this be because of the missing R.java? If yes then can I generate this file myself? Any clues would greatly help as I am an absolute noob to android / mobile app development

Thanks, M&M

gmccrackin commented 9 years ago

I believe this might fix your problem e9f0b19.

mm108 commented 9 years ago

wow! I have no error now when generating the APK. Thanks a zillion! :)

Cheers, M&M

gmccrackin commented 9 years ago

np

Ekta09 commented 9 years ago

How can I update the CanvasCameraView.java file ? I am using Visual studio with DevExtreme and . For building with Online Phonegap build I need to add CanvasCameraPlugin id in Config.xml. So now how can I update its .java file and then refer it in my project ?

Can any one help me plz. Thanks in advance.

jdivis commented 9 years ago

Anyone finding this, trying to use phonegap build, with an npm package, you can find it here:

https://www.npmjs.com/package/com.simetrica.cordova.plugin.canvascamera

thanks to @koiosoft

thomascrown commented 9 years ago

Here is how to fix this: From your root directory for the app, go to platform/android/ and open AndroidManifest.xml

At the top, find the package id for your app... mine is com.ionicframework.appName Yours may be different, but effectively it's the package name for your app.

Then from the same folder navigate to src/com/keith/canvascameraplugin and open CanvasCameraView.java (in any text editor)

Add this before the first import line, but after package com.keith.canvascameraplugin; import com.ionicframework.appName.R;

Obviously replace the com.ionicframework.appName with the package name you got from AndroidManifest.xml

It's important you do this in the proper directory (i.e. the platforms/android/src....), because when you build and/or run android (at least for ionic), the src files are not recompiled from the original files in the plugin directory. If you do platform remove android, and then platform add android, you would need to repeat the above steps.