Solution Delphi XE5 Write Android program no resource identifier found for attribute ... Error "Go"

Source: Internet
Author: User

Original: http://www.hxhlb.cn/article/32142aaeb67bbc05379369c3.html

That day, I put on the Rad Studio XE5.

That night, I wrote a small Android program.

However, there is no good phone, no way to test.

Today, the download of the night, finally the Android all the SDK has been installed, configured into the XE5

Alas, with such a huge XE5 to write Android SDK 2.1 version of the program, I feel shy ...

Don't say much nonsense, let's solve the problem below.

XE5 comes with the SDK, is SDK4.2, I put in the 4.2 version of the program written in the 2.1 version to compile and release, of course, error.

First of all, it's such a mistake: (I've replaced part of my path, you can understand what it means)

1 [PAClient Error] Error: E2312 Unable to execute ‘"G:\ProgramTools\adt-bundle-windows-x86_64-20130917\sdk\build-tools\17.0.0\aapt.exe" package -f -M "C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\AndroidManifest.xml" -F "C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\bin\HadesAndroidBrowser-unsigned.apk" -I "G:\ProgramTools\adt-bundle-windows-x86_64-20130917\sdk\platforms\android-7\android.jar" -S "C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\res" -A "C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\assets" "C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\library" "C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\classes"‘(Error 1)

This is output from the build output of the XE5, and I looked at it and did not generate the APK (this is not nonsense ...). Also reported error generated ...)

However, it did not give reasons Ah, so I copied to cmd in person to execute a bit, found the following error:

1 C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\AndroidManifest.xml:20: error: No resource identifier found forattribute ‘largeHeap‘ inpackage ‘android‘
2 c:\user S\xxx\desktop\d_xe5_android_browser\android\debug\hadesandroidbrowser\androidmanifest.xml:23:error:no Resource identifier found  for  attribute   ' restoreanyversion '  in  package  ' Android '
3 C:\Users\xxx\Desktop\D_XE5_Android_Browser\Android\Debug\HadesAndroidBrowser\AndroidManifest.xml:23: error: No resource identifier found forattribute ‘installLocation‘ inpackage ‘android‘

Oh, look at this I am really a head of two big AH.

Helpless, had to search these are what things went.

First Search first: Largeheap, I this English poor ah, do not know what the literal meaning, but degrees Niang said, in Android, this represents a single process memory allocation of a property. Supported in 3.0 or more versions.

I understand, I said in the high version of the SDK does not error, in my 2.1 on the error, the original is a new feature AH.

But how to get rid of it?

This time without Baidu, for Google to continue, found on the official network such a paragraph: (Website: http://www.embarcadero.com/starthere/xe5/mobdevsetup/android/en/preparing_an_ android_application_for_deployment.html)

The idea is that if you want to publish your Android app, you'll have to set it up in the projects----options.

.....

RAD Studio generates ANDROIDMANIFEST.XM files based on a file called AndroidManifest.template.xml.

See here, I went to see the next androidmanifest.xml, found that in this XML file really has to define these properties:

This is not a good run, directly delete these lines.

Then clean, compile, publish.

Haha, sure enough!

The program is compiled.

Install it now! I plug in my phone and run it.

But it was too early to be happy. Although the compilation was successful, there was an error in the installation:

1 [INSTALL_PARSE_FAILED_NO_CERTIFICATES]

This means that my signature seems to be wrong.

Really collapsed, what to do. or find a Niang.

Don't say it, I really found it. Here (HTTP://ANDROIDDEVELOPERTUTORIAL.COM/FIXING-INSTALL_PARSE_FAILED_NO_CERTIFICATES-ANDROID-JDK7)

Say yes, JDK1.7 and Android are somewhat incompatible. I think, oh, my hands are so cheap!

Oneself is unload of jdk1.6 change of jdk1.7 Ah, this is not oneself to make trouble for oneself!

The solution, he says, is to add a parameter to Jarsigner.

Originally I want to directly change the configuration of XE5, but find a half-day did not find, oneself also lazy manual Add.

And then went to visit Rad's official website, sure enough, and I found out!

Rad says that you can use an unsigned apk as long as you choose to configure it as release. (http://docwiki.embarcadero.com/RADStudio/XE5/en/Deploying_Your_Unsigned_Android_Application)

That's good, anyway AndroidManifest.template.xml has been modified, change a configuration doesn't matter.

Sure enough, after changing the configuration, everything is fine:

I XE5 after the successful installation:

You may not be able to see the right side of the configuration, however, I will provide you with my project code, you open with XE5 to know what is the situation!

Here's the program:

How, the program is not bad ~ ~

Project: Http://www.hxcarrot.com/Download/HadesAndroidBrowser_2.1.rar

Come and enjoy Android programming bar ~ ~ ~

Solution Delphi XE5 Write Android program no resource identifier found for attribute ... Error "Go"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.