We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to set license in Android project

Hi,

I have issue with importing the temp license, I copied the license file “Aspose.Total.Android.lic” to the assets directory,

Here is the manifest:

here is a code snippet:

    void applyAsposeLicense() {
        License license = new License();
        InputStream i = null;
        try {
            i = getResources().getAssets().open(getString(R.string.aspose_license_asset_file));
        } catch (Exception x) {
            Log.e(App.class.getName(), Log.getStackTraceString(x));
        } finally {
            closeStream(i);
        }
    }

here is the exception I receive:

11-11 16:06:02.926: E/AndroidRuntime(11618): FATAL EXCEPTION: main 11-11 16:06:02.926: E/AndroidRuntime(11618): java.lang.NoClassDefFoundError: asposewobfuscated.zzG2 11-11 16:06:02.926: E/AndroidRuntime(11618): at com.aspose.words.zzZQ6.zzZ(Unknown Source) 11-11 16:06:02.926: E/AndroidRuntime(11618): at com.aspose.words.zzZQ6.zzV(Unknown Source) 11-11 16:06:02.926: E/AndroidRuntime(11618): at com.aspose.words.zzZQ6.zzW(Unknown Source) 11-11 16:06:02.926: E/AndroidRuntime(11618): at com.aspose.words.License.setLicense(Unknown Source) 11-11 16:06:02.926: E/AndroidRuntime(11618): at com.aspose.android.asposewordsviewer.App.applyAsposeLicense(App.java:42) 11-11 16:06:02.926: E/AndroidRuntime(11618): at com.aspose.android.asposewordsviewer.App.onCreate(App.java:32)

This message was posted using Email2Forum by Babar Raza.

Hi Shedeed,

Thanks for your inquiry. We have now divided the library into following two archives. For example:

  • aspose-words-1.12-android-jdk15.jar: The first one includes public API and its auxiliary methods.
  • aspose-words-1.12-libs-android-jdk15.apk: The second one includes third party jars, basic classes and resources.

To include Aspose.Words for Android into the project you should place “aspose-words-1.12-android-jdk15.jar” in the folder “libs” of your project, and the archive “aspose-words-1.12-libs-android-jdk15.apk” into the folder “assets”. After that you need to indicate in “AndroidManifest.xml” file that you are going to use AsposeWords application as the basic one. Please see the following markup:

…
…
<application 
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:name="com.aspose.words.AsposeWordsApplication"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
…
…

I hope, this helps.

Best regards,

I have requested a temp license, How can I use it in my project that could be a Word or non-Word project?

Hi Shedeed,

Thanks for your inquiry. Please refer to the following article:

http://www.aspose.com/docs/display/wordsandroid/Applying+a+License

I hope, this helps.

Best regards,

Thanks!

This was helpful.