1

I'm trying to debug code as it runs on my Android test device. I sent a build to the CN1 server and downloaded the resulting sources.zip, which I then used to create a project in Android Developer Studio.

When I compile using Compile SDK Version: API21 or API 22 with Build Tools Version: 21.1.2 or 22.0.1, respectively

I get the following compile errors:

C:\home\dev\ProxyServerDebug\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\opt\android-sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1

When I compile using Compile SDK Version: API 23 Build Tools Version: 23.0.2

I get the following compile errors:

C:\home\dev\ProxyServerDebug\src\main\java\com\codename1\impl\android\AndroidImplementation.java
Error:(4563, 21) error: cannot find symbol method setLatestEventInfo(Activity,String,String,PendingIntent)
C:\home\dev\ProxyServerDebug\src\main\java\com\codename1\impl\android\PushNotificationService.java
Error:(110, 18) error: cannot find symbol method setLatestEventInfo(PushNotificationService,String,String,PendingIntent)

Is it just a matter of setting the correct SDK and Build Tools versions? or am I missing something else? BTW, sources were generated this morning, so I should be on the latest CN1 3.3 release.

1 Answers1

1

If I recall correctly it should be 22.0.1 the reason build fails by default is that you need to configure an external gradle directory as explained in How to build the native Android sources from Codename One's build server

Community
  • 1
  • 1
Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • Thanks, Shai. Your answer lead me to a solution. As explained in the URL you referenced above, I needed to make a few changes to Android Studio Gradle Settings. The settings had already contained a Gradle Home set to the gradle 2.8 directory within my Android Studio. I downloaded the latest grade version 2.10, and pointed to the new installation directory which was outside of the studio. I got some further errors. I then decided to download gradle 2.2 and pointed the home at that, and that worked. – David B. Williams Jan 28 '16 at 17:02