设置 AndroidAnnotations 的问题
Proplem with setup AndroidAnnotations
我尝试在 AndroidAnnotations 上写。我都是按照说明做的,但是
当我编译这个简单的代码时
import androidx.appcompat.app.AppCompatActivity;
import org.androidannotations.annotations.EActivity;
@EActivity(R.layout.activity_main)
public class MainActivity extends AppCompatActivity {
}
我有这个错误
Could not find the AndroidManifest.xml file, using generation folder [D:\Java\Android\PNU2DietCode\app\build\generated\ap_generated_sources\debug\out])
AndroidManifest.xml
<application
...
<activity android:name=".MainActivity_">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
并且 .MainActivity_ 未解决
Gradle
...
def AAVersion = '4.6.0'
dependencies {
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
...
}
我找到了答案。我有 gradle 3.5
,但他不支持(也许)。我安装 gradle 3.3
他工作
我尝试在 AndroidAnnotations 上写。我都是按照说明做的,但是 当我编译这个简单的代码时
import androidx.appcompat.app.AppCompatActivity;
import org.androidannotations.annotations.EActivity;
@EActivity(R.layout.activity_main)
public class MainActivity extends AppCompatActivity {
}
我有这个错误
Could not find the AndroidManifest.xml file, using generation folder [D:\Java\Android\PNU2DietCode\app\build\generated\ap_generated_sources\debug\out])
AndroidManifest.xml
<application
...
<activity android:name=".MainActivity_">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
并且 .MainActivity_ 未解决
Gradle
...
def AAVersion = '4.6.0'
dependencies {
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
implementation "org.androidannotations:androidannotations-api:$AAVersion"
...
}
我找到了答案。我有 gradle 3.5
,但他不支持(也许)。我安装 gradle 3.3
他工作