我有一个奇怪的错误。我可以在调试中创建自己的构建,并且运行良好。所有的API都可以正常通信。明确的要求是,我需要向客户端的Playstore管理员提供未签名的APK版本,但是当我尝试构建未签名的应用程序时,出现以下错误:
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView1"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView2"
app:layout_constraintTop_toBottomOf="@+id/textView1"
app:layout_constraintStart_toStartOf="@id/textView1" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="TextView3"
app:layout_constraintTop_toBottomOf="@+id/textView2"
app:layout_constraintStart_toStartOf="@id/textView2" />
</android.support.constraint.ConstraintLayout>
但是仅当我创建未签名的APK时。未签名的APK的构建过程如何将无法获得所有必需的类?
我正在使用AndroidStudio 3.2.1,构建工具38.0.3和gradle-4.5
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/codec/binary/Base64;
at org.apache.http.impl.auth.BasicScheme.authenticate(BasicScheme.java:166)
at org.apache.http.client.protocol.RequestAuthenticationBase.authenticate(RequestAuthenticationBase.java:120)
at org.apache.http.client.protocol.RequestAuthenticationBase.process(RequestAuthenticationBase.java:83)
at org.apache.http.client.protocol.RequestTargetAuthentication.process(RequestTargetAuthentication.java:82)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:133)
at org.apache.http.protocol.HttpRequestExecutor.preProcess(HttpRequestExecutor.java:167)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:484)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.suddenlink.suddenlink2go.connection.UrlConnection.makeServiceCall(UrlConnection.java:300)
at com.suddenlink.suddenlink2go.connection.UrlConnection.doInBackground(UrlConnection.java:486)
at com.suddenlink.suddenlink2go.connection.UrlConnection.doInBackground(UrlConnection.java:71)
at android.os.AsyncTask$2.call(AsyncTask.java:333)