0

Is there any way to set "default" R package generation? By default it is compiled on AndroidManifest.xml's package property. Is there any way to tell Eclipse plugin to use -J package.name option with aapt command? I want to do this with ant but I have problems with library dependances like it is mentioned here

Regards

Community
  • 1
  • 1
zmeda
  • 2,909
  • 9
  • 36
  • 56

1 Answers1

0

Hi if u can check in the manifest there is a package attribute . that is the default R package generation. you can change it to whatever the package You need . and then if u clean your project it will automatically update the R package with your package name

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"

  package="com.nds.activities"

  android:versionCode="1"

  android:versionName="1.0">......

Imp NOTE: once you do this update your activities with the correct package Path.

But why you want to do this?

bHaRaTh
  • 3,464
  • 4
  • 34
  • 32
  • I want to do 1 very common issue. 1 code -> 2 versions of application (full & lite). For each of them there must be different package attribute in manifest. My full version is payable so I need to implement market licensing. I have to do this with library which is included in android sdk.
    Because I have problems with buildin ant script for creating apk (library dependances does not work) I want to do workaround. I prepared two manifest files both are almost the same except some permissions and package. Now if I generate apk from Eclipse with first manifest it works fine (cont.)
    – zmeda Apr 21 '11 at 08:48
  • If I want to generate apk with second manifest (let's say lite) R.class is generated on different package and can not be seen in my code anymore. I tried right-click on project and organize import but eclipse does not know which R to take (my.R or android.R). So I have to go in each of file which uses R and manually inport R. Very annoying. Specially if I switch between full an lite very often. Solutions? – zmeda Apr 21 '11 at 08:54
  • whether this helped you in solving your problem. – bHaRaTh Apr 21 '11 at 09:25
  • No. Perfect solution for will be ant build script. But as I already said with ant I have problems including market licensing library into my project. http://stackoverflow.com/questions/5717417/android-with-ant-licensing-library-dependencies – zmeda Apr 21 '11 at 11:27