Generate multiple APK's with same code base us

2019-08-10 02:30发布

I am trying to generate multiple apk with same code using ANT and have followed many posts to get it done. But i am unable to build the project successfully.

Let me start with my first problem. I have a main project which has two library projects, something like

Main Project ---> Library Project(isLibrary) ---> Google Play Services (isLibrary)

When i am trying to update those projects, each and every time getting a message like It seems that there are sub-projects. If you want to update them please use the --subprojects parameter.

So, from the above message it looks like am failing at early step of the build process.

Then i have added the following snippet prior to

           <target
        name="-package-resources" >

        <!-- only package resources if *not* a library project -->

        <echo message="Current Package name: ${app.custompackagename}" />

        <do-only-if-not-library elseText="Library project: do not package resources..." >

            <aapt
                androidjar="${project.target.android.jar}"
                apkfolder="${out.absolute.dir}"
                assets="${asset.absolute.dir}"
                buildType="${build.target}"
                command="package"
                debug="${build.is.packaging.debug}"
                executable="${aapt}"
                ignoreAssets="${aapt.ignore.assets}"
                libraryPackagesRefid="project.library.packages"
                libraryRFileRefid="project.library.bin.r.file.path"
                libraryResFolderPathRefid="project.library.res.folder.path"
                manifest="${out.manifest.abs.file}"
                manifestpackage="${app.custompackagename}"
                nocrunch="${build.packaging.nocrunch}"
                previousBuildType="${build.last.target}"
                resourcefilename="${resource.package.file.name}"
                resourcefilter="${aapt.resource.filter}"
                versioncode="${version.code}"
                versionname="${version.name}" >

                <res path="${out.res.absolute.dir}" />

                <res path="${resource.absolute.dir}" />
                <!-- <nocompress /> forces no compression on any files in assets or res/raw -->
                <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
            </aapt>
        </do-only-if-not-library>
    </target>  

then i have executed the following command from command line ant debug -Dpackage.manifest.name=com.example.test

and here are my logs BUILD FAILED D:\Vijay\Android\android-sdk_r06-windows\android-sdk_r06-windows\android-sdk-win dows\tools\ant\build.xml:571: Failed to resolve library path: D:\Vijay\Android\G itHub\project\library

0条回答
登录 后发表回答